PDA

View Full Version : Help With Code please :D


EnIgMa1234
02-21-2007, 02:48 PM
I'm Having A Problem With This Code

<strong><phrase 1="$bbuserinfo[username]"><script type="text/javascript">
var d = new Date()
var time = d.getHours()


if (time < $vboptions[time_1])
{
document.write("<b><img src="$vboptions[imgurl_1] /> $vboptions[text_1] $vbphrase[CWMOFH_username]</b>")
}
else if (time > $vboptions[time_1] && time < $vboptions[time_2])
{
document.write("<b><img src="$vboptions[imgurl_2] /> $vboptions[text_2] $vbphrase[CWMOFH_username]</b>")
}
else
{
document.write("<b><img src="$vboptions[imgurl_3] /> $vboptions[text_3] $vbphrase[CWMOFH_username]</b>")
}
</script></strong></phrase>

i have the vboptions and vbphrases made but they arent showing when i use this

CyberAlien
02-21-2007, 04:23 PM
If you are using double quotes inside double quoted text, add \ before it:
<strong><phrase 1="$bbuserinfo[username]"><script type="text/javascript">
var d = new Date()
var time = d.getHours()


if (time < $vboptions[time_1])
{
document.write("<b><img src=\"$vboptions[imgurl_1]\" /> $vboptions[text_1] $vbphrase[CWMOFH_username]</b>");
}
else if (time > $vboptions[time_1] && time < $vboptions[time_2])
{
document.write("<b><img src=\"$vboptions[imgurl_2]\" /> $vboptions[text_2] $vbphrase[CWMOFH_username]</b>");
}
else
{
document.write("<b><img src=\"$vboptions[imgurl_3]\" /> $vboptions[text_3] $vbphrase[CWMOFH_username]</b>")
}
</script></strong></phrase>
And what you are planning to do won't work anyway. Phrases are parsed on server side, javascript is parsed on client side.

EnIgMa1234
03-01-2007, 05:27 PM
is there any way i can do this?