1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-09-01 20:23:39 +02:00
This commit is contained in:
logmanoriginal
2016-08-28 20:33:27 +02:00
133 changed files with 2159 additions and 2646 deletions

View File

@@ -1,44 +1,40 @@
<?php
class WorldOfTanksBridge extends HttpCachingBridgeAbstract{
public function loadMetadatas() {
public $maintainer = "mitsukarenai";
public $name = "World of Tanks";
public $uri = "http://worldoftanks.eu/";
public $description = "News about the tank slaughter game.";
$this->maintainer = "mitsukarenai";
$this->name = "World of Tanks";
$this->uri = "http://worldoftanks.eu/";
$this->description = "News about the tank slaughter game.";
$this->parameters[] = array(
'category'=>array(
// TODO: should be a list
'name'=>'nom de la catégorie'
),
'lang'=>array(
public $parameters = array( array(
'category'=>array(
// TODO: should be a list
'name'=>'nom de la catégorie'
),
'lang'=>array(
'name'=>'Langue',
'type'=>'list',
'values'=>array(
'Français'=>'fr',
'English'=>'en',
'Español'=>'es',
'Deutsch'=>'de',
'Čeština'=>'cs',
'Polski'=>'pl',
'Türkçe'=>'tr'
'Français'=>'fr',
'English'=>'en',
'Español'=>'es',
'Deutsch'=>'de',
'Čeština'=>'cs',
'Polski'=>'pl',
'Türkçe'=>'tr'
)
)
);
}
)
));
function getURI(){
$param=$this->parameters[$this->queriedContext];
$lang='fr';
if (!empty($param['lang']['value'])) {
$lang = $param['lang']['value'];
if (!empty($this->getInput('lang'))) {
$lang = $this->getInput('lang');
}
$uri = $this->uri.$lang.'/news/';
if(!empty($param['category']['value'])) {
$uri .= 'pc-browser/'.$param['category']['value']."/";
if(!empty($this->getInput('category'))) {
$uri .= 'pc-browser/'.$this->getInput('category')."/";
}
return $uri;
}