Site Links
Home
Features
Documentation
Pricing & Order
Members Area
Support Options
UBBDev.com
UBBWiki.com
Who's Online Now
0 registered members (), 64 guests, and 200 spiders.
Key: Admin, Global Mod, Mod
Member Spotlight
Morgan
Morgan
Sweden
Posts: 572
Joined: June 2006
Show All Member Profiles 
Top Posters(30 Days)
Ruben 29
Gizmo 27
fuzzy47 24
isaac 24
Morgan 12
Basil 5
Latest Photos
Testing to drag photos
Comfortable Cats
Test
BSA photos
Chinese Buddhist temple.
Previous Thread
Next Thread
Print Thread
Ticker Tape style news? #202542
12/04/07 05:18 AM
12/04/07 05:18 AM
Joined: Jul 2004
Posts: 88
J
JEFFD Offline OP
journeyman
JEFFD  Offline OP
journeyman
J
Joined: Jul 2004
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>

Last edited by Gizmo; 12/04/07 05:07 PM. Reason: Added [code] tags.
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."
Re: Ticker Tape style news? [Re: JEFFD] #202543
12/04/07 05:20 AM
12/04/07 05:20 AM
Joined: Aug 2006
Posts: 1,530
Breda, NL
Yarp™ Offline
veteran
Yarp™  Offline
veteran
Joined: Aug 2006
Posts: 1,530
Breda, NL
Yes smile

Combine it with something that retrieves the news items somewhere frmo the forum, and you got a cool thing smile


[Linked Image]
Re: Ticker Tape style news? [Re: Yarp™] #202545
12/04/07 05:36 AM
12/04/07 05:36 AM
Joined: Jul 2004
Posts: 88
J
JEFFD Offline OP
journeyman
JEFFD  Offline OP
journeyman
J
Joined: Jul 2004
Posts: 88
So I could just cut and paste the java above into the footer for example - won't make the board explode!?? <smile>


Re: Ticker Tape style news? [Re: JEFFD] #202547
12/04/07 05:43 AM
12/04/07 05:43 AM
Joined: Jun 2006
Posts: 4,373
Essex, UK
I
Ian Offline
Carpal Tunnel
Ian  Offline
Carpal Tunnel
I
Joined: Jun 2006
Posts: 4,373
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.

Re: Ticker Tape style news? [Re: Ian] #202548
12/04/07 05:44 AM
12/04/07 05:44 AM
Joined: Jul 2004
Posts: 88
J
JEFFD Offline OP
journeyman
JEFFD  Offline OP
journeyman
J
Joined: Jul 2004
Posts: 88
thanks Ian/blaaskaak ;-)

Re: Ticker Tape style news? [Re: JEFFD] #202549
12/04/07 05:47 AM
12/04/07 05:47 AM
Joined: Jul 2004
Posts: 88
J
JEFFD Offline OP
journeyman
JEFFD  Offline OP
journeyman
J
Joined: Jul 2004
Posts: 88
oh - last q?

Can I have image AND scroller as part of header?

Re: Ticker Tape style news? [Re: JEFFD] #202553
12/04/07 05:55 AM
12/04/07 05:55 AM
Joined: Jun 2006
Posts: 4,373
Essex, UK
I
Ian Offline
Carpal Tunnel
Ian  Offline
Carpal Tunnel
I
Joined: Jun 2006
Posts: 4,373
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 smile

Re: Ticker Tape style news? [Re: Ian] #202556
12/04/07 06:05 AM
12/04/07 06:05 AM
Joined: Jul 2004
Posts: 88
J
JEFFD Offline OP
journeyman
JEFFD  Offline OP
journeyman
J
Joined: Jul 2004
Posts: 88
again thanks!

Re: Ticker Tape style news? [Re: JEFFD] #202580
12/04/07 12:38 PM
12/04/07 12:38 PM
Joined: Dec 2006
Posts: 1,420
UK
ScriptKeeper Offline

veteran
ScriptKeeper  Offline

