Log in

View Full Version : How to call a user through a template


Platinumgamer
07-22-2008, 02:47 AM
Hey,

I've got a question that should be relatively simple (I used to know this myself, but it's been quite some time since I've done any real modding) -- how do you call an individual user through a template?

For example, I'm trying to find a way to have a certain posticon display for one user, by default, that has somewhat become their trademark (in this instance, let's say it's the sad posticon). So, through conditionals, I should be able to have something along the lines of the following inside the show[messagicon] tag:

<if condition="$*HEREISWHEREWECALLTHEUSER*">PATH_TO_IMAGE <else /> $post[iconpath]</if>"

Shouldn't I?

Well, the question is more related to, how do I call that specific user, rather than the validity of the tag. I know $bbuserinfo will display the names, but I'm looking to call a user, rather than name them. Is there a way to do that?

Thanks!

RLShare
07-22-2008, 02:53 AM
I don't understand your question, what do you mean call a user?

Platinumgamer
07-22-2008, 02:59 AM
I'm phrasing it wrong, I know.

I mean, I'm trying to set up a condtional wherein a specific user has a posticon display for them in the postbit in place of any other posticon. As in, a custom posticon that only one user will have. I still don't think I'm explaining it right, but it's something to that effect.

Let me explain it this way -- I've got a user that posts using the same posticon over and over, every time. I'm trying to set it up so that that posticon displays beside all of their posts without it being selected. So, I need the template to single out that user's id, and no other groups or users.

blind-eddie
07-22-2008, 03:05 AM
Look in the following link's, to see if this point's you in the right directing.

https://vborg.vbsupport.ru/showthread.php?t=150551&highlight=extra+image+within+postbit

https://vborg.vbsupport.ru/showthread.php?t=143152&highlight=extra+image+within+postbit

https://vborg.vbsupport.ru/showthread.php?t=105286&highlight=extra+image+within+postbit

Platinumgamer
07-22-2008, 03:09 AM
That first one somewhat works, as the user is currently the only member of a group, so that should work for the time being; however, as more users will likely wind up within the group he is currently in, can we single out a userid in a template, or is that not possible?

(I seem to remember doing something very similar to this a long time ago, so I would assume it's possible, I just can't remember how)

Just the same, thanks for the links!

RLShare
07-22-2008, 03:21 AM
If its in the postbit you can use



<if condition=''$post[userid]==1">
posticon code
</if>


Replace 1 with the users userid.

Platinumgamer
07-22-2008, 03:23 AM
Excellent, thanks to both of you for the help!