mirror of
https://github.com/slawkens/myaac.git
synced 2025-10-14 09:44:55 +02:00
* renamed screenshots to gallery and movies to videos
This commit is contained in:
20
system/migrations/11.php
Normal file
20
system/migrations/11.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
// rename database tables
|
||||
$db->query("RENAME TABLE
|
||||
" . TABLE_PREFIX . "screenshots TO " . TABLE_PREFIX . "gallery,
|
||||
" . TABLE_PREFIX . "movies TO " . TABLE_PREFIX . "videos;");
|
||||
|
||||
// rename images dir
|
||||
if(file_exists(BASE . 'images/screenshots') && !file_exists(BASE .'images/gallery')) {
|
||||
rename(BASE . 'images/screenshots', BASE . 'images/gallery');
|
||||
}
|
||||
|
||||
// convert old database screenshots images to gallery
|
||||
$query = $db->query('SELECT `id`, `image`, `thumb` FROM `' . TABLE_PREFIX . 'gallery`;');
|
||||
foreach($query->fetchAll() as $item) {
|
||||
$db->update(TABLE_PREFIX . 'gallery', array(
|
||||
'image' => str_replace('/screenshots/', '/gallery/', $item['image']),
|
||||
'thumb' => str_replace('/screenshots/', '/gallery/', $item['thumb']),
|
||||
), array('id' => $item['id']));
|
||||
}
|
||||
?>
|
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Screenshots
|
||||
* Gallery
|
||||
*
|
||||
* @package MyAAC
|
||||
* @author Slawkens <slawkens@gmail.com>
|
||||
@@ -9,9 +9,9 @@
|
||||
* @link http://my-aac.org
|
||||
*/
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
$title = 'Screenshots';
|
||||
$title = 'Gallery';
|
||||
|
||||
$canEdit = hasFlag(FLAG_CONTENT_SCREENSHOTS) || superAdmin();
|
||||
$canEdit = hasFlag(FLAG_CONTENT_GALLERY) || superAdmin();
|
||||
if($canEdit) {
|
||||
if(function_exists('imagecreatefrompng')) {
|
||||
if (!empty($action)) {
|
||||
@@ -30,34 +30,34 @@ if($canEdit) {
|
||||
$errors = array();
|
||||
|
||||
if ($action == 'add') {
|
||||
if (Screenshots::add($comment, $image, $author, $errors))
|
||||
if (Gallery::add($comment, $image, $author, $errors))
|
||||
$comment = $image = $author = '';
|
||||
} else if ($action == 'delete') {
|
||||
Screenshots::delete($id, $errors);
|
||||
Gallery::delete($id, $errors);
|
||||
} else if ($action == 'edit') {
|
||||
if (isset($id) && !isset($name)) {
|
||||
$screenshot = Screenshots::get($id);
|
||||
$comment = $screenshot['comment'];
|
||||
$image = $screenshot['image'];
|
||||
$author = $screenshot['author'];
|
||||
$tmp = Gallery::get($id);
|
||||
$comment = $tmp['comment'];
|
||||
$image = $tmp['image'];
|
||||
$author = $tmp['author'];
|
||||
} else {
|
||||
Screenshots::update($id, $comment, $image, $author);
|
||||
Gallery::update($id, $comment, $image, $author);
|
||||
$action = $comment = $image = $author = '';
|
||||
}
|
||||
} else if ($action == 'hide') {
|
||||
Screenshots::toggleHidden($id, $errors);
|
||||
Gallery::toggleHidden($id, $errors);
|
||||
} else if ($action == 'moveup') {
|
||||
Screenshots::move($id, -1, $errors);
|
||||
Gallery::move($id, -1, $errors);
|
||||
} else if ($action == 'movedown') {
|
||||
Screenshots::move($id, 1, $errors);
|
||||
Gallery::move($id, 1, $errors);
|
||||
}
|
||||
|
||||
if (!empty($errors))
|
||||
echo $twig->render('error_box.html.twig', array('errors' => $errors));
|
||||
}
|
||||
|
||||
echo $twig->render('screenshots.form.html.twig', array(
|
||||
'link' => getLink('screenshots/' . ($action == 'edit' ? 'edit' : 'add')),
|
||||
echo $twig->render('gallery.form.html.twig', array(
|
||||
'link' => getLink('gallery/' . ($action == 'edit' ? 'edit' : 'add')),
|
||||
'action' => $action,
|
||||
'id' => isset($id) ? $id : null,
|
||||
'comment' => isset($comment) ? $comment : null,
|
||||
@@ -66,63 +66,63 @@ if($canEdit) {
|
||||
));
|
||||
}
|
||||
else
|
||||
echo 'You cannot edit/add screenshots as it seems your PHP installation doesnt have GD support enabled. Visit <a href="http://be2.php.net/manual/en/image.installation.php">PHP Manual</a> for more info.';
|
||||
echo 'You cannot edit/add gallery items as it seems your PHP installation doesnt have GD support enabled. Visit <a href="http://be2.php.net/manual/en/image.installation.php">PHP Manual</a> for more info.';
|
||||
}
|
||||
|
||||
if(isset($_GET['screenshot']))
|
||||
if(isset($_GET['image']))
|
||||
{
|
||||
$screenshot = $db->query('SELECT * FROM `' . TABLE_PREFIX . 'screenshots` WHERE `id` = ' . $db->quote($_GET['screenshot']) . ' ORDER by `ordering` LIMIT 1;');
|
||||
if($screenshot->rowCount() == 1)
|
||||
$screenshot = $screenshot->fetch();
|
||||
$image = $db->query('SELECT * FROM `' . TABLE_PREFIX . 'gallery` WHERE `id` = ' . $db->quote($_GET['image']) . ' ORDER by `ordering` LIMIT 1;');
|
||||
if($image->rowCount() == 1)
|
||||
$image = $image->fetch();
|
||||
else
|
||||
{
|
||||
echo 'Screenshot with this name does not exists.';
|
||||
echo 'Image with this name does not exists.';
|
||||
return;
|
||||
}
|
||||
|
||||
$previous_screenshot = $db->query('SELECT * FROM `' . TABLE_PREFIX . 'screenshots` WHERE `id` = ' . $db->quote($screenshot['id'] - 1) . ' ORDER by `ordering`;');
|
||||
if($previous_screenshot->rowCount() == 1)
|
||||
$previous_screenshot = $previous_screenshot->fetch();
|
||||
$previous_image = $db->query('SELECT * FROM `' . TABLE_PREFIX . 'gallery` WHERE `id` = ' . $db->quote($image['id'] - 1) . ' ORDER by `ordering`;');
|
||||
if($previous_image->rowCount() == 1)
|
||||
$previous_image = $previous_image->fetch();
|
||||
else
|
||||
$previous_screenshot = NULL;
|
||||
$previous_image = NULL;
|
||||
|
||||
$next_screenshot = $db->query('SELECT * FROM `' . TABLE_PREFIX . 'screenshots` WHERE `id` = ' . $db->quote($screenshot['id'] + 1) . ' ORDER by `ordering`;');
|
||||
if($next_screenshot->rowCount() == 1)
|
||||
$next_screenshot = $next_screenshot->fetch();
|
||||
$next_image = $db->query('SELECT * FROM `' . TABLE_PREFIX . 'gallery` WHERE `id` = ' . $db->quote($image['id'] + 1) . ' ORDER by `ordering`;');
|
||||
if($next_image->rowCount() == 1)
|
||||
$next_image = $next_image->fetch();
|
||||
else
|
||||
$next_screenshot = NULL;
|
||||
$next_image = NULL;
|
||||
|
||||
echo $twig->render('screenshots.get.html.twig', array(
|
||||
'previous' => $previous_screenshot ? $previous_screenshot['id'] : null,
|
||||
'next' => $next_screenshot ? $next_screenshot['id'] : null,
|
||||
'screenshot' => $screenshot
|
||||
echo $twig->render('gallery.get.html.twig', array(
|
||||
'previous' => $previous_image ? $previous_image['id'] : null,
|
||||
'next' => $next_image ? $next_image['id'] : null,
|
||||
'image' => $image
|
||||
));
|
||||
return;
|
||||
}
|
||||
|
||||
$screenshots =
|
||||
$images =
|
||||
$db->query('SELECT `id`, `comment`, `image`, `author`, `thumb`' .
|
||||
($canEdit ? ', `hidden`, `ordering`' : '') .
|
||||
' FROM `' . TABLE_PREFIX . 'screenshots`' .
|
||||
' FROM `' . TABLE_PREFIX . 'gallery`' .
|
||||
(!$canEdit ? ' WHERE `hidden` != 1' : '') .
|
||||
' ORDER BY `ordering`;');
|
||||
|
||||
$last = $screenshots->rowCount();
|
||||
$last = $images->rowCount();
|
||||
if(!$last)
|
||||
{
|
||||
?>
|
||||
There are no screenshots added to gallery yet.
|
||||
There are no images added to gallery yet.
|
||||
<?php
|
||||
return;
|
||||
}
|
||||
|
||||
echo $twig->render('screenshots.html.twig', array(
|
||||
'screenshots' => $screenshots,
|
||||
echo $twig->render('gallery.html.twig', array(
|
||||
'images' => $images,
|
||||
'last' => $last,
|
||||
'canEdit' => $canEdit
|
||||
));
|
||||
|
||||
class Screenshots
|
||||
class Gallery
|
||||
{
|
||||
static public function add($comment, $image, $author, &$errors)
|
||||
{
|
||||
@@ -132,7 +132,7 @@ class Screenshots
|
||||
$query =
|
||||
$db->query(
|
||||
'SELECT `ordering`' .
|
||||
' FROM `' . TABLE_PREFIX . 'screenshots`' .
|
||||
' FROM `' . TABLE_PREFIX . 'gallery`' .
|
||||
' ORDER BY `ordering`' . ' DESC LIMIT 1'
|
||||
);
|
||||
|
||||
@@ -144,9 +144,9 @@ class Screenshots
|
||||
|
||||
$pathinfo = pathinfo($image);
|
||||
$extension = strtolower($pathinfo['extension']);
|
||||
$thumb_filename = 'images/screenshots/' . $pathinfo['filename'] . '_thumb.' . $extension;
|
||||
$filename = 'images/screenshots/' . $pathinfo['filename'] . '.' . $extension;
|
||||
if($db->insert(TABLE_PREFIX . 'screenshots', array(
|
||||
$thumb_filename = 'images/gallery/' . $pathinfo['filename'] . '_thumb.' . $extension;
|
||||
$filename = 'images/gallery/' . $pathinfo['filename'] . '.' . $extension;
|
||||
if($db->insert(TABLE_PREFIX . 'gallery', array(
|
||||
'comment' => $comment,
|
||||
'image' => $filename, 'author' => $author,
|
||||
'thumb' => $thumb_filename,
|
||||
@@ -163,7 +163,7 @@ class Screenshots
|
||||
|
||||
static public function get($id) {
|
||||
global $db;
|
||||
return $db->select(TABLE_PREFIX . 'screenshots', array('id' => $id));
|
||||
return $db->select(TABLE_PREFIX . 'gallery', array('id' => $id));
|
||||
}
|
||||
|
||||
static public function update($id, $comment, $image, $author) {
|
||||
@@ -171,9 +171,9 @@ class Screenshots
|
||||
|
||||
$pathinfo = pathinfo($image);
|
||||
$extension = strtolower($pathinfo['extension']);
|
||||
$filename = 'images/screenshots/' . $pathinfo['filename'] . '.' . $extension;
|
||||
$filename = 'images/gallery/' . $pathinfo['filename'] . '.' . $extension;
|
||||
|
||||
if($db->update(TABLE_PREFIX . 'screenshots', array(
|
||||
if($db->update(TABLE_PREFIX . 'gallery', array(
|
||||
'comment' => $comment,
|
||||
'image' => $filename, 'author' => $author),
|
||||
array('id' => $id)
|
||||
@@ -189,9 +189,9 @@ class Screenshots
|
||||
if(isset($id))
|
||||
{
|
||||
if(self::get($id) !== false)
|
||||
$db->delete(TABLE_PREFIX . 'screenshots', array('id' => $id));
|
||||
$db->delete(TABLE_PREFIX . 'gallery', array('id' => $id));
|
||||
else
|
||||
$errors[] = 'Screenshot with id ' . $id . ' does not exists.';
|
||||
$errors[] = 'Image with id ' . $id . ' does not exists.';
|
||||
}
|
||||
else
|
||||
$errors[] = 'id not set';
|
||||
@@ -206,9 +206,9 @@ class Screenshots
|
||||
{
|
||||
$query = self::get($id);
|
||||
if($query !== false)
|
||||
$db->update(TABLE_PREFIX . 'screenshots', array('hidden' => ($query['hidden'] == 1 ? 0 : 1)), array('id' => $id));
|
||||
$db->update(TABLE_PREFIX . 'gallery', array('hidden' => ($query['hidden'] == 1 ? 0 : 1)), array('id' => $id));
|
||||
else
|
||||
$errors[] = 'Screenshot with id ' . $id . ' does not exists.';
|
||||
$errors[] = 'Image with id ' . $id . ' does not exists.';
|
||||
}
|
||||
else
|
||||
$errors[] = 'id not set';
|
||||
@@ -223,14 +223,14 @@ class Screenshots
|
||||
if($query !== false)
|
||||
{
|
||||
$ordering = $query['ordering'] + $i;
|
||||
$old_record = $db->select(TABLE_PREFIX . 'screenshots', array('ordering' => $ordering));
|
||||
$old_record = $db->select(TABLE_PREFIX . 'gallery', array('ordering' => $ordering));
|
||||
if($old_record !== false)
|
||||
$db->update(TABLE_PREFIX . 'screenshots', array('ordering' => $query['ordering']), array('ordering' => $ordering));
|
||||
$db->update(TABLE_PREFIX . 'gallery', array('ordering' => $query['ordering']), array('ordering' => $ordering));
|
||||
|
||||
$db->update(TABLE_PREFIX . 'screenshots', array('ordering' => $ordering), array('id' => $id));
|
||||
$db->update(TABLE_PREFIX . 'gallery', array('ordering' => $ordering), array('id' => $id));
|
||||
}
|
||||
else
|
||||
$errors[] = 'Screenshot with id ' . $id . ' does not exists.';
|
||||
$errors[] = 'Image with id ' . $id . ' does not exists.';
|
||||
|
||||
return !count($errors);
|
||||
}
|
||||
@@ -290,7 +290,7 @@ class Screenshots
|
||||
{
|
||||
$pathinfo = pathinfo($file);
|
||||
$extension = strtolower($pathinfo['extension']);
|
||||
$thumb_filename = 'images/screenshots/' . $pathinfo['filename'] . '_thumb.' . $extension;
|
||||
$thumb_filename = 'images/gallery/' . $pathinfo['filename'] . '_thumb.' . $extension;
|
||||
|
||||
if(!self::resize($file, 170, 110, $thumb_filename, $errors))
|
||||
return false;
|
||||
@@ -300,9 +300,9 @@ class Screenshots
|
||||
{
|
||||
$query = self::get($id);
|
||||
if($query !== false)
|
||||
$db->update(TABLE_PREFIX . 'screenshots', array('thumb' => $thumb_filename), array('id' => $id));
|
||||
$db->update(TABLE_PREFIX . 'gallery', array('thumb' => $thumb_filename), array('id' => $id));
|
||||
else
|
||||
$errors[] = 'Screenshot with id ' . $id . ' does not exists.';
|
||||
$errors[] = 'Image with id ' . $id . ' does not exists.';
|
||||
}
|
||||
else
|
||||
$errors[] = 'id not set';
|
@@ -1,28 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Movies
|
||||
*
|
||||
* @package MyAAC
|
||||
* @author Slawkens <slawkens@gmail.com>
|
||||
* @copyright 2017 MyAAC
|
||||
* @version 0.5.1
|
||||
* @link http://my-aac.org
|
||||
*/
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
$title = 'Movies';
|
||||
|
||||
$movies = $db->query('SELECT * FROM `' . TABLE_PREFIX . 'movies` ORDER BY `ordering`;');
|
||||
if(!$movies->rowCount())
|
||||
{
|
||||
?>
|
||||
There are no movies added yet.
|
||||
<?php
|
||||
if(admin())
|
||||
echo ' You can add new movies in phpmyadmin under ' . TABLE_PREFIX . 'movies table.';
|
||||
return;
|
||||
}
|
||||
|
||||
echo $twig->render('movies.html.twig', array(
|
||||
'movies' => $movies
|
||||
));
|
||||
?>
|
28
system/pages/videos.php
Normal file
28
system/pages/videos.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
/**
|
||||
* Videos
|
||||
*
|
||||
* @package MyAAC
|
||||
* @author Slawkens <slawkens@gmail.com>
|
||||
* @copyright 2017 MyAAC
|
||||
* @version 0.5.1
|
||||
* @link http://my-aac.org
|
||||
*/
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
$title = 'Videos';
|
||||
|
||||
$videos = $db->query('SELECT * FROM `' . TABLE_PREFIX . 'videos` ORDER BY `ordering`;');
|
||||
if(!$videos->rowCount())
|
||||
{
|
||||
?>
|
||||
There are no videos added yet.
|
||||
<?php
|
||||
if(admin())
|
||||
echo ' You can add new videos in phpmyadmin under ' . TABLE_PREFIX . 'videos table.';
|
||||
return;
|
||||
}
|
||||
|
||||
echo $twig->render('videos.html.twig', array(
|
||||
'videos' => $videos
|
||||
));
|
||||
?>
|
@@ -79,11 +79,14 @@ $template['link_account_logout'] = getLink('account/logout');
|
||||
|
||||
$template['link_news_archive'] = getLink('news/archive');
|
||||
|
||||
$links = array('news', 'changelog', 'rules', 'downloads', 'characters', 'online', 'highscores', 'powergamers', 'lastkills', 'houses', 'guilds', 'wars', 'polls', 'bans', 'team', 'creatures', 'spells', 'commands', 'experienceStages', 'freeHouses', 'screenshots', 'movies', 'serverInfo', 'experienceTable', 'faq', 'points', 'gifts', 'bugtracker');
|
||||
$links = array('news', 'changelog', 'rules', 'downloads', 'characters', 'online', 'highscores', 'powergamers', 'lastkills', 'houses', 'guilds', 'wars', 'polls', 'bans', 'team', 'creatures', 'spells', 'commands', 'experienceStages', 'freeHouses', 'serverInfo', 'experienceTable', 'faq', 'points', 'gifts', 'bugtracker');
|
||||
foreach($links as $link) {
|
||||
$template['link_' . $link] = getLink($link);
|
||||
$template['link_' . $link] = getLink($link);
|
||||
}
|
||||
|
||||
$template['link_screenshots'] = getLink('gallery');
|
||||
$template['link_movies'] = getLink('videos');
|
||||
|
||||
$template['link_gifts_history'] = getLink('gifts', 'history');
|
||||
if($config['forum'] != '')
|
||||
{
|
||||
|
@@ -4,7 +4,7 @@
|
||||
{% endif %}
|
||||
<table width="100%" border="0" cellspacing="1" cellpadding="4">
|
||||
<tr>
|
||||
<td bgcolor="{{ config.vdarkborder }}" class="white"><b>{% if action == 'edit' %}Edit{% else %}Add{% endif %} screenshot</b></td>
|
||||
<td bgcolor="{{ config.vdarkborder }}" class="white"><b>{% if action == 'edit' %}Edit{% else %}Add{% endif %} image</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="{{ config.darkborder }}">
|
15
system/templates/gallery.get.html.twig
Normal file
15
system/templates/gallery.get.html.twig
Normal file
@@ -0,0 +1,15 @@
|
||||
<div style="position: relative; height: 15px; width: 100%;">
|
||||
{% if next is not null %}
|
||||
<a style="float: right;" href="?subtopic=gallery&image={{ next }}" >next <img src="images/arrow_right.gif" width=15 height=11 border=0 ></a>
|
||||
{% endif %}
|
||||
{% if previous is not null %}
|
||||
<a style="position: absolute;" href="?subtopic=gallery&image={{ previous }}"><img src="images/arrow_left.gif" width=15 height=11 border=0 > previous</a>
|
||||
{% endif %}
|
||||
<div style="position: absolute; width: 80%; margin-left: 10%; margin-right: 10%; text-align: center;">
|
||||
<a href="{{ getLink('gallery') }}" ><img src="images/arrow_up.gif" width=11 height=15 border=0 > back</a>
|
||||
</div>
|
||||
</div>
|
||||
<div style="position: relative; text-align: center; top: 20px; ">
|
||||
<img src="{{ image.image }}" />
|
||||
<div style="margin-top: 15px; margin-bottom: 35px; ">{{ image.comment }}</div>
|
||||
</div>
|
38
system/templates/gallery.html.twig
Normal file
38
system/templates/gallery.html.twig
Normal file
@@ -0,0 +1,38 @@
|
||||
Click on the image to enlarge.<br/><br/>
|
||||
{% set i = 0 %}
|
||||
{% for item in gallery %}
|
||||
{% set i = i + 1 %}
|
||||
<table>
|
||||
<tr>
|
||||
<td style="height: 120px;" >
|
||||
<a href="?subtopic=gallery&image={{ item.id }}" >
|
||||
<img src="{{ item.thumb }}" border="0" />
|
||||
</a>
|
||||
</td>
|
||||
<td>{{ item.comment }}</td>
|
||||
{% if canEdit %}
|
||||
<td>
|
||||
<a href="?subtopic=gallery&action=edit&id={{ item.id }}" title="Edit">
|
||||
<img src="images/edit.png"/>Edit
|
||||
</a>
|
||||
<a id="delete" href="?subtopic=gallery&action=delete&id={{ item.id }}" onclick="return confirm('Are you sure?');" title="Delete">
|
||||
<img src="images/del.png"/>Delete
|
||||
</a>
|
||||
<a href="?subtopic=gallery&action=hide&id={{ item.id }}" title="{% if item.hidden != 1 %}Hide{% else %}Show{% endif %}">
|
||||
<img src="images/{% if item.hidden != 1 %}success{% else %}error{% endif %}.png"/>{% if item.hidden != 1 %}Hide{% else %}Show{% endif %}
|
||||
</a>
|
||||
{% if i != 1 %}
|
||||
<a href="?subtopic=gallery&action=moveup&id={{ item.id }}" title="Move up">
|
||||
<img src="images/icons/arrow_up.gif"/>Move up
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if i != last %}
|
||||
<a href="?subtopic=gallery&action=movedown&id={{ item.id }}" title="Move down">
|
||||
<img src="images/icons/arrow_down.gif"/>Move down
|
||||
</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
</table>
|
||||
{% endfor %}
|
@@ -1,7 +0,0 @@
|
||||
<div style="text-align: center;">
|
||||
{% for movie in movies %}
|
||||
<h2>{{ movie.title }}</h2>
|
||||
Author: {{ movie.author }}<br/>
|
||||
<iframe width="560" height="315" src="https://www.youtube.com/embed/{{ movie.youtube_id }}" frameborder="0" allowfullscreen></iframe><br/><br/>
|
||||
{% endfor %}
|
||||
</div>
|
@@ -1,16 +0,0 @@
|
||||
<div style="position: relative; height: 15px; width: 100%;">
|
||||
<?php if($next_screenshot): ?>
|
||||
{% if next is not null %}
|
||||
<a style="float: right;" href="?subtopic=screenshots&screenshot={{ next }}" >next <img src="images/arrow_right.gif" width=15 height=11 border=0 ></a>
|
||||
{% endif %}
|
||||
{% if previous is not null %}
|
||||
<a style="position: absolute;" href="?subtopic=screenshots&screenshot={{ previous }}"><img src="images/arrow_left.gif" width=15 height=11 border=0 > previous</a>
|
||||
{% endif %}
|
||||
<div style="position: absolute; width: 80%; margin-left: 10%; margin-right: 10%; text-align: center;">
|
||||
<a href="?subtopic=screenshots" ><img src="images/arrow_up.gif" width=11 height=15 border=0 > back</a>
|
||||
</div>
|
||||
</div>
|
||||
<div style="position: relative; text-align: center; top: 20px; ">
|
||||
<img src="{{ screenshot.image }}" />
|
||||
<div style="margin-top: 15px; margin-bottom: 35px; ">{{ screenshot.comment }}</div>
|
||||
</div>
|
@@ -1,38 +0,0 @@
|
||||
Click on the image to enlarge.<br/><br/>
|
||||
{% set i = 0 %}
|
||||
{% for screenshot in screenshots %}
|
||||
{% set i = i + 1 %}
|
||||
<table>
|
||||
<tr>
|
||||
<td style="height: 120px;" >
|
||||
<a href="?subtopic=screenshots&screenshot={{ screenshot.id }}" >
|
||||
<img src="{{ screenshot.thumb }}" border="0" />
|
||||
</a>
|
||||
</td>
|
||||
<td>{{ screenshot.comment }}</td>
|
||||
{% if canEdit %}
|
||||
<td>
|
||||
<a href="?subtopic=screenshots&action=edit&id={{ screenshot.id }}" title="Edit">
|
||||
<img src="images/edit.png"/>Edit
|
||||
</a>
|
||||
<a id="delete" href="?subtopic=screenshots&action=delete&id={{ screenshot.id }}" onclick="return confirm('Are you sure?');" title="Delete">
|
||||
<img src="images/del.png"/>Delete
|
||||
</a>
|
||||
<a href="?subtopic=screenshots&action=hide&id={{ screenshot.id }}" title="{% if screenshot.hidden != 1 %}Hide{% else %}Show{% endif %}">
|
||||
<img src="images/{% if screenshot.hidden != 1 %}success{% else %}error{% endif %}.png"/>{% if screenshot.hidden != 1 %}Hide{% else %}Show{% endif %}
|
||||
</a>
|
||||
{% if i != 1 %}
|
||||
<a href="?subtopic=screenshots&action=moveup&id={{ screenshot.id }}" title="Move up">
|
||||
<img src="images/icons/arrow_up.gif"/>Move up
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if i != last %}
|
||||
<a href="?subtopic=screenshots&action=movedown&id={{ screenshot.id }}" title="Move down">
|
||||
<img src="images/icons/arrow_down.gif"/>Move down
|
||||
</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
</table>
|
||||
{% endfor %}
|
7
system/templates/videos.html.twig
Normal file
7
system/templates/videos.html.twig
Normal file
@@ -0,0 +1,7 @@
|
||||
<div style="text-align: center;">
|
||||
{% for video in videos %}
|
||||
<h2>{{ video.title }}</h2>
|
||||
Author: {{ video.author }}<br/>
|
||||
<iframe width="560" height="315" src="https://www.youtube.com/embed/{{ video.youtube_id }}" frameborder="0" allowfullscreen></iframe><br/><br/>
|
||||
{% endfor %}
|
||||
</div>
|
Reference in New Issue
Block a user