Webmastersite.net
Register Log In

if statement stopped working

Comments on if statement stopped working

hai
Forum Regular

Usergroup: Customer
Joined: Apr 03, 2007
Location: NY & PA

Total Topics: 94
Total Comments: 339
hai
Posted Dec 02, 2008 - 9:23 PM:

I'm not sure when this happened since I use it on a page that I do not access often, but the following if statement worked at one time and now it is no longer working.


<IF {MEMBERISGUEST} or {MEMBERUSERGROUP} is NOT 3>
<script language="javascript">
location.replace("http://www.highaspirations.com/portal/")
</script>
</IF>


It should forward anyone who visits the page and is not part of the admin usergroup back to the index page, but the page should load correctly for admins. Instead it is forwarding admins back as well.
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Dec 03, 2008 - 5:58 AM:

The caps-lock NOT hasn't ever intentionally been supported (though it might work or have worked by accident), it should be lowercase. The real problem is more likely that you're using {MEMBER when you actually mean the person viewing the page, which is {THISMEMBER. {MEMBER could be the person who owns a link shown on a page, or who owns the profile being shown, or so on. It will default to the viewer of the page when it can't guess what other member you might mean, so it could work by accident, but should never be used that way intentionally.
hai
Forum Regular

Usergroup: Customer
Joined: Apr 03, 2007
Location: NY & PA

Total Topics: 94
Total Comments: 339
hai
Posted Dec 03, 2008 - 8:14 AM:

Thanks Paul. Made the changes and now it works again. Guess I just got lucky when it worked last time and left it at that.

BTW just wanted to let you know that last speed update was awesome even on this site which has so much going on! Thanks.
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



Sorry, you don't have permission to post posts. Log in, or register if you haven't yet.