Site Links
Home
Features
Documentation
Pricing & Order
Members Area
Support Options
UBBDev.com
UBBWiki.com
Who's Online
3 registered (Bjab, Stan, Dunny), 25 Guests and 14 Spiders online.
Key: Admin, Global Mod, Mod
Featured Member
Registered: 12/25/03
Posts: 125
Top Posters (30 Days)
Ruben 51
Gizmo 24
DennyP 24
Dunny 15
SteveS 14
AllenAyres 12
SD 10
dbremer 10
drkknght00 9
doug 8
Latest Photos
OK Corral Shoot Out
Testing
Basildon Train Station
Basildon Town Centre looking from the rounderbout
Basildon Town Square
Page 1 of 2 1 2 >
Topic Options
#202542 - 12/04/07 04:18 AM Ticker Tape style news?
JEFFD Offline
journeyman
Registered: 07/09/04
Posts: 88
Last question today ;-)

Is it possible to add some java script so _ can customise some scrolling messages on the board?


script below:
 Code:
<script language="JavaScript1.2">
<!--

/*
Typing Scroller
Submitted by bengaliboy00@hotmail.com (hp: http://www.angelfire.com/nt/bengaliboy/)
With modifications by Dynamicdrive.com
For full source code, usage terms, and 100s more scripts, visit http://dynamicdrive.com
*/

//Secify scroller contents
var line=new Array()
line[1]="This is an awsome script"
line[2]="It brings up the text you want..."
line[3]="One letter at a time"
line[4]="You can add and subtract lines as you like."
line[5]="It\'s very cool and easy to use"

//Specify font size for scoller
var ts_fontsize="16px"

//--Don't edit below this line

var longestmessage=1
for (i=2;i<line.length;i++){
if (line[i].length>line[longestmessage].length)
longestmessage=i
}

//Auto set scroller width
var tscroller_width=line[longestmessage].length

lines=line.length-1 //--Number of lines

//if IE 4+ or NS6
if (document.all||document.getElementById){
document.write('<form name="bannerform">')
document.write('<input type="text" name="banner" size="'+tscroller_width+'"')
document.write('  style="background-color: '+document.bgColor+'; color: '+document.body.text+'; font-family: verdana; font-size: '+ts_fontsize+'; font-weight:bold; border: medium none" onfocus="blur()">')
document.write('</form>')
}

temp=""
nextchar=-1;
nextline=1;
cursor="\\"
function animate(){
if (temp==line[nextline] & temp.length==line[nextline].length & nextline!=lines){
nextline++;
nextchar=-1;
document.bannerform.banner.value=temp;
temp="";
setTimeout("nextstep()",1000)}
else if (nextline==lines & temp==line[nextline] & temp.length==line[nextline].length){
nextline=1;
nextchar=-1;
document.bannerform.banner.value=temp;
temp="";
setTimeout("nextstep()",1000)}
else{
nextstep()}}

function nextstep(){

if (cursor=="\\"){
cursor="|"}
else if (cursor=="|"){
cursor="/"}
else if (cursor=="/"){
cursor="-"}
else if (cursor=="-"){
cursor="\\"}


nextchar++;
temp+=line[nextline].charAt(nextchar);
document.bannerform.banner.value=temp+cursor
setTimeout("animate()",25)}

//if IE 4+ or NS6
if (document.all||document.getElementById)
window.onload=animate
// -->
</script>


Edited by Gizmo (12/04/07 04:07 PM)
Edit Reason: Added [code] tags.
Top
Express Hosting
Express Hosting "We are the official hosting company of UBB.threads. Ask us about our free migration services to migrate your UBB.threads installation."
#202543 - 12/04/07 04:20 AM Re: Ticker Tape style news? [Re: JEFFD]
Yarp™ Offline
Registered: 08/30/06
Posts: 1513
Loc: Breda, NL
Yes \:\)

Combine it with something that retrieves the news items somewhere frmo the forum, and you got a cool thing \:\)
_________________________
Top
#202545 - 12/04/07 04:36 AM Re: Ticker Tape style news? [Re: Yarp™]
JEFFD Offline
journeyman
Registered: 07/09/04
Posts: 88
So I could just cut and paste the java above into the footer for example - won't make the board explode!?? <smile>
Top
#202547 - 12/04/07 04:43 AM Re: Ticker Tape style news? [Re: JEFFD]
Ian Offline
Registered: 06/05/06
Posts: 4337
Loc: Essex, UK
Yes - you can run scripts on any part of your forum - this is after all what many adverts such as Google Adsense is.
Top
#202548 - 12/04/07 04:44 AM Re: Ticker Tape style news? [Re: Ian]
JEFFD Offline
journeyman
Registered: 07/09/04
Posts: 88
thanks Ian/blaaskaak ;-)
Top
#202549 - 12/04/07 04:47 AM Re: Ticker Tape style news? [Re: JEFFD]
JEFFD Offline
journeyman
Registered: 07/09/04
Posts: 88
oh - last q?

Can I have image AND scroller as part of header?
Top
#202553 - 12/04/07 04:55 AM Re: Ticker Tape style news? [Re: JEFFD]
Ian Offline
Registered: 06/05/06
Posts: 4337
Loc: Essex, UK
You can have whatever you like in the header.

I have images, java and a ticker in some forums.

You should have no issues \:\)
Top
#202556 - 12/04/07 05:05 AM Re: Ticker Tape style news? [Re: Ian]
JEFFD Offline
journeyman
Registered: 07/09/04
Posts: 88
again thanks!
Top
#202580 - 12/04/07 11:38 AM Re: Ticker Tape style news? [Re: JEFFD]
ScriptKeeper Offline

veteran
Registered: 12/09/06
Posts: 1420
Loc: UK
Even easier, use <marquee> tags.

 Code:
<marquee>
Type whatever you want here and it will scroll.
</marquee>
Top
#202581 - 12/04/07 11:50 AM Re: Ticker Tape style news? [Re: ScriptKeeper]
Ian Offline
Registered: 06/05/06
Posts: 4337
Loc: Essex, UK
I thought marquee only worked in IE?
Top
Page 1 of 2 1 2 >



Moderator:  AllenAyres, Harold, Ian, Ron M 
Shout Box

Today's Birthdays
No Birthdays
Recent Topics
Due Date Calculator-Calculate When Your Baby is Due
by StewartMyduedate
Today at 12:54 AM
Temporary Password email not being received
by
05/24/12 10:02 PM
Ability to "like" individual posts (not Facebook "likes)
by doug
05/23/12 09:03 AM
Island Permissions
by ThreadsUser
05/22/12 03:03 PM
streaming video
by prkrgrp
05/20/12 07:02 PM
Forum Stats
10491 Members
36 Forums
33842 Topics
181709 Posts

Max Online: 978 @ 06/24/07 11:19 PM
Random Image