PDA

View Full Version : vb 4.1.8 reputation as number


youhack
12-01-2011, 04:50 AM
Tell me please how to make a map of the reputation of the number in 4.1.8


example
Reputation: 172 +/-

LifesGreatestGift
12-01-2011, 04:59 AM
Pretty sure if you open postbit or postbit_legacy
(depending on your layout) and

FIND
{vb:raw post.reputationdisplay}
REPLACE WITH
{vb:raw post.reputation}

will do what you are looking for.

youhack
12-01-2011, 05:21 AM
in 4.1.8 no {vb:raw post.reputationdisplay}
change variables in code


<span class="postbit_reputation" id="repdisplay_{vb:raw post.postid}_{vb:raw post.userid}" title="{vb:raw post.username} {vb:raw post.level}">
<vb:each from="reputationdisplay" value="row">
<img class="{vb:raw row.class}" src="{vb:stylevar imgdir_reputation}/reputation_{vb:raw row.posneg}{vb:raw row.imgext}" alt="" />{vb:raw row.rowend}
</vb:each>
</span>

LifesGreatestGift
12-01-2011, 05:32 AM
can you try

FIND
<vb:each from="reputationdisplay" value="row">
<img class="{vb:raw row.class}" src="{vb:stylevar imgdir_reputation}/reputation_{vb:raw row.posneg}{vb:raw row.imgext}" alt="" />{vb:raw row.rowend}
</vb:each>

REPLACE WITH
{vb:raw post.reputation}

youhack
12-01-2011, 05:55 AM
reputation does not appear

LifesGreatestGift
12-01-2011, 05:25 PM
im upgrading my vB to 4.1.8 (from 4.1.4) to look at the database/code changes. will get back to you if no one else does.

--------------- Added 1322765908 at 1322765908 ---------------

i used the following code and it works just fine

FIND
<vb:if condition="$show['reputation']">
<span class="postbit_reputation" id="repdisplay_{vb:raw post.postid}_{vb:raw post.userid}" title="{vb:raw post.username} {vb:raw post.level}">
<vb:each from="reputationdisplay" value="row">
<img class="{vb:raw row.class}" src="{vb:stylevar imgdir_reputation}/reputation_{vb:raw row.posneg}{vb:raw row.imgext}" alt="" />{vb:raw row.rowend}
</vb:each>
</span>
</vb:if>

REPLACE WITH
<vb:if condition="$show['reputation']">
<span>
Reputation: {vb:raw post.reputation}
</span>
</vb:if>

--------------- Added 1322765941 at 1322765941 ---------------

feel free to style it as needed.

youhack
12-02-2011, 04:49 AM
TheWindows7Site thanks a lot! works great!

The Mailman
12-09-2011, 05:54 PM
edit: I did the above and found that not putting the <dt> tags in was causing it to fly out of the table

https://vborg.vbsupport.ru/external/2011/12/46.jpg

LifesGreatestGift
12-09-2011, 06:28 PM
edit: I did the above and found that not putting the <dt> tags in was causing it to fly out of the table

https://vborg.vbsupport.ru/external/2011/12/46.jpg

Yes, i was just giving you the "core" code, you may style it as you wish depending on the placement etc.

feel free to style it as needed.

Dadopeman
12-10-2011, 12:37 PM
Any help for vbulletin 3.8 and second of all.

How can we have +/- thing next to the Reputation: 10

Reputation: 10 +/-

ShortBuss
11-09-2012, 09:20 PM
Was just tweaking in VB4.2 PL3 and I added LifesGreatestGift's suggestion above the standard template code & it works as planned. Starting at line 40 of postbit_legacy

<vb:if condition="$show['reputation']">
<span>
<dt>Rep Power: {vb:raw post.reputation}</dt>
</span>
<span class="postbit_reputation" id="repdisplay_{vb:raw post.postid}_{vb:raw post.userid}" title="{vb:raw post.username} {vb:raw post.level}">
<vb:each from="reputationdisplay" value="row">
<img class="{vb:raw row.class}" src="{vb:stylevar imgdir_reputation}/reputation_{vb:raw row.posneg}{vb:raw row.imgext}" alt="" />{vb:raw row.rowend}
</vb:each>
</span>
</vb:if>