PDA

View Full Version : Show users sig once per page


burrelly
11-07-2004, 10:32 PM
I am looking for a mod that makes a users Signature appear only once per page.

Running VB 3.0.3

Thanks

CarCdr
11-07-2004, 11:06 PM
You can do this in the template, using a trick that creates a value that lives in PHP. Presuming you use the regular postbit to display posts, as opposed to the legacy postbit, then look in in the "postbit" template for these lines: <if condition="$post['signature']">
<!-- sig -->
<div>
__________________<br />
$post[signature]
</div>
<!-- / sig -->
</if>The line you want to replace is the first one, the "<if ... >" test.

Try replacing it with this:
<if condition="$post['signature'] AND !$saw_signature_for[$post[userid]] AND $saw_signature_for[$post[userid]]=1">
In plain english, what this test means is:

if there is a user signature for this post
AND if I have not yet seen it
THEN note I have seen it and output the HTML for it
For the same page, the next time that a post is seen from this user, the second test will fail and the signature will not be displayed.

burrelly
11-07-2004, 11:14 PM
Doesent Work i am using Postbit Legacy

all-the-vb
11-07-2004, 11:32 PM
<a href="https://vborg.vbsupport.ru/showthread.php?t=60785" target="_blank">https://vborg.vbsupport.ru/showthread.php?t=60785</a>

burrelly
11-07-2004, 11:37 PM
Thats it sorted :)

Thanks

Titus
11-17-2004, 01:04 AM
If you're using postbit_legacy (like I am) this template conditional will work.

Find in postbit_legacy:
<if condition="$post['signature']">
Replace with:
<if condition="$post['signature'] AND !$vboptions['shownsigs'][$post[userid]] AND $vboptions['shownsigs'][$post[userid]] = true">

Works like a charm for me. Note, I did not write this, I found it on vBulletin.com (http://www.vbulletin.com/forum/printthread.php?t=90108) after looking here first.