mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
User/Misc
* floating changes * codify user checks into functions
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<?php namespace Aowow; ?>
|
||||
|
||||
<?php
|
||||
if (User::$id):
|
||||
if (User::isLoggedIn()):
|
||||
echo '<span id="toplinks-favorites"><a class="hassubmenu"></a>|</span>';
|
||||
echo '<a id="toplinks-user">'.User::$displayName.'</a>';
|
||||
echo '<span id="toplinks-rep" title="'.Lang::main('reputationTip').'">(<a href="?reputation">'.User::getReputation().'</a>)</span>';
|
||||
|
||||
@@ -17,7 +17,7 @@ if (!empty($this->gPageInfo)):
|
||||
echo " var g_pageInfo = ".Util::toJSON($this->gPageInfo).";\n";
|
||||
|
||||
// only used by item.php
|
||||
if (User::$id > 0 && isset($this->redButtons[BUTTON_EQUIP]) && $this->redButtons[BUTTON_EQUIP]):
|
||||
if (User::isLoggedIn() && isset($this->redButtons[BUTTON_EQUIP])):
|
||||
echo " DomContentLoaded.addEvent(function() { pr_addEquipButton('equip-pinned-button', ".$this->typeId."); });\n";
|
||||
endif;
|
||||
endif;
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<div class="comment-edit-body"><textarea class="comment-editbox" rows="10" cols="40" name="commentbody" disabled="disabled"></textarea></div>
|
||||
<?php
|
||||
endif;
|
||||
if (!User::$id):
|
||||
if (!User::isLoggedIn()):
|
||||
?>
|
||||
<small>You are not logged in. Please <a href="?account=signin">log in</a> or <a href="?account=signup">register an account</a> to add your comment.</small>
|
||||
<?php
|
||||
@@ -58,7 +58,7 @@
|
||||
<input type="file" name="screenshotfile" disabled="disabled" /><br />
|
||||
<?php
|
||||
endif;
|
||||
if (!User::$id):
|
||||
if (!User::isLoggedIn()):
|
||||
?>
|
||||
<small>You are not signed in. Please <a href="?account=signin">sign in</a> to submit a screenshot.</small>
|
||||
<?php
|
||||
@@ -85,7 +85,7 @@
|
||||
<input type="text" name="videourl" disabled="disabled" /><br />
|
||||
<?php
|
||||
endif;
|
||||
if (!User::$id):
|
||||
if (!User::isLoggedIn()):
|
||||
?>
|
||||
<small>You are not signed in. Please <a href="?account=signin">sign in</a> to submit a video.</small>
|
||||
<?php
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<div class="comment-edit-body"><textarea class="comment-editbox" rows="10" cols="40" name="commentbody" disabled="disabled"></textarea></div>
|
||||
<?php
|
||||
endif;
|
||||
if (!User::$id):
|
||||
if (!User::isLoggedIn()):
|
||||
?>
|
||||
<small>Vous n'êtes pas connecté(e). Veuillez vous <a href="?account=signin">connecter</a> ou vous <a href="?account=signup">inscrire</a> pour ajouter votre commentaire.</small>
|
||||
<?php
|
||||
@@ -58,7 +58,7 @@
|
||||
<input type="file" name="screenshotfile" disabled="disabled" /><br />
|
||||
<?php
|
||||
endif;
|
||||
if (!User::$id):
|
||||
if (!User::isLoggedIn()):
|
||||
?>
|
||||
<small>Vous n'êtes pas connecté(e). Veuillez vous <a href="?account=signin">connecter</a> pour envoyer une capture d'écran.</small>
|
||||
<?php
|
||||
@@ -85,7 +85,7 @@
|
||||
<input type="text" name="videourl" disabled="disabled" /><br />
|
||||
<?php
|
||||
endif;
|
||||
if (!User::$id):
|
||||
if (!User::isLoggedIn()):
|
||||
?>
|
||||
<small>Vous n'êtes pas connecté(e). Veuillez vous <a href="?account=signin">connecter</a> pour envoyer une vidéo.</small>
|
||||
<?php
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<div class="comment-edit-body"><textarea class="comment-editbox" rows="10" cols="40" name="commentbody" disabled="disabled"></textarea></div>
|
||||
<?php
|
||||
endif;
|
||||
if (!User::$id):
|
||||
if (!User::isLoggedIn()):
|
||||
?>
|
||||
<small>Ihr seid nicht angemeldet. Bitte <a href="?account=signin">meldet Euch an</a>, oder <a href="?account=signup">registriert Euch</a>, um einen Kommentar einzusenden.</small>
|
||||
<?php
|
||||
@@ -58,7 +58,7 @@
|
||||
<input type="file" name="screenshotfile" disabled="disabled" /><br />
|
||||
<?php
|
||||
endif;
|
||||
if (!User::$id):
|
||||
if (!User::isLoggedIn()):
|
||||
?>
|
||||
<small>Ihr seid nicht angemeldet. Bitte <a href="?account=signin">meldet Euch an</a>, um einen Screenshot einzusenden.</small>
|
||||
<?php
|
||||
@@ -85,7 +85,7 @@
|
||||
<input type="text" name="videourl" disabled="disabled" /><br />
|
||||
<?php
|
||||
endif;
|
||||
if (!User::$id):
|
||||
if (!User::isLoggedIn()):
|
||||
?>
|
||||
<small>Ihr seid nicht angemeldet. Bitte <a href="?account=signin">meldet Euch an</a>, um ein Video vorzuschlagen.</small>
|
||||
<?php
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<div class="comment-edit-body"><textarea class="comment-editbox" rows="10" cols="40" name="commentbody" disabled="disabled"></textarea></div>
|
||||
<?php
|
||||
endif;
|
||||
if (!User::$id):
|
||||
if (!User::isLoggedIn()):
|
||||
?>
|
||||
<small>你尚未登录,请先<a href="?account=signin">登录</a>或<a href="?account=signup">注册一个账号</a> 以发表你的评论。</small>
|
||||
<?php
|
||||
@@ -58,7 +58,7 @@
|
||||
<input type="file" name="screenshotfile" disabled="disabled" /><br />
|
||||
<?php
|
||||
endif;
|
||||
if (!User::$id):
|
||||
if (!User::isLoggedIn()):
|
||||
?>
|
||||
<small>你尚未登录,请先<a href="?account=signin">登录</a>以提交截图。</small>
|
||||
<?php
|
||||
@@ -85,7 +85,7 @@
|
||||
<input type="text" name="videourl" disabled="disabled" /><br />
|
||||
<?php
|
||||
endif;
|
||||
if (!User::$id):
|
||||
if (!User::isLoggedIn()):
|
||||
?>
|
||||
<small>You are not signed in. Please <a href="?account=signin">sign in</a> to submit a video.</small>
|
||||
<?php
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<div class="comment-edit-body"><textarea class="comment-editbox" rows="10" cols="40" name="commentbody" disabled="disabled"></textarea></div>
|
||||
<?php
|
||||
endif;
|
||||
if (!User::$id):
|
||||
if (!User::isLoggedIn()):
|
||||
?>
|
||||
<small>No has iniciado sesión. Por favor <a href="?account=signin">entra a tu cuenta</a> o <a href="?account=signup">registra una cuenta</a> para añadir tu comentario.</small>
|
||||
<?php
|
||||
@@ -58,7 +58,7 @@
|
||||
<input type="file" name="screenshotfile" disabled="disabled" /><br />
|
||||
<?php
|
||||
endif;
|
||||
if (!User::$id):
|
||||
if (!User::isLoggedIn()):
|
||||
?>
|
||||
<small>No has iniciado sesión. <a href="?account=signin">Inicia sesión</a> para enviar una captura de pantalla.</small>
|
||||
<?php
|
||||
@@ -85,7 +85,7 @@
|
||||
<input type="text" name="videourl" disabled="disabled" /><br />
|
||||
<?php
|
||||
endif;
|
||||
if (!User::$id):
|
||||
if (!User::isLoggedIn()):
|
||||
?>
|
||||
<small>No has iniciado sesión. <a href="?account=signin">Inicia sesión</a> para enviar un video.</small>
|
||||
<?php
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<div class="comment-edit-body"><textarea class="comment-editbox" rows="10" cols="40" name="commentbody" disabled="disabled"></textarea></div>
|
||||
<?php
|
||||
endif;
|
||||
if (!User::$id):
|
||||
if (!User::isLoggedIn()):
|
||||
?>
|
||||
<small>Вы не вошли на сайт. Пожалуйста <a href="?account=signin">войдите</a> или <a href="?account=signup">зарегистрируйтесь</a>, чтобы добавлять комментарии.</small>
|
||||
<?php
|
||||
@@ -58,7 +58,7 @@
|
||||
<input type="file" name="screenshotfile" disabled="disabled" /><br />
|
||||
<?php
|
||||
endif;
|
||||
if (!User::$id):
|
||||
if (!User::isLoggedIn()):
|
||||
?>
|
||||
<small>Вы не вошли на сайт. Пожалуйста <a href="?account=signin">войдите</a>, чтобы отправить скриншот.</small>
|
||||
<?php
|
||||
@@ -85,7 +85,7 @@
|
||||
<input type="text" name="videourl" disabled="disabled" /><br />
|
||||
<?php
|
||||
endif;
|
||||
if (!User::$id):
|
||||
if (!User::isLoggedIn()):
|
||||
?>
|
||||
<small>Вы не вошли на сайт. Пожалуйста <a href="?account=signin">войдите</a>, чтобы отправить видео.</small>
|
||||
<?php
|
||||
|
||||
Reference in New Issue
Block a user