TinyPortal

Development => Block Codes => Topic started by: hawkeye on January 26, 2006, 12:13:53 AM

Title: Ticker snippet
Post by: hawkeye on January 26, 2006, 12:13:53 AM
Found this one today also. Use javascript/html box.You can change the font color and the background color. You can make it wider if required and you can set the speed of the scroll by changing the "scrollamount" variable. The higher the number, the faster the speed of scroll. This one works well on the front page. I cant seem to figure out how to separate the entries. Currently, I change font color to separate entries. See it in action at www.p3challenge.com on the front page.

<div align="center"><FONT
color="#ffffff" size="+1"><MARQUEE bgcolor="#000080"
direction="right" loop="20" scrollamount="4" width="75%"><STRONG>This
works well.</STRONG></MARQUEE></FONT></DIV>
Title: Re: Ticker snippet
Post by: Xarcell on January 26, 2006, 12:45:46 AM
Sweet, but did you know you can use BBC code in posts and articles that make text move from right to left?

move
Title: Re: Ticker snippet
Post by: Xarcell on January 26, 2006, 12:49:58 AM
You can even move images let the user online from this theme.

(https://www.tinyportal.net/smf/Themes/bloczone4/images/useron.gif)
Title: Re: Ticker snippet
Post by: hawkeye on January 26, 2006, 02:57:09 AM
Here is another one if you didnt like the last one. This ticker automatically post at top of your page. It delivers your message only the number of times you program it too, then it disappears. Use in javascript/html box. Alot of you out there may know this one already, what can I say Im a newbie at this stuff. I thought this was a nice find.


<marquee id="alertit" style="position:absolute;left:0px;top:0;background-color:#FFFFE6" onMouseover="this.scrollAmount=1" onMouseout="this.scrollAmount=speed"></marquee>

<script type="text/javascript">

//Customize your message here. Use any HTML desired:
var themsg='<span style="font:italic 22px Arial;color:red;"><b>Breaking News: Microsoft Stock up 10 points! Source: <a href="http://cnn.com" target="_new">CNN</a></b></span>'
var speed=6 //speed of scroller (1-10 or more)
var loops=2 //specify number of times message scrolls across screen (an integer or "infinite")

function populatescroller(){
var windowwidth=iecompattest().clientWidth
document.getElementById("alertit").innerHTML=themsg
document.getElementById("alertit").style.width=windowwidth
document.getElementById("alertit").scrollAmount=speed
document.getElementById("alertit").scrollDelay=20
document.getElementById("alertit").loop=loops
document.getElementById("alertit").onfinish=function(){
document.getElementById("alertit").style.visibility="hidden"
}
}

function iecompattest(){
return (document.compatMode!="BackCompat")? document.documentElement : document.body
}

if (document.all && document.getElementById){
window.onload=populatescroller
window.onresize=populatescroller
}

</script>
Title: Re: Ticker snippet
Post by: Greenbug on August 28, 2006, 05:44:40 PM
Hawkeye your site was hacked by the same people who took down my site just last month. Hmmm I didnt get to see the whatever it is your showing from thispost.

I fixed the site by uploading a new index. file. Worked fine. Looks like some kinf of redirect page.

Title: Re: Ticker snippet
Post by: gundamzero on August 28, 2006, 06:17:27 PM
Yikes!  :coolsmiley: