Visman %!s(int64=7) %!d(string=hai) anos
pai
achega
372521b5ff

+ 2 - 6
app/Core/View.php

@@ -32,14 +32,10 @@ class View extends Dirk
     protected function compileStatements($value)
     protected function compileStatements($value)
     {
     {
         return preg_replace_callback(
         return preg_replace_callback(
-            '/[ \t]*+\B@(\w+)([ \t]*)(\( ( (?>[^()]+) | (?3) )* \))?/x',
+            '/[ \t]*+\B@(\w+)(?: [ \t]*( \( ( (?>[^()]+) | (?2) )* \) ) )?/x',
             function($match) {
             function($match) {
                 if (method_exists($this, $method = 'compile' . ucfirst($match[1]))) {
                 if (method_exists($this, $method = 'compile' . ucfirst($match[1]))) {
-                    if (isset($match[3])) {
-                        return $this->$method($match[3]);
-                    } else {
-                        return $this->$method('') . $match[2];
-                    }
+                    return isset($match[2]) ? $this->$method($match[2]) : $this->$method('');
                 } else {
                 } else {
                     return $match[0];
                     return $match[0];
                 }
                 }

+ 24 - 5
app/Models/Page.php

@@ -97,7 +97,7 @@ abstract class Page extends Model
 
 
         if ($user->g_read_board == '1' && $this->c->config->o_additional_navlinks != '') {
         if ($user->g_read_board == '1' && $this->c->config->o_additional_navlinks != '') {
             // position|name|link[|id]\n
             // position|name|link[|id]\n
-            if (preg_match_all('%^(\d+)\|([^\|\n\r]+)\|([^\|\n\r]+)(?:\|([^\|\n\r]+))?$%m', $this->c->config->o_additional_navlinks."\n", $matches)) {
+            if (preg_match_all('%^(\d+)\|([^\|\n\r]+)\|([^\|\n\r]+)(?:\|([^\|\n\r]+))?$%m', $this->c->config->o_additional_navlinks . "\n", $matches)) {
                $k = count($matches[0]);
                $k = count($matches[0]);
                for ($i = 0; $i < $k; ++$i) {
                for ($i = 0; $i < $k; ++$i) {
                    if (empty($matches[4][$i])) {
                    if (empty($matches[4][$i])) {
@@ -153,16 +153,35 @@ abstract class Page extends Model
      */
      */
     protected function getpageHeaders()
     protected function getpageHeaders()
     {
     {
-        $headers = ['link rel="stylesheet" type="text/css" href="' . $this->c->PUBLIC_URL . '/style/' . $this->c->user->style . '/style.css' . '"'];
+        $headers = [['link', 'rel="stylesheet" type="text/css" href="' . $this->c->PUBLIC_URL . '/style/' . $this->c->user->style . '/style.css' . '"']];
+        if ($this->canonical) {
+            $headers[] = ['link', 'rel="canonical" href="' . $this->canonical . '"'];
+        }
         if ($this->robots) {
         if ($this->robots) {
-            $headers[] = 'meta name="robots" content="' . $this->robots . '"';
+            $headers[] = ['meta', 'name="robots" content="' . $this->robots . '"'];
         }
         }
-        if ($this->canonical) {
-            $headers[] = 'link rel="canonical" href="' . $this->canonical . '"';
+        if (isset($this->a['pageHeaders']['style'])) {
+            foreach ($this->a['pageHeaders']['style'] as $style) {
+                $headers[] = ['style', $style];
+            }
         }
         }
         return $headers;
         return $headers;
     }
     }
 
 
+    /**
+     * Добавляет стиль на страницу
+     * 
+     * @param string $name
+     * @param string $val
+     * 
+     * @return Page
+     */
+    public function addStyle($name, $val) 
+    {
+        $this->a['pageHeaders']['style'][$name] = $val;
+        return $this;
+    }
+
     /**
     /**
      * Возвращает HTTP заголовки страницы
      * Возвращает HTTP заголовки страницы
      * $this->httpHeaders
      * $this->httpHeaders

+ 41 - 6
app/Models/Pages/Admin/Statistics.php

@@ -9,7 +9,7 @@ class Statistics extends Admin
     /**
     /**
      * phpinfo
      * phpinfo
      * 
      * 
-     * @return Page|null
+     * @return Page
      */
      */
     public function info()
     public function info()
     {
     {
@@ -18,8 +18,38 @@ class Statistics extends Admin
             $this->c->Message->message('PHPinfo disabled message', true, 200);
             $this->c->Message->message('PHPinfo disabled message', true, 200);
         }
         }
 
 
+        ob_start();
         phpinfo();
         phpinfo();
-        exit; //????
+        $page = ob_get_clean();
+        
+        if (preg_match('%<body[^>]*>(.*)</body[^>]*>%is', $page, $matches)) {
+            $phpinfo = $matches[1];
+            if (preg_match('%<style[^>]*>(.*?)</style[^>]*>%is', $page, $matches)) {
+                $style = preg_replace_callback(
+                    '%(\S[^{]*)({[^}]+})%', 
+                    function($match) {
+                        $result = array_map(
+                            function($val) {
+                                $val = str_replace('body', '.f-phpinfo-div', $val, $count);
+                                return $count ? $val : '.f-phpinfo-div ' . $val;
+                            }, 
+                            explode(',', $match[1])
+                        );
+                        return implode(', ', $result) . $match[2];
+                    }, 
+                    $matches[1]
+                );
+                $this->addStyle('phpinfo', $style);
+            }
+        } else {
+            $phpinfo = '- - -';
+        }
+
+        $this->nameTpl = 'admin/phpinfo';
+        $this->titles  = 'phpinfo()';
+        $this->phpinfo = $phpinfo;
+        
+        return $this;
     }
     }
 
 
     /**
     /**
@@ -70,15 +100,20 @@ class Statistics extends Admin
 
 
         // Check for the existence of various PHP opcode caches/optimizers
         // Check for the existence of various PHP opcode caches/optimizers
         if (ini_get('opcache.enable') && function_exists('opcache_invalidate')) {
         if (ini_get('opcache.enable') && function_exists('opcache_invalidate')) {
-            $this->accelerator = '<a href="https://secure.php.net/opcache/">Zend OPcache</a>';
+            $this->accelerator = 'Zend OPcache';
+            $this->linkAcc     = 'https://secure.php.net/opcache/';
         } elseif (ini_get('wincache.fcenabled')) {
         } elseif (ini_get('wincache.fcenabled')) {
-            $this->accelerator = '<a href="https://secure.php.net/wincache/">Windows Cache for PHP</a>';
+            $this->accelerator = 'Windows Cache for PHP';
+            $this->linkAcc     = 'https://secure.php.net/wincache/';
         } elseif (ini_get('apc.enabled') && function_exists('apc_delete_file')) {
         } elseif (ini_get('apc.enabled') && function_exists('apc_delete_file')) {
-            $this->accelerator = '<a href="https://secure.php.net/apc/">Alternative PHP Cache (APC)</a>'; //???? частичная эмуляция APCu
+            $this->accelerator = 'Alternative PHP Cache (APC)'; //???? частичная эмуляция APCu
+            $this->linkAcc     = 'https://secure.php.net/apc/';
         } elseif (ini_get('xcache.cacher')) {
         } elseif (ini_get('xcache.cacher')) {
-            $this->accelerator = '<a href="https://xcache.lighttpd.net/">XCache</a>';
+            $this->accelerator = 'XCache';
+            $this->linkAcc     = 'https://xcache.lighttpd.net/';
         } else {
         } else {
             $this->accelerator = __('NA');
             $this->accelerator = __('NA');
+            $this->linkAcc     = null;
         }
         }
 
 
         return $this;
         return $this;

+ 5 - 1
app/Models/Pages/CrumbTrait.php

@@ -31,7 +31,11 @@ trait CrumbTrait
                         $name = 'no name';
                         $name = 'no name';
                     }
                     }
 
 
-                    $this->titles = $name;
+                    if ($arg->page > 1) {
+                        $this->titles = $name . ' ' . __('Page', $arg->page);
+                    } else {
+                        $this->titles = $name;
+                    }
                     $crumbs[] = [$arg->link, $name, $active];
                     $crumbs[] = [$arg->link, $name, $active];
                     $active = null;
                     $active = null;
                     $arg = $arg->parent;
                     $arg = $arg->parent;

+ 11 - 3
app/Models/Pages/Post.php

@@ -210,8 +210,9 @@ class Post extends Page
             $newLength = mb_strlen($lastPost->message . $v->message, 'UTF-8');
             $newLength = mb_strlen($lastPost->message . $v->message, 'UTF-8');
 
 
             if ($newLength < $this->c->MAX_POST_SIZE - 100) {
             if ($newLength < $this->c->MAX_POST_SIZE - 100) {
-                $lastPost->message = $lastPost->message . "\n[after=" . ($now - $topic->last_post) . "]\n" . $v->message; //????
-                $lastPost->posted  = $lastPost->posted + 1; //???? прибаляем 1 секунду для появления в новых //????
+                $lastPost->message   = $lastPost->message . "\n[after=" . ($now - $topic->last_post) . "]\n" . $v->message; //????
+                $lastPost->edited    = $now;
+                $lastPost->edited_by = $username;
 
 
                 $lastPost->update();
                 $lastPost->update();
             } else {
             } else {
@@ -484,6 +485,7 @@ class Post extends Page
         $vars = isset($args['_vars']) ? $args['_vars'] : null;
         $vars = isset($args['_vars']) ? $args['_vars'] : null;
         unset($args['_vars']);
         unset($args['_vars']);
 
 
+        $autofocus = true;
         $form = [
         $form = [
             'action' => $this->c->Router->link($marker, $args),
             'action' => $this->c->Router->link($marker, $args),
             'hidden' => [
             'hidden' => [
@@ -506,6 +508,7 @@ class Post extends Page
                 'required'  => true,
                 'required'  => true,
                 'pattern'   => '^.{2,25}$',
                 'pattern'   => '^.{2,25}$',
                 'value'     => isset($vars['username']) ? $vars['username'] : null,
                 'value'     => isset($vars['username']) ? $vars['username'] : null,
+                'autofocus' => $autofocus,
             ];
             ];
             $fieldset['email'] = [
             $fieldset['email'] = [
                 'dl'        => 't2',
                 'dl'        => 't2',
@@ -516,6 +519,7 @@ class Post extends Page
                 'pattern'   => '.+@.+',
                 'pattern'   => '.+@.+',
                 'value'     => isset($vars['email']) ? $vars['email'] : null,
                 'value'     => isset($vars['email']) ? $vars['email'] : null,
             ];
             ];
+            $autofocus = null;
         }
         }
 
 
         if ($editSubject) {
         if ($editSubject) {
@@ -525,7 +529,9 @@ class Post extends Page
                 'title'     => __('Subject'),
                 'title'     => __('Subject'),
                 'required'  => true,
                 'required'  => true,
                 'value'     => isset($vars['subject']) ? $vars['subject'] : null,
                 'value'     => isset($vars['subject']) ? $vars['subject'] : null,
+                'autofocus' => $autofocus,
             ];
             ];
+            $autofocus = null;
         }
         }
 
 
         $fieldset['message'] = [
         $fieldset['message'] = [
@@ -539,11 +545,13 @@ class Post extends Page
                 ['link', __('img tag'), __($this->c->config->p_message_bbcode == '1' && $this->c->config->p_message_img_tag == '1' ? 'on' : 'off')],
                 ['link', __('img tag'), __($this->c->config->p_message_bbcode == '1' && $this->c->config->p_message_img_tag == '1' ? 'on' : 'off')],
                 ['link', __('Smilies'), __($this->c->config->o_smilies == '1' ? 'on' : 'off')],
                 ['link', __('Smilies'), __($this->c->config->o_smilies == '1' ? 'on' : 'off')],
             ],
             ],
+            'autofocus' => $autofocus,
         ];
         ];
         $form['sets'][] = [
         $form['sets'][] = [
             'fields' => $fieldset,
             'fields' => $fieldset,
         ];
         ];
-
+        $autofocus = null;
+        
         $fieldset = [];
         $fieldset = [];
         if ($this->c->user->isAdmin || $this->c->user->isModerator($model)) {
         if ($this->c->user->isAdmin || $this->c->user->isModerator($model)) {
             if ($editSubject) {
             if ($editSubject) {

+ 2 - 2
app/Models/Topic/CalcStat.php

@@ -29,7 +29,7 @@ class CalcStat extends MethodModel
 
 
         $num_replies = $this->c->DB->query($sql, $vars)->fetchColumn();
         $num_replies = $this->c->DB->query($sql, $vars)->fetchColumn();
 
 
-        $sql = 'SELECT p.id AS last_post_id, p.poster AS last_poster, p.posted AS last_post
+        $sql = 'SELECT p.id AS last_post_id, p.poster AS last_poster, p.posted, p.edited
                 FROM ::posts AS p
                 FROM ::posts AS p
                 WHERE p.topic_id=?i:tid
                 WHERE p.topic_id=?i:tid
                 ORDER BY p.id DESC
                 ORDER BY p.id DESC
@@ -41,7 +41,7 @@ class CalcStat extends MethodModel
         $this->model->num_replies  = $num_replies;
         $this->model->num_replies  = $num_replies;
         $this->model->last_post_id = $result['last_post_id'];
         $this->model->last_post_id = $result['last_post_id'];
         $this->model->last_poster  = $result['last_poster'];
         $this->model->last_poster  = $result['last_poster'];
-        $this->model->last_post    = $result['last_post'];
+        $this->model->last_post    = (int) $result['edited'] > $result['posted'] ? (int) $result['edited'] : $result['posted'];
 
 
         return $this->model;
         return $this->model;
     }
     }

+ 7 - 1
app/functions.php

@@ -1,5 +1,10 @@
 <?php
 <?php
 
 
+function _e($val)
+{
+    return htmlspecialchars($val, ENT_HTML5 | ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8');
+}
+
 function __($data, ...$args)
 function __($data, ...$args)
 {
 {
     static $lang;
     static $lang;
@@ -24,8 +29,9 @@ function __($data, ...$args)
     if (empty($args)) {
     if (empty($args)) {
         return $tr;
         return $tr;
     } elseif (is_array($args[0])) {
     } elseif (is_array($args[0])) {
-        return strtr($tr, $args[0]);
+        return strtr($tr, array_map('_e', $args[0]));
     } else {
     } else {
+        $args = array_map('_e', $args);
         return sprintf($tr, ...$args);
         return sprintf($tr, ...$args);
     }
     }
 }
 }

+ 2 - 2
app/lang/English/admin_index.po

@@ -91,10 +91,10 @@ msgid "Show info"
 msgstr "Show info"
 msgstr "Show info"
 
 
 msgid "Environment data version"
 msgid "Environment data version"
-msgstr "PHP: %s - %s"
+msgstr "PHP: %s"
 
 
 msgid "Environment data acc"
 msgid "Environment data acc"
-msgstr "Accelerator: %s"
+msgstr "Accelerator:"
 
 
 msgid "Database label"
 msgid "Database label"
 msgstr "Database"
 msgstr "Database"

+ 1 - 1
app/lang/English/common.po

@@ -183,7 +183,7 @@ msgid "Pages"
 msgstr "Pages:"
 msgstr "Pages:"
 
 
 msgid "Page"
 msgid "Page"
-msgstr "Page %s"
+msgstr "(Page %s)"
 
 
 msgid "BBCode"
 msgid "BBCode"
 msgstr "BBCode:"
 msgstr "BBCode:"

+ 4 - 1
app/lang/English/topic.po

@@ -51,7 +51,10 @@ msgid "Offline"
 msgstr "Offline"
 msgstr "Offline"
 
 
 msgid "Last edit"
 msgid "Last edit"
-msgstr "Last edited by"
+msgstr "Last edited by %1$s (%2$s)"
+
+msgid "Edited"
+msgstr "Edited"
 
 
 msgid "Report"
 msgid "Report"
 msgstr "Report"
 msgstr "Report"

+ 2 - 2
app/lang/Russian/admin_index.po

@@ -91,10 +91,10 @@ msgid "Show info"
 msgstr "Смотреть подробности"
 msgstr "Смотреть подробности"
 
 
 msgid "Environment data version"
 msgid "Environment data version"
-msgstr "PHP: %s - %s"
+msgstr "PHP: %s"
 
 
 msgid "Environment data acc"
 msgid "Environment data acc"
-msgstr "Акселератор: %s"
+msgstr "Акселератор:"
 
 
 msgid "Database label"
 msgid "Database label"
 msgstr "База данных"
 msgstr "База данных"

+ 1 - 1
app/lang/Russian/common.po

@@ -184,7 +184,7 @@ msgid "Pages"
 msgstr "Страницы"
 msgstr "Страницы"
 
 
 msgid "Page"
 msgid "Page"
-msgstr "Страница %s"
+msgstr "(Страница %s)"
 
 
 msgid "BBCode"
 msgid "BBCode"
 msgstr "BB-коды:"
 msgstr "BB-коды:"

+ 4 - 1
app/lang/Russian/topic.po

@@ -52,7 +52,10 @@ msgid "Offline"
 msgstr "Вне форума"
 msgstr "Вне форума"
 
 
 msgid "Last edit"
 msgid "Last edit"
-msgstr "Отредактировано"
+msgstr "Последний раз отредактировано %1$s (%2$s)"
+
+msgid "Edited"
+msgstr "Изменено"
 
 
 msgid "Report"
 msgid "Report"
 msgstr "Просигналить"
 msgstr "Просигналить"

+ 7 - 0
app/templates/admin/phpinfo.tpl

@@ -0,0 +1,7 @@
+@extends ('layouts/main')
+    <section class="f-main f-phpinfo">
+      <h2>phpinfo()</h2>
+      <div class="f-phpinfo-div">
+        {!! $p->phpinfo !!}
+      </div>
+    </section>

+ 6 - 2
app/templates/admin/statistics.tpl

@@ -9,8 +9,12 @@
             <dt>{!! __('Environment label') !!}</dt>
             <dt>{!! __('Environment label') !!}</dt>
             <dd>
             <dd>
               {!! __('Environment data OS', PHP_OS) !!}<br>
               {!! __('Environment data OS', PHP_OS) !!}<br>
-              {!! __('Environment data version', phpversion(), '<a href="' . $p->linkInfo . '">'.__('Show info').'</a>') !!}<br>
-              {!! __('Environment data acc', $p->accelerator) !!}
+              {!! __('Environment data version', phpversion()) !!} - <a href="{!! $p->linkInfo !!}">{!! __('Show info') !!}</a><br>
+  @if ($p->linkAcc)
+              {!! __('Environment data acc') !!} <a href="{!! $p->linkAcc !!}">{{ $p->accelerator }}</a>
+  @else
+              {!! __('Environment data acc') !!} {{ $p->accelerator }}
+  @endif
             </dd>
             </dd>
             <dt>{!! __('Database label') !!}</dt>
             <dt>{!! __('Database label') !!}</dt>
             <dd>
             <dd>

+ 3 - 3
app/templates/layouts/form.tpl

@@ -14,7 +14,7 @@
               <dt> @if (isset($cur['title']))<label class="f-child1 @if (isset($cur['required'])) f-req @endif" for="id-{{ $key }}">{!! $cur['title'] !!}</label> @endif</dt>
               <dt> @if (isset($cur['title']))<label class="f-child1 @if (isset($cur['required'])) f-req @endif" for="id-{{ $key }}">{!! $cur['title'] !!}</label> @endif</dt>
               <dd>
               <dd>
     @if ($cur['type'] === 'textarea')
     @if ($cur['type'] === 'textarea')
-                <textarea @if (isset($cur['required'])) required @endif class="f-ctrl" id="id-{{ $key }}" name="{{ $key }}">{{ $cur['value'] or '' }}</textarea>
+                <textarea @if (isset($cur['required'])) required @endif @if (isset($cur['autofocus'])) autofocus @endif class="f-ctrl" id="id-{{ $key }}" name="{{ $key }}">{{ $cur['value'] or '' }}</textarea>
       @if (isset($cur['bb']))
       @if (isset($cur['bb']))
                 <ul class="f-child5">
                 <ul class="f-child5">
         @foreach ($cur['bb'] as $val)
         @foreach ($cur['bb'] as $val)
@@ -23,9 +23,9 @@
                 </ul>
                 </ul>
       @endif
       @endif
     @elseif ($cur['type'] === 'text')
     @elseif ($cur['type'] === 'text')
-                <input @if (isset($cur['required'])) required @endif class="f-ctrl" id="id-{{ $key }}" name="{{ $key }}" type="text" @if (! empty($cur['maxlength'])) maxlength="{{ $cur['maxlength'] }}" @endif @if (isset($cur['pattern'])) pattern="{{ $cur['pattern'] }}" @endif @if (isset($cur['value'])) value="{{ $cur['value'] }}" @endif>
+                <input @if (isset($cur['required'])) required @endif @if (isset($cur['autofocus'])) autofocus @endif class="f-ctrl" id="id-{{ $key }}" name="{{ $key }}" type="text" @if (! empty($cur['maxlength'])) maxlength="{{ $cur['maxlength'] }}" @endif @if (isset($cur['pattern'])) pattern="{{ $cur['pattern'] }}" @endif @if (isset($cur['value'])) value="{{ $cur['value'] }}" @endif>
     @elseif ($cur['type'] === 'checkbox')
     @elseif ($cur['type'] === 'checkbox')
-                <label class="f-child2"><input type="checkbox" id="id-{{ $key }}" name="{{ $key }}" value="{{ $cur['value'] or '1' }}" @if (! empty($cur['checked'])) checked @endif>{!! $cur['label'] !!}</label>
+                <label class="f-child2"><input @if (isset($cur['autofocus'])) autofocus @endif type="checkbox" id="id-{{ $key }}" name="{{ $key }}" value="{{ $cur['value'] or '1' }}" @if (! empty($cur['checked'])) checked @endif>{!! $cur['label'] !!}</label>
     @endif
     @endif
     @if (isset($cur['info']))
     @if (isset($cur['info']))
                 <p class="f-child4">{!! $cur['info'] !!}</p>
                 <p class="f-child4">{!! $cur['info'] !!}</p>

+ 6 - 2
app/templates/layouts/install.tpl

@@ -4,8 +4,12 @@
   <meta charset="utf-8">
   <meta charset="utf-8">
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   <title>{!! __('ForkBB Installation') !!}</title>
   <title>{!! __('ForkBB Installation') !!}</title>
-@foreach ($p->pageHeads as $cur)
-  <{!! $cur !!}>
+@foreach ($p->pageHeaders as $cur)
+  @if ($cur[0] === 'style')
+  <{!! $cur[0] !!}>{!! $cur[1] !!}</{!! $cur[0] !!}>
+  @else
+  <{!! $cur[0] !!} {!! $cur[1] !!}>
+  @endif
 @endforeach
 @endforeach
 </head>
 </head>
 <body>
 <body>

+ 5 - 1
app/templates/layouts/main.tpl

@@ -5,7 +5,11 @@
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   <title>{{ $p->pageTitle }}</title>
   <title>{{ $p->pageTitle }}</title>
 @foreach ($p->pageHeaders as $cur)
 @foreach ($p->pageHeaders as $cur)
-  <{!! $cur !!}>
+  @if ($cur[0] === 'style')
+  <{!! $cur[0] !!}>{!! $cur[1] !!}</{!! $cur[0] !!}>
+  @else
+  <{!! $cur[0] !!} {!! $cur[1] !!}>
+  @endif
 @endforeach
 @endforeach
 </head>
 </head>
 <body>
 <body>

+ 5 - 1
app/templates/layouts/redirect.tpl

@@ -6,7 +6,11 @@
   <meta http-equiv="refresh" content="{!! $p->timeout !!};URL={{ $p->link }}">
   <meta http-equiv="refresh" content="{!! $p->timeout !!};URL={{ $p->link }}">
   <title>{{ $p->pageTitle }}</title>
   <title>{{ $p->pageTitle }}</title>
 @foreach ($p->pageHeaders as $cur)
 @foreach ($p->pageHeaders as $cur)
-  <{!! $cur !!}>
+  @if ($cur[0] === 'style')
+  <{!! $cur[0] !!}>{!! $cur[1] !!}</{!! $cur[0] !!}>
+  @else
+  <{!! $cur[0] !!} {!! $cur[1] !!}>
+  @endif
 @endforeach
 @endforeach
 </head>
 </head>
 <body>
 <body>

+ 5 - 2
app/templates/topic.tpl

@@ -55,8 +55,11 @@
       <article id="p{!! $post->id !!}" class="clearfix f-post @if ($post->user->gender == 1) f-user-male @elseif ($post->user->gender == 2) f-user-female @endif @if ($post->user->online) f-user-online @endif">
       <article id="p{!! $post->id !!}" class="clearfix f-post @if ($post->user->gender == 1) f-user-male @elseif ($post->user->gender == 2) f-user-female @endif @if ($post->user->online) f-user-online @endif">
         <header class="f-post-header clearfix">
         <header class="f-post-header clearfix">
           <h3>{{ $p->topic->cens()->subject }} - #{!! $post->postNumber !!}</h3>
           <h3>{{ $p->topic->cens()->subject }} - #{!! $post->postNumber !!}</h3>
-          <span class="left"><time datetime="{{ $post->utc()->posted }}">{{ $post->dt()->posted }}</time></span>
-          <span class="right"><a href="{!! $post->link !!}" rel="bookmark">#{!! $post->postNumber !!}</a></span>
+          <span class="f-post-posted"><time datetime="{{ $post->utc()->posted }}">{{ $post->dt()->posted }}</time></span>
+  @if ($post->edited)
+          <span class="f-post-edited" title="{!! __('Last edit', $post->user->username, $post->dt()->edited) !!}">{!! __('Edited') !!}</span>
+  @endif
+          <span class="f-post-number"><a href="{!! $post->link !!}" rel="bookmark">#{!! $post->postNumber !!}</a></span>
         </header>
         </header>
         <div class="f-post-body clearfix">
         <div class="f-post-body clearfix">
           <address class="f-post-left clearfix">
           <address class="f-post-left clearfix">

+ 16 - 0
public/style/ForkBB/style.css

@@ -1164,6 +1164,7 @@ select {
 
 
 .f-post {
 .f-post {
   border-top: 0.0625rem solid #AA7939;
   border-top: 0.0625rem solid #AA7939;
+  border-bottom: 0.0625rem solid #AA7939;
   margin-bottom: 0.625rem;
   margin-bottom: 0.625rem;
   position: relative;
   position: relative;
   background-color: #FFFFFF;
   background-color: #FFFFFF;
@@ -1180,6 +1181,21 @@ select {
   background-color: #D3B58D;
   background-color: #D3B58D;
 }
 }
 
 
+.f-post-posted {
+  float: left;
+}
+
+.f-post-edited {
+  float: left;
+  font-style: italic;
+  margin-left: 0.625rem;
+  opacity: 0.5;
+}
+
+.f-post-number {
+  float: right;
+}
+
 .f-post-left {
 .f-post-left {
   padding: 0.625rem;
   padding: 0.625rem;
   background-color: #F8F4E3;
   background-color: #F8F4E3;