Log in

View Full Version : Why doesn't this work!


dominicricci
04-23-2009, 11:07 PM
<if condition="$show['guest']"> {
<script type="text/javascript">
if ((document.location !="http://we-cheat.com/register.php") ||
(document.location !="http://we-cheat.com/register.php?do=register")) {
alert("Welcome Guest, please click OK to Register!");
document.location = "http://we-cheat.com/register.php";
}
</script>
</if>

It works when I have only the 1 exception but when I added another it started to loop and the popup shows up on the register pages too

This is placed in my footer

nexialys
04-23-2009, 11:27 PM
<if condition="$show['guest'] AND THIS_SCRIPT != 'register'">

dominicricci
04-23-2009, 11:53 PM
I got it.... It's
<if condition="$show['guest']"> {
<script type="text/javascript">
if(document.location != "http://we-cheat.com/register.php" && document.location != "http://we-cheat.com/register.php?do=register") {
alert($vbulletin->options['message_var']);
document.location = "http://we-cheat.com/register.php";
}
</script>
</if>