View Full Version : adding something to 1 users postbit
cashpath
08-17-2004, 02:35 AM
What is the easiest way to add something to only 1 users postbit?
gfxhavenowner
08-17-2004, 02:41 AM
I would open the postbit template, find where you want to put it, and use an if statement that checks the users id.
cashpath
08-17-2004, 12:35 PM
could someone give me an example of what would be a good if statement? Sorry I do not know PHP. (I was kind of wishing there was a hack that allowed the admin to insert things into individual postbits...)
gfxhavenowner
08-17-2004, 01:41 PM
It would look something like this:
<if condition="$bbuserinfo[userid]==xxx">
text
</if>
Where xxx is the user id number, and text is the text you want in the postbit.
sblum
08-17-2004, 03:54 PM
You could also create a template, such as $customuserinfo and put the conditional(s) in there and just include the template in the postbit. This is much like what the arcade hack does for their award system. This way youc ould include multiple conditionals for multiple users without cluttering up the postbit.
cashpath
08-17-2004, 09:29 PM
OK I made a template called customuserpostbit
Then I put this code in it
<if condition="$bbuserinfo[userid]==1">
Testing the custom thing
</if>
Then I went into the template postbit and added a line
$customuserpostbit
It did not show up in my postbit though.. can someone tell me what I did wrong please?
Thanks
cashpath
08-17-2004, 09:34 PM
Ok I also tried adding the line
$post[customuserpostbit]
That didn't work either.. BTW I put it right under the line
$post[arcadeawards]
House_of_Crazed
08-17-2004, 09:47 PM
You need to declare the template in the file itself.
HoC
cashpath
08-17-2004, 09:59 PM
uhhhmm.. yeah..
:) Okay thanks
cashpath
08-17-2004, 10:17 PM
Ok I have no idea how to do that "declaring" or whatever so I tried adding this line stright to the postbit
<if condition="$bbuserinfo[userid]==1">
<img src="/forum/images/04trophx.gif"></img>
</if>
But it is showing the pictures on all users? Anyone know why its not working for just the 1 user?
Thanks
cashpath
08-18-2004, 03:33 AM
Possibly I need to add quote's somewhere or something?
deathemperor
08-18-2004, 04:06 AM
lol, don't make thing hard.
use an if condition like this with postbit ONLY:
<if condition="$post[userid]==1">
<img src="/forum/images/04trophx.gif"></img>
</if>
it should work fine
cashpath
08-18-2004, 10:34 AM
Thank you that worked (but you knew it would :) )
I love this place :) :) :)
deathemperor
08-18-2004, 02:35 PM
glad to hear that
and I knew you would do
sblum
08-18-2004, 03:08 PM
bbuserinfo[xxx] calls information from the person VIEWING the thread. So for every post, it thinks "OK, does the user viewing the thread have userid = 1? Yeah, he does, so display this." post[xxx] calls information from the author of an individual post.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.