vBulletin

Thank you for visiting. This is our website archive. Please visit our main website by clicking the banner above.
vBulletin FAQ is dedicated to helping the forum owner build, manage and profit from his vBulletin Forum
vBulletin Web Hosting - Free skins and styles for your vBulletin - Search Engine Optimization




Different banner before and after login!

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]">
&nbsp;
</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]">
&nbsp;
</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.


vBulletin

seo book

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum