PDA

View Full Version : couple of questions


control1110
09-23-2007, 01:42 AM
If I wanted something on my forumhome to only show up for only a certain usergroup or even just a certain user what would the if condition statement look it.

and

I was looking at this site here

http://forum.bodybuilding.com/

and I like how they had the whole section up on the top that shows that registration is free and what not and I was wondering how to do that.

Thanks

WhaLberg
09-23-2007, 02:03 AM
1) To show something to specific usergroup(s) use the following code:
<if condition="is_member_of($bbuserinfo, x,y,z)">codes</if>


2) They just have changed the first visit message which is always shown to unregistered users. You can edit it from AdminCP.

AdminCP -> Languages & Phrases -> Search in Phrases
Enter "first_visit_message" as the Search for Text value
Check "Phrase Variable Name Only"
Click Find button.


Good luck.

control1110
09-23-2007, 02:05 AM
ok thank you now that code for for a usergroup correct? what if I just wanted just a particular userid?

also at bodybuilder.com if you register for an account on their forum and don't activate it through the e-mail at the very top of the page after you log in it shows you that you have not activated the account and you cannot make post. Is that sometime that is built into vbulletin or is that an extra mod I can download? Thank you

WhaLberg
09-23-2007, 02:20 AM
If you just want to show for an userid, use that then:
<if condition="$bbuserinfo['userid'] == 'x'">codes</if>


Telling a user that he hasn't activated his account is also done via the first code I have given you or you can use this one.
<if condition="$bbuserinfo['usergroupid'] == '3'">You haven't activated your account.</if>


3 is the default usergroupid of the "Users Awaiting Email Confirmation".

control1110
09-23-2007, 03:32 AM
ok thank you for all that its all working good. Just one more question. What is the vbulletin code to show a users username. Like I want a message to say Welcome, username. How do I do that?

nevermind I figured it out.