Themes By Design

Marquee on forum home

julia
01-28-2007, 04:20 PM
Rolf, i was trying to pm you, but couldn't. How did you do that scrolling welcome message, what is the name for that hack? Was it hard to make?
I think that Peggy's style suits your forum very well. Very birdish.

rolfw
01-28-2007, 05:06 PM
I got it from www.dynamicdrive.com (http://www.dynamicdrive.com), http://www.dynamicdrive.com/dynamicindex2/cmarquee.htm very easy to install, just cut and paste and place at the top of the forumhome template, just below
$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
<!-- no cache headers -->
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="-1" />
<meta http-equiv="Cache-Control" content="no-cache" />
<!-- end no cache headers -->
$headinclude
<title><phrase 1="$vboptions[bbtitle]">$vbphrase[x_powered_by_vbulletin]</phrase></title>
</head>
<body>
$header
$navbar
, if you have a look at the page source of my home page, then you will see where it starts. you can email me at rolf at wellenkamp.com if you have problems.

I fished around to find the appropriate background colour, but it wasn't difficult. :)

PS. Sorry, PMs appear to be disabled by default, have now enabled. :)

rolfw
01-28-2007, 05:15 PM
Here is the complete template code on the thames valley birds forum:
</head>
<body>
$header
$navbar

<!-- Start Rolf's Bit -->
<center>
<script language="JavaScript1.2">

/*
Cross browser Marquee script- © Dynamic Drive (www.dynamicdrive.com)
For full source code, 100's more DHTML scripts, and Terms Of Use, visit http://www.dynamicdrive.com
Credit MUST stay intact
*/

//Specify the marquee's width (in pixels)
var marqueewidth="750px"
//Specify the marquee's height
var marqueeheight="25px"
//Specify the marquee's marquee speed (larger is faster 1-10)
var marqueespeed=2
//configure background color:
var marqueebgcolor="#D1BD9B"
//Pause marquee onMousever (0=no. 1=yes)?
var pauseit=1

//Specify the marquee's content (don't delete <nobr> tag)
//Keep all content on ONE line, and backslash any single quotations (ie: that\'s great):

var marqueecontent='<nobr><font color="red" size="3"><b>Welcome to the brand new Berkshire and Thames Valley Bird Forum, we hope you will find the forum interesting, take the time to register and perhaps introduce yourself. Why not become one of our founder members.</b></font></nobr>'


////NO NEED TO EDIT BELOW THIS LINE////////////
marqueespeed=(document.all)? marqueespeed : Math.max(1, marqueespeed-1) //slow speed down by 1 for NS
var copyspeed=marqueespeed
var pausespeed=(pauseit==0)? copyspeed: 0
var iedom=document.all||document.getElementById
if (iedom)
document.write('<span id="temp" style="visibility:hidden;position:absolute;top:-100px;left:-9000px">'+marqueecontent+'</span>')
var actualwidth=''
var cross_marquee, ns_marquee

function populate(){
if (iedom){
cross_marquee=document.getElementById? document.getElementById("iemarquee") : document.all.iemarquee
cross_marquee.style.left=parseInt(marqueewidth)+8+"px"
cross_marquee.innerHTML=marqueecontent
actualwidth=document.all? temp.offsetWidth : document.getElementById("temp").offsetWidth
}
else if (document.layers){
ns_marquee=document.ns_marquee.document.ns_marquee 2
ns_marquee.left=parseInt(marqueewidth)+8
ns_marquee.document.write(marqueecontent)
ns_marquee.document.close()
actualwidth=ns_marquee.document.width
}
lefttime=setInterval("scrollmarquee()",20)
}
window.onload=populate

function scrollmarquee(){
if (iedom){
if (parseInt(cross_marquee.style.left)>(actualwidth*(-1)+8))
cross_marquee.style.left=parseInt(cross_marquee.st yle.left)-copyspeed+"px"
else
cross_marquee.style.left=parseInt(marqueewidth)+8+"px"

}
else if (document.layers){
if (ns_marquee.left>(actualwidth*(-1)+8))
ns_marquee.left-=copyspeed
else
ns_marquee.left=parseInt(marqueewidth)+8
}
}

if (iedom||document.layers){
with (document){
document.write('<table border="0" cellspacing="0" cellpadding="0"><td>')
if (iedom){
write('<div style="position:relative;width:'+marqueewidth+';height:'+ marqueeheight+';overflow:hidden">')
write('<div style="position:absolute;width:'+marqueewidth+';height:'+ marqueeheight+';background-color:'+marqueebgcolor+'" onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed">')
write('<div id="iemarquee" style="position:absolute;left:0px;top:0px"></div>')
write('</div></div>')
}
else if (document.layers){
write('<ilayer width='+marqueewidth+' height='+marqueeheight+' name="ns_marquee" bgColor='+marqueebgcolor+'>')
write('<layer name="ns_marquee2" left=0 top=0 onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed"></layer>')
write('</ilayer>')
}
document.write('</td></table>')
}
}
</script>
</center>
<!-- End Rolf's Bit -->You will notice the idiot prompts that Chris my fellow admin has inserted for me. :giggle:


PS. Oops, sorry Peggy, got carried away there and hi-jacked the thread, can you move the non-relevant posts please. :blush:

julia
01-28-2007, 06:05 PM
Ok, i see, i am gonna have to think since the text is always there, i thought it only shows to unregistered members. Thanks for your help.

rolfw
02-06-2007, 12:18 PM
Just an update to this Julia, have found a small piece of code (from vb.org) to insert before and after the marguee, this means that it will disappear when someone logs in. Just experimenting now as to whether I can add a second personalised marquee for logged in members. :)

<if condition="$show['guest']"><div align="center"> put marquee code here</div></if>

julia
02-07-2007, 09:22 PM
Hey Rolf, did you just remove your marquee ?

rolfw
02-10-2007, 05:02 PM
Yes temporarily Julia, as I have a welcome header message hack which changes the message depending on whether the user is logged in, whether he/she has posted recently etc. :)

I will put it back with something else in a while, perhaps use it for latest news.. :)