mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-09-01 20:23:39 +02:00
Merge branch 'core' of http://framagit.org/peetah/rss-bridge
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user