Форум АНТИЧАТ

Форум АНТИЧАТ (https://forum.antichat.xyz/index.php)
-   PHP, PERL, MySQL, JavaScript (https://forum.antichat.xyz/forumdisplay.php?f=37)
-   -   Репутация в vBulletin (https://forum.antichat.xyz/showthread.php?t=72096)

InfernoNet 30.05.2008 21:02

Репутация в vBulletin
 
Вот когда заменил код для отображения репутации цифрами в memberlist_resultsbit (раздел пользователи), страничка стала отображаться не корректно. Скажите что не так в этом коде?
vBulletin V 3.6.10.
Код:

<tr align="center">
        <td class="alt1Active" align="$stylevar[left]" id="u$userinfo[userid]">
                <a href="member.php?$session[sessionurl]u=$userinfo[userid]">$userinfo[musername]</a>
                <if condition="$show['usertitlecol']"><div class="smallfont">$userinfo[usertitle]</div></if>
        </td>
        <if condition="$show['emailcol'] AND exec_switch_bg()"><td class="$bgclass"><if condition="$show['emaillink']"><a href="sendmessage.php?$session[sessionurl]do=mailmember&amp;u=$userinfo[userid]" target="_blank" rel="nofollow"><img src="$stylevar[imgdir_button]/email.gif" alt="email.gif" title="<phrase 1="$userinfo[username]">$vbphrase[click_here_to_email_x]</phrase>" border="0" /></a></if>&nbsp;<if condition="$show['pmlink']"><a href="private.php?$session[sessionurl]do=newpm&amp;u=$userinfo[userid]" target="_blank" rel="nofollow"><img src="$stylevar[imgdir_button]/sendpm.gif" alt="sendpm.gif" title="<phrase 1="$userinfo[username]">$vbphrase[send_private_message_to_x]</phrase>" border="0" /></a></if></td></if>
        <if condition="$show['imicons'] AND exec_switch_bg()"><td class="$bgclass">$userinfo[icqicon] $userinfo[aimicon] $userinfo[msnicon] $userinfo[yahooicon] $userinfo[skypeicon]</td></if>
        <if condition="$show['homepagecol'] AND exec_switch_bg()"><td class="$bgclass"><if condition="$show['homepagelink']"><a href="$userinfo[homepage]" target="_blank"><img src="$stylevar[imgdir_button]/home.gif" alt="home.gif" title="<phrase 1="$userinfo[username]">$vbphrase[visit_xs_homepage]</phrase>"  border="0" /></a><else />&nbsp;</if></td></if>
        <if condition="$show['searchcol'] AND exec_switch_bg()"><td class="$bgclass"><if condition="$show['searchlink']"><a href="search.php?$session[sessionurl]do=finduser&amp;u=$userinfo[userid]" rel="nofollow"><img src="$stylevar[imgdir_button]/find.gif" alt="find.gif" title="<phrase 1="$userinfo[username]">$vbphrase[find_all_posts_by_x]</phrase>" border="0" /></a><else />&nbsp;</if></td></if>
        <if condition="$show['datejoinedcol'] AND exec_switch_bg()"><td class="$bgclass">$userinfo[datejoined]</td></if>
        <if condition="$show['postscol'] AND exec_switch_bg()"><td class="$bgclass">$userinfo[posts]</td></if>
        <if condition="$show['lastvisitcol'] AND exec_switch_bg()"><td class="$bgclass">$userinfo[lastvisit]</td></if>
        <if condition="$userinfo['showreputation']">$userinfo[level] (<b><font color="<if condition="($userinfo[reputation] > 0)">green<else />red</if>">$userinfo[reputation]</font></b>)<else />&nbsp;</if>
        <if condition="$show['avatarcol'] AND exec_switch_bg()"><td class="$bgclass"><if condition="$show['avatar']"><img src="$avatarurl" border="0" $avwidth $avheight alt="<phrase 1="$userinfo[username]">$vbphrase[xs_avatar]</phrase>" hspace="4" vspace="4" /><else />&nbsp;</if></td></if>
        <if condition="$show['profilepiccol'] AND exec_switch_bg()"><td class="$bgclass">$userinfo[profilepic]</td></if>
        <if condition="$show['birthdaycol'] AND exec_switch_bg()"><td class="$bgclass">$userinfo[birthday]</td></if>
        <if condition="$show['agecol'] AND exec_switch_bg()"><td class="$bgclass">$userinfo[age]</td></if>
        <if condition="$show['customfields']">$customfields</if>
        <if condition="$show['usergroup'] AND exec_switch_bg()"><td class="$bgclass"><if condition="$show['hideleader']">&nbsp;<else /><input type="checkbox" name="deletebox[$userinfo[userid]]" value="yes" /></if></td></if>
</tr>


cash$$$ 30.05.2008 21:12

Попробуй так
Код:

<if condition="$show['reputationlink']">
<span class = "pagenav" id="reputationmenu_$post[postid]"><a href="reputation.php?$session[sessionurl]p=$post[postid]" rel="nofollow" id="reputation_$post[postid]"><font color = "green">±</font></a></span>
<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
<if condition="$show['popups']"><script type="text/javascript"> vbrep_register("$post[postid]")</script></if>
</if>


InfernoNet 30.05.2008 21:15

Не помогло. Если не сложно скиньте стандартный код данного шаблона.

GSM™ 30.05.2008 21:18

Цитата:

Сообщение от InfernoNet
Не помогло. Если не сложно скиньте стандартный код данного шаблона.

А там посмотреть можно.

cash$$$ 30.05.2008 21:21

Цитата:

Сообщение от GSM™
А там посмотреть можно.

Пример работы: http://xmages.net/out.php/i3824_repa.JPG


Файл от 3.6.10(reputation.php) отличается наличием защиты:
define('CSRF_PROTECTION', true);

Вобщем чтоб заставить работать пoп-ап не меняя файл на старый перед:

<if condition="$show['popups']"><script type="text/javascript"> vbrep_register("$post[postid]")</script></if>

вставить строку:

<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />

InfernoNet 30.05.2008 21:25

Цитата:

Сообщение от gsm™
А там посмотреть можно.

Где?

GSM™ 30.05.2008 21:25

я не имел ввиду скрин а имел ввиду что в админке можно посмотреть исходный код шаблона.

InfernoNet 30.05.2008 21:34

cash$$$, не понял. Где прописать это надо?

InfernoNet 30.05.2008 21:41

Лучше дайте мне стандартную строку в место:
Код:

<if condition="$userinfo['showreputation']">$userinfo[level] (<b><font color="<if condition="($userinfo[reputation] > 0)">green<else />red</if>">$userinfo[reputation]</font></b>)<else />&nbsp;</if>

Godfather Bulan 30.05.2008 21:49

InfernoNet, а перед первой и после последней if разве "{" или "}" не надо?


Время: 08:32