Jump to content

bbcode codebox, help


dvdriper

Recommended Posts

hi i wanna make a forum, and i'm stuck with the codebox from the bbcode, i've done this script:

 

in the database i have this info:

 


[codebox]
<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">



/*

Tarakan Rocker Forum;) Enjoy

*/



//Customize your message here. Use any HTML desired:

var themsg='<span style="font:italic 22px Arial;color:red;">[b]Tarakan Rocker Forum;)[/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>
[/codebox]

 
 
 

 

it's some kind of javascript code there, but it's not displaying how i want, it displays only:

 


empty

 

please, someone, how can i fix this?

 

i'd use the function htmlspecialchars(); but I have some code in front of this section of code, so, how do I do to change only this section, not all code

 

Sry for my bad english

Link to comment
https://forums.phpfreaks.com/topic/92644-bbcode-codebox-help/
Share on other sites

hi i wanna make a forum, and i'm stuck with the codebox from the bbcode, i've done this script:

 

in the database i have this info:

 


[codebox]
<br>
<br><marquee id="alertit" style="position:absolute;left:0px;top:0;background-color:#FFFFE6" onMouseover="this.scrollAmount=1" onMouseout="this.scrollAmount=speed"></marquee>
<br>
<br><script type="text/javascript">
<br>
<br>/*
<br>
<br>Tarakan Rocker Forum:eye.gif: Enjoy
<br>
<br>*/
<br>
<br>
<br>//Customize your message here. Use any HTML desired:
<br>
<br>var themsg='<span style="font:italic 22px Arial;color:red;"><b>Tarakan Rocker Forum:eye.gif:</b></span>'
<br>
<br>var speed=6 //speed of scroller (1-10 or more)
<br>
<br>var loops=2 //specify number of times message scrolls across screen (an integer or "infinite")
<br>
<br>function populatescroller(){
<br>
<br>var windowwidth=iecompattest().clientWidth
<br>
<br>document.getElementById("alertit").innerHTML=themsg
<br>
<br>document.getElementById("alertit").style.width=windowwidth
<br>
<br>document.getElementById("alertit").scrollAmount=speed
<br>
<br>document.getElementById("alertit").scrollDelay=20
<br>
<br>document.getElementById("alertit").loop=loops
<br>
<br>document.getElementById("alertit").onfinish=function(){
<br>
<br>document.getElementById("alertit").style.visibility="hidden"
<br>
<br>}
<br>
<br>}
<br>
<br>
<br>function iecompattest(){
<br>
<br>return (document.compatMode!="BackCompat")? document.documentElement : document.body
<br>
<br>}
<br>
<br>if (document.all && document.getElementById){
<br>
<br>window.onload=populatescroller
<br>
<br>window.onresize=populatescroller
<br>
<br>}
<br>
<br>
<br></script>
<br>
<br>[/codebox]

 
 

 

it's some kind of javascript code there, but it's not displaying how i want, i want to display al... and the <br>'s... all!, it displays only:

 


empty

 

please, someone, how can i fix this?

 

i'd use the function htmlspecialchars(); but I have some code in front of this section of code, so, how do I do to change only this section, not all code

 

Sry for my bad english

sry double post

wish I knew how to delete this )))

 

the <code>...</code> for some reason doesn't work...

Link to comment
https://forums.phpfreaks.com/topic/92644-bbcode-codebox-help/#findComment-474801
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

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.