Archived
1
0
Fork 0

Style changes

This commit is contained in:
Alexander Yakovlev 2017-04-27 14:27:25 +07:00
parent 9a7d25e4e3
commit 21a645340d
3 changed files with 12 additions and 12 deletions

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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