vBadvanced Forums  
Go Back   vBadvanced Forums > vBadvanced Products > vBadvanced CMPS > vBa CMPS v1.x (Archive - Closed for Posting) > Troubleshooting / "How do I..." Questions

 
 
Thread Tools Display Modes
  #1  
Old 11-25-2004, 04:01 PM
JohnBee's Avatar
JohnBee JohnBee is offline
Sitemaster
 
Join Date: Oct 2004
Posts: 177
Default Only accept homepage url referal else send to homepage after login?

I want to "force" in a sense my users to view the vB advance homepage
instead of linking directly to the forums.

how would I get them to go to the vBa homepage after they login
automoatically?

Last edited by JohnBee; 11-25-2004 at 04:10 PM.
  #2  
Old 11-25-2004, 04:08 PM
JohnBee's Avatar
JohnBee JohnBee is offline
Sitemaster
 
Join Date: Oct 2004
Posts: 177
Default Re: Possible to redirect to vBa index.php after login?

Okay let me answer my own question!

Quote:
// Check if referred from application instruction page
if($_SERVER['HTTP_REFERER'] != 'http://www.mysite.net/web/index.php')
{
// If not, redirect to application instruction page
header("location: http://www.mysite.net/web/index.php");
}
I put this at the top of my /forum/index.php and it works like a cham
  #3  
Old 11-25-2004, 06:09 PM
JohnBee's Avatar
JohnBee JohnBee is offline
Sitemaster
 
Join Date: Oct 2004
Posts: 177
Default Re: Only accept homepage url referal else send to homepage after login?

I would like to update on this.

there are all kinds of little quirks to the following referal based redirect.
users would find themselves redirected to the front page under certain
conditions. ex: mark all forums read, or... if they came from a page other
than the front page but still part of the site.

if anyone has any ideas on how I could accomplish this minus the problems
I am facing please lend me a hand
  #4  
Old 11-26-2004, 01:39 PM
Brian's Avatar
Brian Brian is offline
Administrator
 
Join Date: Jan 2004
Location: Georgia, USA
Posts: 34,240
Default Re: Only accept homepage url referal else send to homepage after login?

In your login.php file look for this code:
PHP Code:
eval(print_standard_redirect('redirect_login')); 
And right above it add this:
PHP Code:
if (!in_array($logintype, array('modcplogin''cplogin')))
{
$url '/index.php';


Last edited by Brian; 11-27-2004 at 12:44 PM.
  #5  
Old 11-27-2004, 02:11 AM
JohnBee's Avatar
JohnBee JohnBee is offline
Sitemaster
 
Join Date: Oct 2004
Posts: 177
Default Re: Only accept homepage url referal else send to homepage after login?

*** THAT WORKED!

Once again, thank you for your helpful advice.

Last edited by JohnBee; 11-27-2004 at 02:24 AM.
  #6  
Old 11-27-2004, 03:02 AM
JohnBee's Avatar
JohnBee JohnBee is offline
Sitemaster
 
Join Date: Oct 2004
Posts: 177
Default Re: Only accept homepage url referal else send to homepage after login?

One small thing though, when I login ACP I get redirected to the frontpage
but then I can login without athentication. afterwards.

is it possible to fix that or... no
if not its fine I don't mind a little Xtra work to get things done
  #7  
Old 11-27-2004, 12:44 PM
Brian's Avatar
Brian Brian is offline
Administrator
 
Join Date: Jan 2004
Location: Georgia, USA
Posts: 34,240
Default Re: Only accept homepage url referal else send to homepage after login?

I just modified the code in that post. If you'll change it to what's there now then that should prevent you from being redirected when you log into the admin/mod cp.
 


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

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
redirect from login raskolnikov Troubleshooting / "How do I..." Questions 4 11-27-2004 02:14 AM
A Login Bug on custom pages? memobug Troubleshooting / "How do I..." Questions 2 10-22-2004 02:38 AM
Login Problems socals Troubleshooting / "How do I..." Questions 4 08-22-2004 06:16 PM


All times are GMT -4. The time now is 07:39 PM.

Forums Powered by vBulletin, Copyright ©2000-2009, Jelsoft Enterprises Ltd.
Please note that vBadvanced is in no way affiliated with Jelsoft Enterprises Ltd, nor will Jelsoft be able to provide any support for our products.