From c2574235ea335c1a12ce66324b15b790d3ea3108 Mon Sep 17 00:00:00 2001 From: slawkens1 Date: Fri, 5 Jan 2018 23:48:08 +0100 Subject: [PATCH] * forum: show image in full screen on click * do not expand the whole site cause of big posted forum images, instead show a small image and allow full size on click --- system/libs/forum.php | 2 +- system/pages/forum/new_post.php | 2 +- system/pages/forum/show_thread.php | 2 +- system/templates/forum.fullscreen.html.twig | 41 +++++++++++++++++++++ 4 files changed, 44 insertions(+), 3 deletions(-) create mode 100644 system/templates/forum.fullscreen.html.twig diff --git a/system/libs/forum.php b/system/libs/forum.php index b5588992..126663bc 100644 --- a/system/libs/forum.php +++ b/system/libs/forum.php @@ -221,7 +221,7 @@ class Forum // TODO: [poll] tag '#\[color=(.*?)\](.*?)\[/color\]#si' => ($xhtml ? '\\2' : '\\2'), - '#\[img\](.*?)\[/img\]#si' => ($xhtml ? '' : ''), + '#\[img\](.*?)\[/img\]#si' => ($xhtml ? '' : ''), '#\[url=(.*?)\](.*?)\[/url\]#si' => '\\2', // '#\[email\](.*?)\[/email\]#si' => '\\1', '#\[code\](.*?)\[/code\]#si' => '\\1', diff --git a/system/pages/forum/new_post.php b/system/pages/forum/new_post.php index e26ba1ef..035fbd7d 100644 --- a/system/pages/forum/new_post.php +++ b/system/pages/forum/new_post.php @@ -116,4 +116,4 @@ if(Forum::canPost($account_logged)) else echo "Your account is banned, deleted or you don't have any player with level " . $config['forum_level_required'] . " on your account. You can't post."; -?> \ No newline at end of file +echo $twig->render('forum.fullscreen.html.twig'); \ No newline at end of file diff --git a/system/pages/forum/show_thread.php b/system/pages/forum/show_thread.php index c322984f..317557a6 100644 --- a/system/pages/forum/show_thread.php +++ b/system/pages/forum/show_thread.php @@ -89,4 +89,4 @@ foreach($threads as $thread) echo ''; } echo '
'; -?> \ No newline at end of file +echo $twig->render('forum.fullscreen.html.twig'); diff --git a/system/templates/forum.fullscreen.html.twig b/system/templates/forum.fullscreen.html.twig new file mode 100644 index 00000000..c3d83ffd --- /dev/null +++ b/system/templates/forum.fullscreen.html.twig @@ -0,0 +1,41 @@ +
+ +
+ + \ No newline at end of file