View Full Version : Default Signature Not Showing
Dave Hawley
06-04-2007, 06:51 AM
Hi All
I am using the code below in the PostBit Template (3.5.4) to show a default signature for those who don't have one set up. The problem is it doesn't show the DEFAULT SIGNATURE HERE for users with no signature. However, if I remove the top If statement (<if condition="$post['signature']">) and its matching </if> it does show when a user doesn't have a signature. The problem of course is users with Signatures turned off are seeing the Default Signature on all posts!
<if condition="$post['signature']">
<!-- sig -->
<div>
__________________<br />
<if condition="$post[signature]">$post[signature]
<else />
DEFAULT SIGNATURE HERE
</if>
</div>
<!-- / sig -->
</if>
Dismounted
06-04-2007, 07:16 AM
The first condition of $post['signature'] only exists if the user has a signature, so you're effectively canceling out the rest of the code when you have that at the top.
Dave Hawley
06-04-2007, 07:40 AM
What would I use to have it show a default sig for those without one, BUT those with Show Signatures unchecked in their user CP wouldn't see any?
I thought <if condition="$post['signature']"> was to determine if the user viewing the Thread has Show Signatures checked/unchecked in their user CP?
If I take out the top IF, those with Show Signatures unchecked see the default sig on all posts.
Dismounted
06-04-2007, 11:48 AM
<if condition="$post['signature']"> simply means "Display the following if $post['signature'] is true (any value other than 0)".
Dave Hawley
06-04-2007, 11:22 PM
Yes I know, thanks. My question is still not answered though;What would I use to have it show a default sig for those without one, BUT those with Show Signatures unchecked in their user CP wouldn't see any?
BTW, the <if condition="$post['signature']"> is the default code for vBullentin. That is, the standard code is as shown below;
<if condition="$post['signature']">
<!-- sig -->
<div>
__________________<br />
<if condition="$post[signature]">$post[signature]
</if>
</div>
<!-- / sig -->
</if>
Michael Biddle
06-05-2007, 03:41 AM
<a href="https://vborg.vbsupport.ru/showthread.php?t=143158" target="_blank">https://vborg.vbsupport.ru/showthread.php?t=143158</a>
That allows you to have a default signature per usergroup
sonichero
06-05-2007, 04:08 AM
<if condition-"$show['signature']">
fixed... that should be the first one... then $post
Dave Hawley
06-05-2007, 07:10 AM
Thanks sonichero, that makes sense, but when used as shown below it stops the default signatures from showing even though I have Show Signatures checked in the my user CP.
<if condition="$show['signature']">
<!-- sig -->
<div>
__________________<br />
<if condition="$post[signature]">$post[signature]
<else />
DEFAULT SIG HERE
</if>
</div>
<!-- / sig -->
</if>
Dave Hawley
06-07-2007, 01:53 AM
Does anyone have any idea when <if condition="$show['signature']"> is used it stops all signatures from showing regardless of Show Signatures being checked/unchecked in the user CP?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.