Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 03 Mar 2014, 22:02
almai almai is offline
 
Join Date: Feb 2014
THIS_SCRIPT Conditionals in vb5

I'd like to redirect all users which are not logged in to index.php. For that reason I put following code into the header template:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

The first part checks, if the user is logged in. This one works as intended. The second part should check, if index.php is being displayed and therefore avoid an infinite loop. But no matter what I try, the system doesn't recognize, that the home page is being displayed. The browser refreshes the page over and over again

So my questions is: Are conditionals with "THE_SCRIPT" still working in vb5 or is there another way to retrieve the information, which page is actually being displayed. Or is there another problem that prevents the code from working properly.

Thanks in advance
Reply With Quote
  #2  
Old 03 Mar 2014, 22:33
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Real name: Zachery Woods
THIS_SCRIPT isn't in vBulletin 5, at all.

Trying to figure out if there is a way around this now.

--------------- Added 03 Mar 2014 at 18:39 ---------------

Lets try this though


<vb:if condition="!$user['userid'] AND page['pageid'] != 1">

Updated it a bit, more updates
__________________
Looking for ImpEx?

Last edited by Zachery; 03 Mar 2014 at 22:44.
Reply With Quote
  #3  
Old 04 Mar 2014, 13:57
almai almai is offline
 
Join Date: Feb 2014
Thank you for your reply. I will test this.

Would be great if you and your support team were more active in this forum. There are way to many unanswered threads here.

And another point to think about: A forum is no substitute for a well formed, profound technical documentation. What you provide here is totally outdated and deficient! It's nothing a serious developer wants to work with.

Regards, Alex
Reply With Quote
  #4  
Old 04 Mar 2014, 14:12
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Real name: Zachery Woods
Any time I, or any other support staff member spend here, is free time. We're not paid to be here
__________________
Looking for ImpEx?
Reply With Quote
  #5  
Old 04 Mar 2014, 16:55
almai almai is offline
 
Join Date: Feb 2014
I really appreciate this. But as I wrote: Provide a better documentation and a lot of questions here would be needless.

But anyway, the conditional works. There was only a $ missing.

<vb:if condition="!$user['userid'] AND $page['pageid'] != 1">

Last edited by almai; 04 Mar 2014 at 16:56. Reason: typo
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 19:20.

Layout Options | Width: Wide Color: