Move tibiacom boxes to Twig templates

Yes they are looking and working same as before ;)
This commit is contained in:
slawkens
2018-10-16 01:42:15 +02:00
parent ff8105f809
commit 2695995211
14 changed files with 140 additions and 130 deletions

View File

@@ -4,14 +4,10 @@ if(PAGE !== 'news') {
return;
}
$query = $db->query('SELECT `thumb` FROM `' . TABLE_PREFIX . 'gallery` WHERE `id` = ' . $db->quote($config['gallery_image']));
if($query->rowCount() == 1):
$query = $db->query('SELECT `thumb` FROM `' . TABLE_PREFIX . 'gallery` WHERE `id` = ' . $db->quote($config['gallery_image_id_from_database']));
if($query->rowCount() === 1) {
$image = $query->fetch();
?>
<div id="GalleryBox" class="Themebox" style="background-image:url(<?php echo $template_path; ?>/images/themeboxes/gallery/gallerybox.gif);">
<a href="?subtopic=gallery&image=<?php echo $config['gallery_image']; ?>" >
<img id="GalleryContent" class="ThemeboxContent" src="<?php echo $image['thumb']; ?>" alt="Screenshot of the Day" />
</a>
<div class="Bottom" style="background-image:url(<?php echo $template_path; ?>/images/general/box-bottom.gif);"></div>
</div>
<?php endif; ?>
$twig->display('gallery.html.twig', array(
'image' => $image
));
}