Announcement

Collapse
No announcement yet.

Redirect in header for everyone except admin

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Xyabber
    replied
    Thanks again.. that worked... although it showed page for a second even though set at 0.
    Anyway, it worked pretty well.

    Leave a comment:


  • icarusforde
    replied
    Tisnt my code. :P I c/p'd that from the thread that i linked ya too.

    Leave a comment:


  • Xyabber
    replied
    Come to think of it, I'll just change your code to user group for administrators with a !=

    Leave a comment:


  • icarusforde
    replied
    No problems.

    Leave a comment:


  • Xyabber
    replied
    Thanks I really appreciate that.. I will probably do a variation that just is 'if not admin' then redirect. I'll have to look up that code, but thanks again!

    Leave a comment:


  • icarusforde
    replied
    It should work... similar to redirecting a banned user to one of those banned sites.

    There's a mod over on vB.org that you should be able to edit fairly simply to do what you want it to do - redirect everyone except the admin usergroup to another site. Let me see if i can find it...

    Edit: Found it.

    PHP Code:
    <if condition="$bbuserinfo['usergroupid'] == 8">
    <
    meta HTTP-EQUIV="REFRESH" content="0; url=http://www.theybannedme.com">
    </if> 
    Change the "8" to the usergroup ID's of the users you want to redirect - registered users, mods, supermods, unregistered, etc.

    Then change the URL to the URL of your under construction page.

    Instructions for install > Admin CP->Styles and Templates->Style Manager->Your Skin Style->Edit Templates->header->Paste it in there

    Thread: http://www.vbulletin.org/forum/showthread.php?t=198962

    Leave a comment:


  • Xyabber
    started a topic Redirect in header for everyone except admin

    Redirect in header for everyone except admin

    I need to know how to redirect everybody from my site to a 'under construction' page while I do a massive upgrade. I do not want the 'site closed' message because it will show the new header.

    So I was thinking about a conditional in the header or maybe headerinclude template that would check if not a member OR if member does not equal admin, then redirect using exec_header_redirect possibly.

    Would this work? What code should I use exactly?
    Will I still be able to log in to admin panel if I log out?

    Thanks in advance
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Working...
X