diff --git a/bridges/Freenews.php b/bridges/Freenews.php
index e1cf094c..ecdd4610 100644
--- a/bridges/Freenews.php
+++ b/bridges/Freenews.php
@@ -1,6 +1,5 @@
toURI(strtolower($param['site']));
}
// $this->message("loading feed from ".$this->getURI());
- parent::collectData($param);
+ parent::collectExpandableDatas($param, $name);
}
protected function parseRSSItem($newsItem) {
diff --git a/bridges/Les400Culs.php b/bridges/Les400Culs.php
index 4694f406..36dc0a80 100644
--- a/bridges/Les400Culs.php
+++ b/bridges/Les400Culs.php
@@ -1,11 +1,7 @@
returnError('There is no $param[\'url\'] for this RSS expander', 404);
- }
-// $this->message("Loading from ".$param['url']);
- // Notice WE DO NOT use cache here on purpose : we want a fresh view of the RSS stream each time
- $rssContent = simplexml_load_file($param['url']) or $this->returnError('Could not request '.$param['url'], 404);
-// $this->message("loaded RSS from ".$param['url']);
- // TODO insert RSS format detection
- // we suppose for now, we have some RSS 2.0
- $this->collect_RSS_2_0_data($rssContent);
- }
-
- protected function collect_RSS_2_0_data($rssContent) {
- $rssContent = $rssContent->channel[0];
-// $this->message("RSS content is ===========\n".var_export($rssContent, true)."===========");
- $this->load_RSS_2_0_feed_data($rssContent);
- foreach($rssContent->item as $item) {
-// $this->message("parsing item ".var_export($item, true));
- $this->items[] = $this->parseRSSItem($item);
- }
- }
-
- protected function RSS_2_0_time_to_timestamp($item) {
- return DateTime::createFromFormat('D, d M Y H:i:s e', $item->pubDate)->getTimestamp();
- }
-
- // TODO set title, link, description, language, and so on
- protected function load_RSS_2_0_feed_data($rssContent) {
- $this->name = trim($rssContent->title);
- $this->uri = trim($rssContent->link);
- $this->description = trim($rssContent->description);
- }
-
- /**
- * Method should return, from a source RSS item given by lastRSS, one of our Items objects
- * @param $item the input rss item
- * @return a RSS-Bridge Item, with (hopefully) the whole content)
- */
- abstract protected function parseRSSItem($item);
-
-
- public function getName(){
- return $this->name;
- }
-
- public function getURI(){
- return $this->uri;
- }
-
- public function getDescription() {
- return $this->description;
- }
-}
diff --git a/bridges/TheOatMealBridge.php b/bridges/TheOatMealBridge.php
index ba431c88..97aae693 100644
--- a/bridges/TheOatMealBridge.php
+++ b/bridges/TheOatMealBridge.php
@@ -1,7 +1,4 @@
getMessage());
}
-function getHelperButtonFormat($value, $name){
- return '';
-}
-
-function getHelperButtonsFormat($formats){
- $buttons = '';
- foreach( $formats as $name => $infos )
- {
- if ( isset($infos['name']) )
- {
- $buttons .= getHelperButtonFormat($name, $infos['name']) . PHP_EOL;
- }
- }
- return $buttons;
-}
-
-function displayBridgeCard($bridgeName, $formats, $isActive = true)
-{
-
-
- $bridgeElement = Bridge::create($bridgeName);
- if($bridgeElement == false) {
- return "";
- }
- $bridgeElement->loadMetadatas();
-
- $name = ''.$bridgeElement->name.'';
- $description = $bridgeElement->description;
-
- $card = <<
-
{$name}
-
- {$description}
-
-CARD;
-
- // If we don't have any parameter for the bridge, we print a generic form to load it.
- if(count($bridgeElement->parameters) == 0) {
-
- $card .= '' . PHP_EOL;
-
- }
-
- foreach($bridgeElement->parameters as $parameterName => $parameter)
- {
- $card .= '' . PHP_EOL;
- if(!is_numeric($parameterName)) {
- $card .= '