View Full Version : Scrolling Announcement
mholtum
04-18-2005, 09:15 AM
What this does is give you a scrolling announcement under your navbar prompting visitors to register for your site and if they are registered and have a post count of 0 it prompts them to post. You can see it in action here. (http://www.ravensrealm.net)
I have it set to display "Please register to participate in the Forums, Chat & Gallery. It is fast, easy & Free." if a unregistered or unlogged in visitor views your site and "Our logs show that you have never posted on the forums! Please take a moment and do so, you will be equally rewarded."
This mod shouldn't take you more that thirty seconds to install.
1: Open your navbar template and find ( at the very bottom )
<!-- / NAVBAR POPUP MENUS -->
</if>
Place directly below:
<if condition="$bbuserinfo[usergroupid] == 2 AND $bbuserinfo['posts'] <= 0">
<table cellpadding="$stylevar[outerborderwidth]" cellspacing="0" border="0" class="tborder" width="$stylevar[tablewidth]" align="center"><tr><td>
<table cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%">
<tr>
<td class="panelsurround" align="center">
<div class="panel"><div align="$stylevar[center]">
<fieldset class="fieldset" style="margin:0px 0px 0px 0px">
<legend>Announcement</legend>
<marquee behavior="scroll" align="center" direction="left" scrollamount="2" scrolldelay="20" onmouseover="this.stop()" onmouseout="this.start()"><strong><phrase 1="$bbuserinfo[username]">$vbphrase[welcome_x]</phrase> Our logs show that you have never posted on the forums! Please take a moment and do so, you will be equally rewarded.</strong></marquee>
</fieldset>
</div></div>
</td>
</tr>
</table>
</td></tr></table><br /><br />
</if>
<if condition="$bbuserinfo[usergroupid] == 1">
<table cellpadding="$stylevar[outerborderwidth]" cellspacing="0" border="0" class="tborder" width="$stylevar[tablewidth]" align="center"><tr><td>
<table cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%">
<tr>
<td class="panelsurround" align="center">
<div class="panel"><div align="$stylevar[center]">
<fieldset class="fieldset" style="margin:0px 0px 0px 0px">
<legend>Announcement</legend>
<marquee behavior="scroll" align="center" direction="left" scrollamount="2" scrolldelay="20" onmouseover="this.stop()" onmouseout="this.start()">
<strong>Please register to participate in the Forums, Chat & Gallery. It is fast, easy & Free</strong>
</marquee>
</fieldset>
</div></div>
</td>
</tr>
</table>
</td></tr></table><br />
</if>
smackLAN
04-29-2005, 10:36 PM
I love it Mike...thanks!!! ***Installed***
mholtum
04-29-2005, 10:41 PM
I love it Mike...thanks!!! ***Installed***
Glad you like it.
http://www.users.qwest.net/~holtumgm/frogdance.gif
petersweb
05-13-2005, 08:57 AM
Well done! -> installed
VVIper
06-18-2005, 10:09 PM
That is very cool, Very easy to install and neat.
Thankyou for sharing
mholtum
06-18-2005, 10:57 PM
I am glad you all like it..
notorious
07-11-2005, 09:12 PM
thats cool it looks great thx for this
sunnycher
07-13-2005, 10:00 PM
Thanks Mike! Love it! INSTALLED :)
mholtum
07-13-2005, 10:13 PM
Glad you like it.
SomeName
07-13-2005, 10:40 PM
That's pretty nifty!
lalotte
08-05-2005, 05:07 PM
Very nice! Thanks!
does the 1.x hacks/addons work for 2.x also ?
mholtum
08-05-2005, 05:44 PM
as this is only a template mod, it isnt version dependant
FroggyStyle
08-17-2005, 09:20 PM
Looks good however even if I am logged in I still see, the please register messsage.
mholtum
08-17-2005, 09:21 PM
there are two messages. 1 telling you to register and 1 if you havent posted..
FroggyStyle
08-17-2005, 09:28 PM
So if I am registered and have many post, I should still the message asking me to register?
mholtum
08-17-2005, 09:30 PM
No, obviously not. If you are registered and many posts and you are seeing the announcemnet, then they copied the code wrong.
FroggyStyle
08-22-2005, 04:31 PM
This what I have"
<if condition="$bbuserinfo[usergroupid] == 2 AND $bbuserinfo['posts'] <= 0">
<table cellpadding="$stylevar[outerborderwidth]" cellspacing="0" border="0" class="tborder" width="$stylevar[tablewidth]" align="center"><tr><td>
<table cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%">
<tr>
<td class="panelsurround" align="center">
<div class="panel"><div align="$stylevar[center]">
<fieldset class="fieldset" style="margin:0px 0px 0px 0px">
<legend>Announcement</legend>
<marquee behavior="scroll" align="center" direction="left" scrollamount="2" scrolldelay="20" onmouseover="this.stop()" onmouseout="this.start()"><strong><phrase 1="$bbuserinfo[username]">$vbphrase[welcome_x]</phrase> Our logs show that you have never posted on the forums! Please note, all accounts with 0 post will be removed after 30 days</strong></marquee>
</fieldset>
</div></div>
</td>
</tr>
</table>
</td></tr></table><br /><br />
</if>
<if condition="$bbuserinfo[usergroupid] == 1">
<table cellpadding="$stylevar[outerborderwidth]" cellspacing="0" border="0" class="tborder" width="$stylevar[tablewidth]" align="center"><tr><td>
<table cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%">
<tr>
<td class="panelsurround" align="center">
<div class="panel"><div align="$stylevar[center]">
<fieldset class="fieldset" style="margin:0px 0px 0px 0px">
<legend>Announcement</legend>
<marquee behavior="scroll" align="center" direction="left" scrollamount="2" scrolldelay="20" onmouseover="this.stop()" onmouseout="this.start()">
<strong>You must register to participate in the Forums</strong>
</marquee>
</fieldset>
</div></div>
</td>
</tr>
</table>
And I am registered and have many post and I see the onet telling me I must register.
EDIT:
I think I see the problem. I have mutiple user groups on my board, I see the script is refering to group 1 and group 2. I am not in either of those groups, is it possible to to add multiple groups to each???
blackpheonix
09-03-2005, 04:55 PM
i dont use the navbar for my portal any way i can add this with out enabling navbar?
i changed your code slightly the scrolling text is now links.
one points to register and the other points to my introduction forum.
<if condition="$bbuserinfo[usergroupid] == 2 AND $bbuserinfo['posts'] <= 0">
<table cellpadding="$stylevar[outerborderwidth]" cellspacing="0" border="0" class="tborder" width="$stylevar[tablewidth]" align="center"><tr><td>
<table cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%">
<tr>
<td class="panelsurround" align="center">
<div class="panel"><div align="$stylevar[center]">
<fieldset class="fieldset" style="margin:0px 0px 0px 0px">
<legend>Announcement</legend>
<marquee behavior="scroll" align="center" direction="left" scrollamount="2" scrolldelay="20" onmouseover="this.stop()" onmouseout="this.start()"><strong><phrase 1="$bbuserinfo[username]">$vbphrase[welcome_x]</phrase><a href="/forum/forumdisplay.php?f=3">Our logs show that you have never posted on the forums! Why not introduce your self in our introduction forum.</strong></a></marquee>
</fieldset>
</div></div>
</td>
</tr>
</table>
</td></tr></table><br /><br />
</if>
<if condition="$bbuserinfo[usergroupid] == 1">
<table cellpadding="$stylevar[outerborderwidth]" cellspacing="0" border="0" class="tborder" width="$stylevar[tablewidth]" align="center"><tr><td>
<table cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%">
<tr>
<td class="panelsurround" align="center">
<div class="panel"><div align="$stylevar[center]">
<fieldset class="fieldset" style="margin:0px 0px 0px 0px">
<legend>Announcement</legend>
<marquee behavior="scroll" align="center" direction="left" scrollamount="2" scrolldelay="20" onmouseover="this.stop()" onmouseout="this.start()"><a href="/forum/register.php">
<strong>Please register to participate in the Forums, Chat & Gallery. It is fast, easy & Free</strong></a>
</marquee>
</fieldset>
</div></div>
</td>
</tr>
</table>
</td></tr></table><br />
</if>
a few things you have to do if your a using an introduction forum.
Firstly.
Find
<a href="/forum/forumdisplay.php?f=3>
and point the link in the right direction of your introduction forum.
If you dont want or have the introdution forum revert back to the origanal code
Find
<a href="/forum/forumdisplay.php?f=3">Our logs show that you have never posted on the forums! Why not introduce your self in our introduction forum.</strong></a></marquee>
and replace with
Our logs show that you have never posted on the forums! Please take a moment and do so, you will be equally rewarded.</strong></marquee>
Secondly
Find
<a href="/forum/register.php">
and point the link in the right direction of your register.php file.
and thats that :)
mholtum
09-03-2005, 04:57 PM
Phoenix, You can place the code anywhere you want.
blackpheonix
09-03-2005, 05:00 PM
but in what template i still want it at the top of my portal if poss
mholtum
09-03-2005, 05:33 PM
bottom of the header template, maybe?
blackpheonix
09-03-2005, 05:46 PM
yep that works thanks :)
huijting
09-07-2005, 10:56 AM
Installed , thnx
rammbs
09-20-2005, 10:40 PM
installed. thanks!
Gary Bolton
11-08-2005, 11:39 PM
Very nice hack mholtum, but there is one slight problem in using the "<marquee>" scrolling javscript tag. If you view the scrollbar using Firefox and then minimize your page smaller. You will notice that the scrollbar box and scrolling text does not minimize to fit the page like it does in IE. Instead it will stay full width and go off the page unlike the other forum frames which re-size to fit.
I found this problem out ages ago, it a problem with Firefox not supporting the <marquee> code tag correctly, it's an IE thing only which fully supports it.
So I did this with you code in removing the marguee and making the text red to highlight it better. Now it will work proper in IE and Firefox and all other browsers, all be it without scrolling text if anybody wants the none scolling version showing RED text (can be changed to suit).
<if condition="$bbuserinfo[usergroupid] == 2 AND $bbuserinfo['posts'] <= 0">
<table cellpadding="$stylevar[outerborderwidth]" cellspacing="0" border="0" class="tborder" width="$stylevar[tablewidth]" align="center"><tr><td>
<table cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%">
<tr>
<td class="panelsurround" align="center">
<div class="panel"><div align="$stylevar[center]">
<fieldset class="fieldset" style="margin:0px 0px 0px 0px">
<legend>Announcement</legend>
<strong><font color="red"><phrase 1="$bbuserinfo[username]">$vbphrase[welcome_x]</phrase> Our logs show you've never posted - please make a post or your account may be removed as inactive.</font></strong>
</fieldset>
</div></div>
</td>
</tr>
</table>
</td></tr></table><br /><br />
</if>
<if condition="$bbuserinfo[usergroupid] == 1">
<table cellpadding="$stylevar[outerborderwidth]" cellspacing="0" border="0" class="tborder" width="$stylevar[tablewidth]" align="center"><tr><td>
<table cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%">
<tr>
<td class="panelsurround" align="center">
<div class="panel"><div align="$stylevar[center]">
<fieldset class="fieldset" style="margin:0px 0px 0px 0px">
<legend>Announcement</legend>
<strong><font color="red">Please register to participate in the Forum discussion taking place - it's fast, easy and free!</font></strong>
</fieldset>
</div></div>
</td>
</tr>
</table>
</td></tr></table><br />
</if>
None the less, still a very cool hack and very useful indeed. :)
nengrong
11-09-2005, 05:27 PM
I am wondering how to use this anouncement box to display global announcement. Thanks.
vBulletin® v3.7.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.