The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Show Image in First Post by Member on Page but not Subsequent
To place an image in the first post of a particular member on a page but not any subsequent post I modified the template "postbit" to include
Code:
<if condition="$post[userid] == 2 AND ## What should I put here? ##"> <phrase>$vbphrase[image_code]</phrase> </if> Thank you! |
#2
|
|||
|
|||
You could do something like
HTML Code:
<if condition="$post[userid] == 2 AND !$uniquevariablename AND $uniquevariablename = true">
|
#3
|
|||
|
|||
I'm not sure I know what you mean. The code you specified would never be true because a variable can't both be false and true at the same time.
|
#4
|
|||
|
|||
I used an assignment operator, not a comparision operator.
|
#5
|
|||
|
|||
Yes, thank you, I see that now. And it seems like it should work, but it doesn't. Are you sure you can set variables and have them retain their value from a template? Perhaps some code in showthread.php may work?
|
#6
|
|||
|
|||
Which template, the postbit template?
I thought it would work, but it might not now days. Try using (for both) $post['uniquevariable'] $threadinfo['uniquevariable'] or !$GLOBALS['uniquevariable'] AND $uniquevariable = true (or $GLOBALS['uniquevariable'] for both) Not sure of the variable scope unfortunatly. |
#7
|
|||
|
|||
merk, you're GREAT! $GLOBALS['uniquevariable'] for both worked!
Each one of the other suggestions had the result of creating the images in all posts by that member. Thanks! |
#8
|
|||
|
|||
Its very interesting that the $GLOBALS one worked (i didnt think it would), I feel dirty using it though.
But if it works, it works hey |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|