veteran
Joined: Dec 2006
Posts: 1,420
UK
Even easier, use <marquee> tags.

Code
<marquee>
Type whatever you want here and it will scroll.
</marquee>

Re: Ticker Tape style news? [Re: ScriptKeeper] #202581
12/04/07 12:50 PM
12/04/07 12:50 PM
Joined: Jun 2006
Posts: 4,373
Essex, UK
I
Ian Offline
Carpal Tunnel
Ian  Offline
Carpal Tunnel
I
Joined: Jun 2006
Posts: 4,373
Essex, UK
I thought marquee only worked in IE?

Re: Ticker Tape style news? [Re: Ian] #202585
12/04/07 12:56 PM
12/04/07 12:56 PM
Joined: Dec 2006
Posts: 1,420
UK
ScriptKeeper Offline

veteran
ScriptKeeper  Offline

veteran
Joined: Dec 2006
Posts: 1,420
UK
Same here but I thought I'd try it with Firefox before I posted and it worked.

Don't know about other browsers though but unless you're running an Apple forum, 98% of your visitors will be able to see it. If it works with Opera then it's visibility should shoot up to about 98.1% :lol:

Re: Ticker Tape style news? [Re: ScriptKeeper] #202587
12/04/07 12:59 PM
12/04/07 12:59 PM
Joined: Jun 2006
Posts: 4,373
Essex, UK
I
Ian Offline
Carpal Tunnel
Ian  Offline
Carpal Tunnel
I
Joined: Jun 2006
Posts: 4,373
Essex, UK
I guess more browsers recognise it these days.

Re: Ticker Tape style news? [Re: Ian] #202594
12/04/07 02:02 PM
12/04/07 02:02 PM
Joined: Nov 2006
Posts: 3,390
ntdoc Offline
Carpal Tunnel
ntdoc  Offline
Carpal Tunnel
Joined: Nov 2006
Posts: 3,390
Marquee tag {wikipedia}
http://en.wikipedia.org/wiki/Marquee_tag


Compliance
Quote:
The marquee element type was first invented for Microsoft's Internet Explorer and is still supported. The Mozilla Firefox, Opera, and Safari web browsers support it for legacy page compatibility, although many other browsers do not. The tag is considered unofficial in proper XHTML or HTML. An equivalent for the tag is however being designed for the future releases of Cascading Style Sheets. [1] Similar effects can also be achieved through the use of JavaScript on a webpage.

Re: Ticker Tape style news? [Re: Ian] #202607
12/04/07 05:08 PM
12/04/07 05:08 PM
Joined: Jun 2006
Posts: 16,903
Portland, OR; USA
Gizmo Offline
UBB.threads Developer
Gizmo  Offline
UBB.threads Developer
Joined: Jun 2006
Posts: 16,903
Portland, OR; USA
Marquee tags are not xhtml compliant.


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Forums: A Gardeners Forum Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Re: Ticker Tape style news? [Re: Gizmo] #202608
12/04/07 05:08 PM
12/04/07 05:08 PM
Joined: Jun 2006
Posts: 16,903
Portland, OR; USA
Gizmo Offline
UBB.threads Developer
Gizmo  Offline
UBB.threads Developer
Joined: Jun 2006
Posts: 16,903
Portland, OR; USA
I really need to read page 2 before posting wink...


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Forums: A Gardeners Forum Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!

Shout Box
Today's Birthdays
No Birthdays
Recent Topics
Backgroud colors in posts
by fuzzy47. 04/16/18 08:27 PM
Avatar Upload Issue
by fuzzy47. 04/15/18 11:58 AM
Forum database - Table prefix question
by Morgan. 04/15/18 06:45 AM
Old Forum Archives
by TGCsanderson. 04/13/18 06:05 PM
Gallery
by fuzzy47. 04/12/18 09:48 AM
Forum Statistics
Forums36
Topics35,104
Posts191,183
Members12,068
Most Online978
Jun 24th, 2007
Random Image
Powered by UBB.threads™ PHP Forum Software 7.6.2
(Preview build 20180410)