Jump to content
xisto Community
scab_dog

How Do You Make A Thingy Like Marquee How To Do Whats On Top of TRAP17 Forums Pages

Recommended Posts

How Do You Do This:

Posted Image

Its Like a Marque, But Acts Like a GIF, The One On the Top of Xisto Forum Pages. I Really like to know how to do this.

Share this post


Link to post
Share on other sites

How Do You Do This:

Posted Image

Its Like a Marque, But Acts Like a GIF, The One On the Top of Xisto Forum Pages. I Really like to know how to do this.

137195[/snapback]


Ok, so what i think you mean is a banner that changes the message randomly to 1 of several presets. If i were you I'd use javascript, check out http://www.javascriptsource.com/ or http://www.dynamicdrive.com/ for some premade scripts!

 

Hope that helps!

 

Vacant.

Share this post


Link to post
Share on other sites

1. Make a file called message.js

 

2. In message.js, enter the following code:

// CREDITS:// Messagebox with fadeing Background// By Peter Gehrig// Copyright © 2004 Peter Gehrig. All rights reserved.// Permission given to use the script provided that this notice remains as is.// Additional scripts can be found at http://http://ww12.24fun.com//info@24fun.com// 1/08/2004// IMPORTANT:// If you add this script to a script-library or script-archive// you have to add a highly visible link to// http://http://ww12.24fun.com/ on the webpage// where this script will be featured// set your messages. Add as many as you like (you may add additional HTML-tags)var text=new Array()text[0]="message 1"text[1]="message 2"text[2]="message 3"text[3]="message 4"// set the corresponding links // If you don't want to link a message just add a "#" instead of an URLvar textlink=new Array()textlink[0]="http://xisto.com; //link for message 1textlink[1]="#" //link for message 2textlink[2]="http://xisto.com;  //link for message 3textlink[3]="http://xisto.com;  //link for message 4// set the corresponding targets // Acceptable values are "_blank", "_self", "_top" or the name of any framevar texttarget=new Array()texttarget[0]="_blank"texttarget[1]="_self"texttarget[2]="_top"// set the font of the messagesvar textfont="Verdana"// set the font-color of the messagesvar textfontcolor="#000000"// set the rollover-fontcolor of the messagesvar textfontcolorrollover="#FF0000"// set the font-size of the messages (CSS-values)var textfontsize=8.5// set the font-size for Netscape 4x (HTML-values)var textfontsizeHTML=2// set the font backgroundcolor of the textboxvar textbgcolor="#FFFFFF"// set the textweight (normal or bold)var textweight="nomal"// set the fontstyle (normal or italic)var textitalic="normal"// set the width of the textbox (pixels)var textwidth=700// set the height of the textbox (pixels)var textheight=50// set the pause (seconds)var textpause=7// set the width of the bordervar textborder=1// set the color of the bordervar textbordercolor="#FF0000"// set the horizontal alignment of the messages (center, left, right)var textalign="center"// set the vertival alignment of the messages (middle, top, bottom)var textvalign="middle"// do not edit below this linevar textdecoration="none"var textweightA="<b>"var textweightB="</b>"var textitalicA=""var textitalicB=""var transparency=100var transparencystep=2var x_pos=0var y_pos=0var i_text=0var textsplit=""var i_textsplit=0var i_mark=0var tickercontentvar pausefade=30textpause*=1000var oneloopfinished=falsevar browserinfos=navigator.userAgent var ie=document.all&&!browserinfos.match(/Opera/)var ns4=document.layersvar ns6=document.getElementById&&!document.all&&!browserinfos.match(/Opera/)var opera=browserinfos.match(/Opera/)  var browserok=ie||ns4||ns6||operafunction changecontent() { getcontent() i_text++ if (i_text>=text.length) {i_text=0}  if (ie) {  ticker.innerHTML=content  fadeout() } if (opera || ns6) {  document.getElementById('ticker').innerHTML=content  var texttimer=setTimeout("changecontent()",2*textpause) } if (ns4) {  document.roof.document.ticker.document.write(content)  document.roof.document.ticker.document.close()  var texttimer=setTimeout("changecontent()",textpause) } }function fadein() { if (transparency<100){  transparency+=transparencystep  if (ie) {   document.all.tickerbg.filters.alpha.opacity=transparency  }  var fadetimer=setTimeout("fadein()",pausefade) } else {  clearTimeout(fadetimer)  setTimeout("changecontent()",1000) }}function fadeout() { if (transparency>0){  transparency-=transparencystep  if (ie) {   document.all.tickerbg.filters.alpha.opacity=transparency  }  if (ns6) {   document.getElementById('tickerbg').style.MozOpacity=transparency/100  }  var fadetimer=setTimeout("fadeout()",pausefade) } else {  clearTimeout(fadetimer)  setTimeout("fadein()",textpause) }}getcontent()function getcontent() { if (ie || opera) {  var tablewidth=textwidth-2*textborder  var tableheight=textheight-2*textborder } else {  var tablewidth=textwidth  var tableheight=textheight } if (ie || ns6) {   var padding = parseInt(textborder)+3  content = "<table width=" + tablewidth + " height=" + tableheight + " cellpadding=" + padding + " cellspacing=0 border=0><tr valign=" + textvalign + "><td align=" + textalign + ">"  content += "<a href=\"" + textlink[i_text] + "\" target=\"" + texttarget[i_text] + "\" style=\"position:relative;font-family:\'" + textfont + "\';font-size:" + textfontsize + "pt;font-weight:" + textweight + ";text-decoration:" + textdecoration + ";color:" + textfontcolor + ";font-style:" + textitalic + ";\" onMouseOver=\"this.style.color=\'"+textfontcolorrollover+"\'\" onMouseOut=\"this.style.color=\'" + textfontcolor + "\'\">"  content += text[i_text]  content += "</a></td></tr></table>" } else {   content = "<table width=" + tablewidth + " height=" + tableheight + " cellpadding = " + textborder + " cellspacing=0><tr valign=" + textvalign + "><td align=" + textalign + ">"  content+="<a href=\"" + textlink[i_text] + "\" target=\"" + texttarget[i_text] + "\" style=\"position:relative;font-family:\'" + textfont + "\';font-size:" + textfontsize + "pt;font-weight:" + textweight + ";text-decoration:"+textdecoration + ";color:" + textfontcolor + ";font-style:" + textitalic+";\">"  content+=text[i_text]  content+="</a></td></tr></table>"  framecontent = "<table width=" + tablewidth + " height=" + tableheight + " cellpadding = 0 cellspacing=0 border=" + textborder + "><tr><td>"  framecontent += "<font color=\"" + textbgcolor + "\">"  framecontent += "."  framecontent+="</font>"  framecontent+="</td></tr></table>" }}if (ie || ns6 || opera) { if (ns6) {  textwidth-=2*textborder  textheight-=2*textborder } document.write("<div id=\"roof\" style=\"position:relative;width:"+textwidth+"px;height:"+textheight+"px;font-family:\'"+textfont+"\';border-style:solid;border-color:"+textbordercolor+";border-width:"+textborder+"px;background-color:"+textbgcolor+";\">")  if (!opera && !ns6 ) {  document.write("<div id=\"tickerbg\" style=\"position:absolute;top:"+-textborder + "px;left:"+-textborder + "px;width:" + textwidth + "px;height:" + textheight + "px;font-family:\'" + textfont + "\';font-size:" + textfontsize + "pt;font-weight:" + textweight + ";font-style:" + textitalic + ";border-style:solid;border-color:" + textbordercolor + ";border-width:" + textborder + "px;background-color:" + textfontcolor + ";overflow:hidden\;filter:alpha(opacity=100)\">")  document.write("</div>") }  document.write("<div id=\"ticker\" style=\"position:absolute;top:"+-textborder+"px;left:"+-textborder + "px;width:" + textwidth + "px;height:" + textheight + "px;font-family:\'" + textfont + "\';font-size:" + textfontsize + "pt;font-weight:" + textweight + ";font-style:" + textitalic + ";border-style:solid;border-color:" + textbordercolor+";border-width:" + textborder+"px;overflow:hidden\;\">") document.write("</div></div>") window.onload=changecontent}else if (ns4) { document.write("<ilayer name=\"roof\" width="+textwidth+" height="+textheight+">")  document.write("<layer name=\"tickerframe\" width="+textwidth+" height="+textheight+" top=0 left=0 bgcolor="+textbgcolor+">")  document.write(framecontent)  document.write("</layer>")  document.write("<layer name=\"ticker\" width="+textwidth+" height="+textheight+" top=0 left=0>")  document.write()  document.write("</layer>") document.write("</ilayer>") window.onload=changecontent}

3. Save message.js

 

4. Upload message.js to your public_html folder.

 

5. Make a file called testmessage.html and put the following code in testmessage.html:

 

<html>  <head>    <title>Fading Message</title>  </head>  <body>    <script language="javascript" src="message.js"></script>  </body></html>

6. Save testmessage.html

7. Upload testmessage.html to the same folder as message.js

 

You're all set! -_-

 

Basically, the code

<script language="javascript" src="message.js"></script>

can be placed anywhere inside the <body> tags as long as message.js is in the same folder as testmessage.html

 

Have fun! :D

 

Edit: Tried to fix the code so the forum layout is preserved. :D

Edited by OpaQue (see edit history)

Share this post


Link to post
Share on other sites

Wow huge code, that'll help a bunch of people, I may even try it out.  Nice snlildude.

137539[/snapback]

No problem. :D Tell me if it works, or just post here. Please! We need to get this thing to page 2, so the forum layout won't be messed up anymore. -_-

Share this post


Link to post
Share on other sites

Thankx a Bunch Snildude You DAMAN, Well My Name is daman, but you are the real daman, you helped me in lots of situations, I think you deserv a Rep Point -_-

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.