Style changes
This commit is contained in:
parent
9a7d25e4e3
commit
21a645340d
17
Game.php
17
Game.php
|
@ -7,28 +7,23 @@ class Game {
|
|||
public $description;
|
||||
public $date;
|
||||
public function print() {
|
||||
$converter = new HtmlConverter();
|
||||
if (STYLE === 'RUS') {
|
||||
$output = "* [«".trim($this->title)."»](".trim($this->url).")";
|
||||
if ($this->author) {
|
||||
$output .= " — *".trim($this->author)."*";
|
||||
}
|
||||
if ($this->description) {
|
||||
$output .= " \n<blockquote>".$this->description."</blockquote>\n";
|
||||
} else {
|
||||
$output .= "\n";
|
||||
}
|
||||
}
|
||||
if (STYLE === 'ENG') {
|
||||
$converter = new HtmlConverter();
|
||||
$output = "* [“".trim($this->title)."”](".trim($this->url).")";
|
||||
if ($this->author) {
|
||||
$output .= " by *".trim($this->author)."*";
|
||||
}
|
||||
if ($this->description) {
|
||||
$output .= " \n> ".$converter->convert($this->description)."\n";
|
||||
} else {
|
||||
$output .= "\n";
|
||||
}
|
||||
}
|
||||
if ($this->description) {
|
||||
$output .= "\n\n > ".$converter->convert($this->description)."\n";
|
||||
} else {
|
||||
$output .= "\n";
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ abstract class Source {
|
|||
* @param whether to return or print the text
|
||||
*/
|
||||
protected function startSection($return = false) {
|
||||
$text = "#### ".$this->title."\n";
|
||||
$text = "\n#### ".$this->title."\n";
|
||||
if ($return) {
|
||||
return $text;
|
||||
}
|
||||
|
|
|
@ -27,6 +27,11 @@ class Textadventures extends Source {
|
|||
'',
|
||||
$desc
|
||||
));
|
||||
$game->description = trim(str_replace(
|
||||
' Play online',
|
||||
'',
|
||||
$desc
|
||||
));
|
||||
}
|
||||
} catch (Exception $e) {} // probably a 18+ game, no info on game page
|
||||
|
||||
|
|
Reference in a new issue