Browse Source

2017-10-06

Visman 7 years ago
parent
commit
6311b5b8d5

+ 2 - 2
app/Core/DB.php

@@ -110,13 +110,13 @@ class DB extends PDO
         $query = preg_replace_callback(
         $query = preg_replace_callback(
             '%(?=[?:])(?<![\w?])(\?(?![:?])(\w+)?)?(?:(::?)(\w+))?%i', 
             '%(?=[?:])(?<![\w?])(\?(?![:?])(\w+)?)?(?:(::?)(\w+))?%i', 
             function($matches) use ($params, &$idxIn, &$idxOut, &$map, &$bind) {
             function($matches) use ($params, &$idxIn, &$idxOut, &$map, &$bind) {
-                if ($matches[3] === '::') {
+                if (isset($matches[3]) && $matches[3] === '::') {
                     return $this->dbPrefix . $matches[4];
                     return $this->dbPrefix . $matches[4];
                 }
                 }
                 
                 
                 $type = $matches[2] ?: 's';
                 $type = $matches[2] ?: 's';
 
 
-                if ($matches[4]) {
+                if (isset($matches[4])) {
                     $key1 = ':' . $matches[4];
                     $key1 = ':' . $matches[4];
                     $key2 = $matches[4];
                     $key2 = $matches[4];
                 } else {
                 } else {

+ 1 - 1
app/Models/Pages/Page.php

@@ -226,7 +226,7 @@ abstract class Page
      */
      */
     protected function pageHeaders()
     protected function pageHeaders()
     {
     {
-        $headers = ['link rel="stylesheet" type="text/css" href="' . $this->c->Router->link() . '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->robots) {
         if ($this->robots) {
             $headers[] = 'meta name="robots" content="' . $this->robots . '"';
             $headers[] = 'meta name="robots" content="' . $this->robots . '"';
         }
         }

+ 0 - 3
app/lang/English/common.po

@@ -150,9 +150,6 @@ msgstr "Email"
 msgid "Send email"
 msgid "Send email"
 msgstr "Send email"
 msgstr "Send email"
 
 
-msgid "Moderated by"
-msgstr "Moderated by"
-
 msgid "Registered"
 msgid "Registered"
 msgstr "Registered"
 msgstr "Registered"
 
 

+ 3 - 0
app/lang/English/subforums.po

@@ -32,3 +32,6 @@ msgid "%s Post"
 msgid_plural "%s Posts"
 msgid_plural "%s Posts"
 msgstr[0] "<strong>%s</strong> Post"
 msgstr[0] "<strong>%s</strong> Post"
 msgstr[1] "<strong>%s</strong> Posts"
 msgstr[1] "<strong>%s</strong> Posts"
+
+msgid "Moderated by"
+msgstr "Moderated by"

+ 0 - 3
app/lang/Russian/common.po

@@ -150,9 +150,6 @@ msgstr "E-mail"
 msgid "Send email"
 msgid "Send email"
 msgstr "Отправить письмо"
 msgstr "Отправить письмо"
 
 
-msgid "Moderated by"
-msgstr "Модератор(ы):"
-
 msgid "Registered"
 msgid "Registered"
 msgstr "Дата регистрации"
 msgstr "Дата регистрации"
 
 

+ 6 - 0
app/lang/Russian/subforums.po

@@ -35,3 +35,9 @@ msgid_plural "%s Posts"
 msgstr[0] "<strong>%s</strong> Сообщение"
 msgstr[0] "<strong>%s</strong> Сообщение"
 msgstr[1] "<strong>%s</strong> Сообщения"
 msgstr[1] "<strong>%s</strong> Сообщения"
 msgstr[2] "<strong>%s</strong> Сообщений"
 msgstr[2] "<strong>%s</strong> Сообщений"
+
+msgid "Moderated by"
+msgid_plural "Moderated by"
+msgstr[0] "Модератор:"
+msgstr[1] "Модераторы:"
+msgstr[2] "Модераторы:"

+ 17 - 11
app/templates/change_passphrase.tpl

@@ -4,18 +4,24 @@
         <h2>{!! __('Change pass') !!}</h2>
         <h2>{!! __('Change pass') !!}</h2>
         <form class="f-form" method="post" action="{!! $formAction !!}">
         <form class="f-form" method="post" action="{!! $formAction !!}">
           <input type="hidden" name="token" value="{!! $formToken !!}">
           <input type="hidden" name="token" value="{!! $formToken !!}">
-          <div>
-            <label class="f-child1 f-req" for="id-password">{!! __('New pass') !!}</label>
-            <input required class="f-ctrl" id="id-password" type="password" name="password" pattern="^.{16,}$" autofocus tabindex="1">
-          </div>
-          <div>
-            <label class="f-child1 f-req" for="id-password2">{!! __('Confirm new pass') !!}</label>
-            <input required class="f-ctrl" id="id-password2" type="password" name="password2" pattern="^.{16,}$" tabindex="2">
-            <span class="f-child4">{!! __('Pass format') !!} {!! __('Pass info') !!}</span>
-          </div>
-          <div>
+          <fieldset>
+            <dl>
+              <dt><label class="f-child1 f-req" for="id-password">{!! __('New pass') !!}</label></dt>
+              <dd>
+                <input required class="f-ctrl" id="id-password" type="password" name="password" pattern="^.{16,}$" autofocus tabindex="1">
+              </dd>
+            </dl>
+            <dl>
+              <dt><label class="f-child1 f-req" for="id-password2">{!! __('Confirm new pass') !!}</label></dt>
+              <dd>
+                <input required class="f-ctrl" id="id-password2" type="password" name="password2" pattern="^.{16,}$" tabindex="2">
+                <p class="f-child4">{!! __('Pass format') !!} {!! __('Pass info') !!}</p>
+              </dd>
+            </dl>
+          </fieldset>
+          <p>
             <input class="f-btn" type="submit" name="login" value="{!! __('Change passphrase') !!}" tabindex="3">
             <input class="f-btn" type="submit" name="login" value="{!! __('Change passphrase') !!}" tabindex="3">
-          </div>
+          </p>
         </form>
         </form>
       </div>
       </div>
     </section>
     </section>

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

@@ -42,6 +42,7 @@
 @endif
 @endif
 @yield('content')
 @yield('content')
     <footer class="f-footer clearfix">
     <footer class="f-footer clearfix">
+      <h2>{!! __('Board footer') !!}</h2>
       <div class="left">
       <div class="left">
       </div>
       </div>
       <div class="right">
       <div class="right">

+ 1 - 1
app/templates/layouts/subforums.tpl

@@ -39,7 +39,7 @@
 @endif
 @endif
 @if($cur['moderators'])
 @if($cur['moderators'])
                   <dl class="f-inline f-modlist"><!-- inline -->
                   <dl class="f-inline f-modlist"><!-- inline -->
-                    <dt>{!! __('Moderated by') !!}</dt>
+                    <dt>{!! __('Moderated by', count($cur['moderators'])) !!}</dt>
 @foreach($cur['moderators'] as $mod)
 @foreach($cur['moderators'] as $mod)
 @if(is_string($mod))
 @if(is_string($mod))
                     <dd>{{ $mod }}</dd>
                     <dd>{{ $mod }}</dd>

+ 21 - 14
app/templates/login.tpl

@@ -5,24 +5,31 @@
         <form class="f-form" method="post" action="{!! $formAction !!}">
         <form class="f-form" method="post" action="{!! $formAction !!}">
           <input type="hidden" name="token" value="{!! $formToken !!}">
           <input type="hidden" name="token" value="{!! $formToken !!}">
           <input type="hidden" name="redirect" value="{{ $redirect }}">
           <input type="hidden" name="redirect" value="{{ $redirect }}">
-          <div>
-            <label class="f-child1 f-req" for="id-username">{!! __('Username') !!}</label>
-            <input required class="f-ctrl" id="id-username" type="text" name="username" value="{{ $username }}" maxlength="25" autofocus spellcheck="false" tabindex="1">
-          </div>
-          <div>
-            <label class="f-child1 f-req" for="id-password">{!! __('Passphrase') !!}<a class="f-forgetlink" href="{!! $forgetLink !!}" tabindex="5">{!! __('Forgotten pass') !!}</a></label>
-            <input required class="f-ctrl" id="id-password" type="password" name="password" tabindex="2">
-          </div>
-          <div>
+          <fieldset>
+            <dl>
+              <dt><label class="f-child1 f-req" for="id-username">{!! __('Username') !!}</label></dt>
+              <dd>
+                <input required class="f-ctrl" id="id-username" type="text" name="username" value="{{ $username }}" maxlength="25" autofocus spellcheck="false" tabindex="1">
+              </dd>
+            </dl>
+            <dl>
+              <dt><label class="f-child1 f-req" for="id-password">{!! __('Passphrase') !!}<a class="f-forgetlink" href="{!! $forgetLink !!}" tabindex="5">{!! __('Forgotten pass') !!}</a></label></dt>
+              <dd>
+                <input required class="f-ctrl" id="id-password" type="password" name="password" tabindex="2">
+              </dd>
+            </dl>
+            <dl>
+              <dt></dt>
 @if($save)
 @if($save)
-          <label class="f-child2"><input type="checkbox" name="save" value="1" tabindex="3" checked="checked">{!! __('Remember me') !!}</label>
+              <dd><label class="f-child2"><input type="checkbox" name="save" value="1" tabindex="3" checked="checked">{!! __('Remember me') !!}</label></dd>
 @else
 @else
-          <label class="f-child2"><input type="checkbox" name="save" value="1" tabindex="3">{!! __('Remember me') !!}</label>
+              <dd><label class="f-child2"><input type="checkbox" name="save" value="1" tabindex="3">{!! __('Remember me') !!}</label></dd>
 @endif
 @endif
-          </div>
-          <div>
+            </dl>
+          </fieldset>
+          <p>
             <input class="f-btn" type="submit" name="login" value="{!! __('Sign in') !!}" tabindex="4">
             <input class="f-btn" type="submit" name="login" value="{!! __('Sign in') !!}" tabindex="4">
-          </div>
+          </p>
         </form>
         </form>
       </div>
       </div>
 @if($regLink)
 @if($regLink)

+ 11 - 7
app/templates/passphrase_reset.tpl

@@ -4,14 +4,18 @@
         <h2>{!! __('Passphrase reset') !!}</h2>
         <h2>{!! __('Passphrase reset') !!}</h2>
         <form class="f-form" method="post" action="{!! $formAction !!}">
         <form class="f-form" method="post" action="{!! $formAction !!}">
           <input type="hidden" name="token" value="{!! $formToken !!}">
           <input type="hidden" name="token" value="{!! $formToken !!}">
-          <div>
-            <label class="f-child1 f-req" for="id-email">{!! __('Email') !!}</label>
-            <input required class="f-ctrl" id="id-email" type="text" name="email" value="{{ $email }}" maxlength="80" pattern=".+@.+" autofocus spellcheck="false" tabindex="1">
-            <span class="f-child4">{!! __('Passphrase reset info') !!}</span>
-          </div>
-          <div>
+          <fieldset>
+            <dl>
+              <dt><label class="f-child1 f-req" for="id-email">{!! __('Email') !!}</label></dt>
+              <dd>
+                <input required class="f-ctrl" id="id-email" type="text" name="email" value="{{ $email }}" maxlength="80" pattern=".+@.+" autofocus spellcheck="false" tabindex="1">
+                <p class="f-child4">{!! __('Passphrase reset info') !!}</p>
+              </dd>
+            </dl>
+          </fieldset>
+          <p>
             <input class="f-btn" type="submit" name="submit" value="{!! __('Send email') !!}" tabindex="2">
             <input class="f-btn" type="submit" name="submit" value="{!! __('Send email') !!}" tabindex="2">
-          </div>
+          </p>
         </form>
         </form>
       </div>
       </div>
     </section>
     </section>

+ 25 - 17
app/templates/register.tpl

@@ -6,24 +6,32 @@
           <input type="hidden" name="token" value="{!! $formToken !!}">
           <input type="hidden" name="token" value="{!! $formToken !!}">
           <input type="hidden" name="agree" value="{!! $agree !!}">
           <input type="hidden" name="agree" value="{!! $agree !!}">
           <input type="hidden" name="on" value="{!! $on !!}">
           <input type="hidden" name="on" value="{!! $on !!}">
-          <div>
-            <label class="f-child1 f-req" for="id-email">{!! __('Email') !!}</label>
-            <input required class="f-ctrl" id="id-email" type="text" name="email" value="{{ $email }}" maxlength="80" pattern=".+@.+" autofocus spellcheck="false" tabindex="1">
-            <span class="f-child4 f-fhint">{!! __('Email info') !!}</span>
-          </div>
-          <div>
-            <label class="f-child1 f-req" for="id-username">{!! __('Username') !!}</label>
-            <input required class="f-ctrl" id="id-username" type="text" name="username" value="{{ $username }}" maxlength="25" pattern="^.{2,25}$" spellcheck="false" tabindex="2">
-            <span class="f-child4 f-fhint">{!! __('Login format') !!}</span>
-          </div>
-          <div>
-            <label class="f-child1 f-req" for="id-password">{!! __('Passphrase') !!}</label>
-            <input required class="f-ctrl" id="id-password" type="password" name="password" pattern="^.{16,}$" tabindex="3">
-            <span class="f-child4 f-fhint">{!! __('Pass format') !!} {!! __('Pass info') !!}</span>
-          </div>
-          <div>
+          <fieldset>
+            <dl>
+              <dt><label class="f-child1 f-req" for="id-email">{!! __('Email') !!}</label></dt>
+              <dd>
+                <input required class="f-ctrl" id="id-email" type="text" name="email" value="{{ $email }}" maxlength="80" pattern=".+@.+" autofocus spellcheck="false" tabindex="1">
+                <p class="f-child4 f-fhint">{!! __('Email info') !!}</p>
+              </dd>
+            </dl>
+            <dl>
+              <dt><label class="f-child1 f-req" for="id-username">{!! __('Username') !!}</label></dt>
+              <dd>
+                <input required class="f-ctrl" id="id-username" type="text" name="username" value="{{ $username }}" maxlength="25" pattern="^.{2,25}$" spellcheck="false" tabindex="2">
+                <p class="f-child4 f-fhint">{!! __('Login format') !!}</p>
+              </dd>
+            </dl>
+            <dl>
+              <dt><label class="f-child1 f-req" for="id-password">{!! __('Passphrase') !!}</label></dt>
+              <dd>
+                <input required class="f-ctrl" id="id-password" type="password" name="password" pattern="^.{16,}$" tabindex="3">
+                <p class="f-child4 f-fhint">{!! __('Pass format') !!} {!! __('Pass info') !!}</p>
+              </dd>
+            </dl>
+          </fieldset>
+          <p>
             <input class="f-btn" type="submit" name="register" value="{!! __('Sign up') !!}" tabindex="4">
             <input class="f-btn" type="submit" name="register" value="{!! __('Sign up') !!}" tabindex="4">
-          </div>
+          </p>
         </form>
         </form>
       </div>
       </div>
     </section>
     </section>

+ 8 - 5
app/templates/rules.tpl

@@ -6,12 +6,15 @@
       <div class="f-fdiv f-lrdiv">
       <div class="f-fdiv f-lrdiv">
         <form class="f-form" method="post" action="{!! $formAction !!}">
         <form class="f-form" method="post" action="{!! $formAction !!}">
           <input type="hidden" name="token" value="{!! $formToken !!}">
           <input type="hidden" name="token" value="{!! $formToken !!}">
-          <div>
-            <label class="f-child2"><input type="checkbox" name="agree" value="{!! $formHash !!}" tabindex="1">{!! __('Agree') !!}</label>
-          </div>
-          <div>
+          <fieldset>
+            <dl>
+              <dt></dt>
+              <dd><label class="f-child2"><input type="checkbox" name="agree" value="{!! $formHash !!}" tabindex="1">{!! __('Agree') !!}</label></dd>
+            </dl>
+          </fieldset>
+          <p>
             <input class="f-btn" type="submit" name="register" value="{!! __('Register') !!}" tabindex="2">
             <input class="f-btn" type="submit" name="register" value="{!! __('Register') !!}" tabindex="2">
-          </div>
+          </p>
         </form>
         </form>
       </div>
       </div>
 @endif
 @endif

+ 36 - 1
app/templates/topic.tpl

@@ -122,4 +122,39 @@
     </div>
     </div>
 @if($online)
 @if($online)
 @include('layouts/stats')
 @include('layouts/stats')
-@endif
+@endif
+    <section class="post-form">
+      <h2>{!! __('Quick post') !!}</h2>
+      <div class="f-fdiv">
+        <form class="f-form" method="post" action="">
+          <fieldset>
+            <dl>
+              <dt><label class="f-child1 f-req" for="id-username">{!! __('Username') !!}</label></dt>
+              <dd>
+                <input required class="f-ctrl" id="id-username" type="text" name="username" value="" maxlength="25" pattern="^.{2,25}$" spellcheck="false">
+              </dd>
+            </dl>
+            <dl>
+              <dt><label class="f-child1 f-req" for="id-email">{!! __('Email') !!}</label></dt>
+              <dd>
+                <input required class="f-ctrl" id="id-email" type="text" name="email" value="" maxlength="80" pattern=".+@.+" spellcheck="false">
+              </dd>
+            </dl>
+            <dl>
+              <dt><label class="f-child1 f-req" for="id-message">{!! __('Message') !!}</label></dt>
+              <dd>
+                <textarea required class="f-ctrl" id="id-message" name="message"></textarea>
+              </dd>
+            </dl>
+          </fieldset>
+          <fieldset>
+            <legend>{!! __('Options') !!}</legend>
+            <div>
+            </div>
+          </fieldset>
+          <p>
+            <input class="f-btn" type="submit" name="submit" value="{!! __('Submit') !!}">
+          </p>
+        </form>
+      </div>
+    </section>

+ 29 - 1
public/style/ForkBB/style.css

@@ -36,7 +36,7 @@ dd,
 th,
 th,
 td,
 td,
 fieldset,
 fieldset,
-legend
+legend,
 img,
 img,
 abbr,
 abbr,
 cite {
 cite {
@@ -118,6 +118,10 @@ body,
   background-color: #FFFFFF;
   background-color: #FFFFFF;
 }
 }
 
 
+.f-wrap textarea {
+  resize: vertical;
+}
+
 .f-wrap a,
 .f-wrap a,
 .f-btn {
 .f-btn {
   color: #583200;
   color: #583200;
@@ -505,6 +509,10 @@ select {
   background-color: #F8F4E3;
   background-color: #F8F4E3;
 }
 }
 
 
+.f-footer > h2 {
+  display: none;
+}
+
 .f-footer > div {
 .f-footer > div {
   padding: 0.625rem;
   padding: 0.625rem;
 }
 }
@@ -1265,3 +1273,23 @@ li + li .f-btn {
     height: auto;
     height: auto;
   }
   }
 } /* @media screen and (min-width: 50rem) */
 } /* @media screen and (min-width: 50rem) */
+
+.post-form {
+  border-top: 0.0625rem solid #AA7939;
+}
+
+.post-form > .f-fdiv {
+  margin: 1rem 0;
+  background-color: #F8F4E3;
+}
+
+.post-form legend {
+  width: 100%;
+  padding-bottom: 0.625rem;
+  margin-bottom: 0.625rem;
+  border-bottom: 0.0625rem dotted #AA7939;
+}
+
+.post-form .f-btn {
+  width: auto;
+}