The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Need help with a minor condition or maybe rewriting this
Code:
<vb:if condition="$post['fieldxx']"> <div class="jdm_plate" style="background-image:url(http://path-to/license_plates/{vb:raw post.fieldxx}.png);"> <p><b>{vb:raw post.fieldyy}</b></p> </div> </vb:if> Specifically for style="background-image:url(http://path-to/license_plates/{vb:raw post.fieldxx}.png so what happens is when a user sets that id it changes a bg in a postbit but all the postbits will look identical because its chaging it for the div its not a per user thing. How can i make this so that its different per user instead of the same background for who ever has a xx value. Make sense? demo page http://www.nycjdm.com/showthread.php...a-tl-front-lip i want the license plates which is fieldxx to be unique to one another not be all the same |
#2
|
|||
|
|||
I'm not sure I understand, but I don't see why one user setting fieldxx would change it for all users because you have a </div> at the end. But I suppose something in fieldyy could be interfering.
|
#3
|
|||
|
|||
thanks for the quick response but
style="background-image:url(http://path-to/license_plates/{vb:raw post.fieldxx}.png); is added to the div to make the background change depending on the xx input. the problem is it doesnt just apply to the users posts it applys to anyone who has an entry in that custom field. So everyone has the same div bg instead of each user div having its own bg depending on xx inserted into their profile. |
#4
|
|||
|
|||
OK, maybe I misunderstood - I was assuming this goes in the postbit (or postbit_legacy) template, and you want it to reflect the value of fieldxx from the post author's profile? It looks like that's what should be happening.
|
#5
|
|||
|
|||
yeah i wrapped it like this now it works
Code:
<vb:if condition="$post['userid']"> <vb:if condition="$post['field44']"> <div class="jdm_plate" style="background-image:url(http://nycjdm.com/images/styles/blackstealth/misc/license_plates/{vb:raw post.field44}.png);"> <p><b>{vb:raw post.field45}</b></p> </div> </vb:if> </vb:if> |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|