vbulletindude
08-02-2007, 11:56 PM
Hi all
How do I make a different banner before a person logs in (a guest)
and it changes when he logs in?
Also I would like to make the after login one rotating (so as a guest they only see one banner, but after login, there is a rotation between 3 or so other banners)
thanks!
Joeychgo
08-03-2007, 02:16 AM
The easiest way would be to use conditionals.
To do the banner rotation, you'll need a seperate script for that. You can find that here: How To Implement A Random / Rotating Banner (http://www.vbulletin-faq.com/forum/showthread.php?t=5624)
The conditionals you would use would be something like this: (im not that good at conditionals so I think this is how it would be) This would be the entire header template for 3.68 modified to show 2 different banners.
<!-- logo -->
<a name="top"></a>
<if condition="$bbuserinfo['usergroupid'] == 1">
<table border="0" width="$stylevar[outertablewidth]" cellpadding="0" cellspacing="0" align="center">
<tr>
<td align="$stylevar[left]"><a href="$vboptions[forumhome].php$session[sessionurl_q]"><img src="$stylevar[titleimage]" border="0" alt="$vboptions" /></a></td>
<td align="$stylevar[right]">
</td>
</tr>
</table>
[B]<else />
<table border="0" width="$stylevar[outertablewidth]" cellpadding="0" cellspacing="0" align="center">
<tr>
<td align="$stylevar[left]"><a href="$vboptions[forumhome].php$session[sessionurl_q]"><img src="URL TO YOUR BANNER FOR MEMBERS" border="0" alt="$vboptions" /></a></td>
<td align="$stylevar[right]">
</td>
</tr>
</table>
[B]</if>
<!-- /logo -->
<!-- content table -->
$spacer_open
$_phpinclude_output
to use the banner rotator, you would use the code soecified in the banner rotator hack mentioned above ($random_banner[$random_number]) where "URL TO YOUR BANNER FOR MEMBERS" is.
What your seeing here is an IF conditional at work. the part that says "<if condition="$bbuserinfo['usergroupid'] == 1">" means "apply this code below only to members of usergroup 1 -- then you see the </else> which says "for all other usergroups, do this" -- so once someone logs in, they get that banner.