The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Redirect usergroup at logon from mainpage
How can I redirect a certain usergroup at logon to a private section of the forum?
I have the forums and permissions set up. Its the automatic redirect depending on usergroup I dont understand? :ermm: |
#2
|
||||
|
||||
try the login.php
|
#3
|
||||
|
||||
Ok thankyou, have checked that. What would be a proper syntax for this?
I found a small script that supposedly redirects users: (where xx is the id nr) if($bbuserinfo[userid] == xx){ header ("Location: http://www.yahoo.com"); } If I change it to that below, does that make any sence? if($bbuserinfo[usergroupid] == xx){ header ("Location: http://mysite.com/forums/forumdisplay.php?f=11"); } I dont have any coding experience Im afraid. :nervous: |
#4
|
|||
|
|||
in login.php, find:
PHP Code:
PHP Code:
|
#5
|
||||
|
||||
I pasted the code in the wrong place. Since I use CMPS i had to paste it in the start-up template for that. So far so good.
The redirect works if I have permission to see both the startpage and the redirectpage. It bumps off and lands beautifully where it should. :classic: However, if I dont have permission to see the startpage, it halts there. And the redirect does not take affect. Any suggestions to work around this? I could create a blank "bounce-off-page" where everyone has access, but maybe there is a cleaner way of achieving the same thing? Either way Im happy. I think this is a really neat way of directing users to different parts of the forum, and still maintain a clean cut forum, thank you sabret00th and MarcoH64 for helping me achieve this! *****UPDATE LAST POST BELOW***** Now it works 100%. I use CMPS so I pasted this code in my home-template: <if condition="is_member_of($bbuserinfo, xx)"> <META HTTP-EQUIV="Refresh" CONTENT="0; URL=forumdisplay.php?$session[sessionurl]f=yy"> </if> Where xx is your usergroupid and yy is the redirect page. Works. Its a neat way of redirecting users (from one easy-to-remember entrance point) to separate - and if needed - isolated parts of the forum, and still have a clean-cut design. I made my startpage blank with just redirection-codes for different usergroups. I hope this helps someone else. :classic: |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|