mirror of
https://github.com/slawkens/myaac.git
synced 2025-10-18 19:53:27 +02:00
Move tibiacom boxes to Twig templates
Yes they are looking and working same as before ;)
This commit is contained in:
@@ -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
|
||||
));
|
||||
}
|
||||
|
Reference in New Issue
Block a user