PDA

View Full Version : How to add reputation link to decimal


Unfolded90
01-20-2013, 05:49 PM
Currently i have my postbit setup like this

vb:if condition="$post['joindate']"><dt>{vb:rawphrase join_date}</dt> <dd>{vb:raw post.joindate}</dd></vb:if>
<vb:if condition="$post['field2']"><dt>{vb:rawphrase location_perm}</dt> <dd>{vb:raw post.field2}</dd></vb:if>
<vb:if condition="$post['age']"><dt>{vb:rawphrase age}</dt> <dd>{vb:raw post.age}</dd></vb:if>
<vb:if condition="$show['reputation']">
<dt>Rep</dt> <dd>{vb:raw post.reputation}</dd>
</vb:if>

I would like to have a URL to reputation when clicking on the decimal

ikopylov
01-20-2013, 08:44 PM
Currently i have my postbit setup like this

vb:if condition="$post['joindate']"><dt>{vb:rawphrase join_date}</dt> <dd>{vb:raw post.joindate}</dd></vb:if>
<vb:if condition="$post['field2']"><dt>{vb:rawphrase location_perm}</dt> <dd>{vb:raw post.field2}</dd></vb:if>
<vb:if condition="$post['age']"><dt>{vb:rawphrase age}</dt> <dd>{vb:raw post.age}</dd></vb:if>
<vb:if condition="$show['reputation']">
<dt>Rep</dt> <dd>{vb:raw post.reputation}</dd>
</vb:if>

I would like to have a URL to reputation when clicking on the decimal
Replace with this

<vb:if condition="$show['reputation']">
<span class="postbit_reputation" id="repdisplay_{vb:raw post.postid}_{vb:raw post.userid}">
Репутация:
<b>
<vb:if condition="$post[reputation] >= 0">
<font color="green">{vb:raw post.reputation}</font>
<vb:else />
<font color="red">{vb:raw post.reputation}</font>
</vb:if>
</b>
<a class="popupctrl reputation" title="{vb:rawphrase reputation}" href="reputation.php?{vb:raw session.sessionurl}do=addreputation&amp;p={vb:raw post.postid}" rel="nofollow" id="reputation_{vb:raw post.postid}">
<b>[<font color="green">+</font>/<font color="red">-</font>]</b>
</a>
</span>
</vb:if>


Find in postbit.css

/* reputation image */
.postbit_reputation {
clear: both;
display: block;
font-size: 0;
padding-left: 2px;
}

Replace with:

/* reputation image */
.postbit_reputation {
clear: both;
display: block;
}