Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> Raven's RavenNuke(tm) v2.02.02 Distro
Author Message
aseitz
Regular
Regular



Joined: Mar 08, 2005
Posts: 57
Location: Portland, Oregon USA

PostPosted: Tue Jun 27, 2006 11:01 am Reply with quote

How do I redirect a user to the mainpage (index.html) instead of their account page on login?

-- EDIT --

Fixed, see final 3 posts for completion steps.


Last edited by aseitz on Tue Jun 27, 2006 12:38 pm; edited 1 time in total 
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
Guardian2003
Site Admin



Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam

PostPosted: Tue Jun 27, 2006 11:34 am Reply with quote

You mean, so you can prevent them from logging in?
 
View user's profile Send private message Send e-mail
aseitz







PostPosted: Tue Jun 27, 2006 11:37 am Reply with quote

Guardian2003 wrote:
You mean, so you can prevent them from logging in?


Nono, I want them to log in.

I just don't want them to log in and the first thing they see is the "My Account" screen. I would much rather it just re-directed back to the main page, all logged in and stuff.
 
Guardian2003







PostPosted: Tue Jun 27, 2006 11:54 am Reply with quote

Well I know this has been covered before so searching the forums might help you.

I think this is in the function login(). It has something like
Code:
if (empty($redirect)) {

            Header("Location: modules.php?name=Your_Account&op=userinfo&bypass=1&username=$username");

You could try changing that to something like
Code:


if (empty($redirect)) {
            Header("Location: index.php);


In any event, you will need to alter the code in the user info block, the login block, the relevant forum files etc to be consistently redirecting users back to the home page.
 
gregexp
The Mouse Is Extension Of Arm



Joined: Feb 21, 2006
Posts: 1497
Location: In front of a screen....HELP! lol

PostPosted: Tue Jun 27, 2006 12:09 pm Reply with quote

Find this line in index.php of the Your account module, under function login

Code:
   if (empty($redirect)) {

            Header("Location: modules.php?name=Your_Account&op=userinfo&bypass=1&username=$username");


then make it:

Code:
   if (empty($redirect)) {

            Header("Location: index.php");


Have not been able to test this so BACK IT UP FIRST.

_________________
For those who stand shall NEVER fall and those who fall shall RISE once more!! 
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
gregexp







PostPosted: Tue Jun 27, 2006 12:15 pm Reply with quote

sorry guardian...i had this screen open for a bit while i searched for the code.

didnt see that you were on and thought perhaps you had limited time as others do.
 
aseitz







PostPosted: Tue Jun 27, 2006 12:37 pm Reply with quote

Thanks you two, it worked like a charm!
 
Guardian2003







PostPosted: Wed Jun 28, 2006 12:18 am Reply with quote

No problem, glad it worked as I didn't test it.
darklord - not a problem, better to have 2 answers the same than no reply at all Wink
 
CodyG
Life Cycles Becoming CPU Cycles



Joined: Jan 02, 2003
Posts: 714
Location: Vancouver Island

PostPosted: Fri Apr 10, 2009 4:22 pm Reply with quote

Does this method still work for RN 2.3.1?
IOW, can I change line 210 in Your_Account/index.php
Code:


   } elseif ($redirect == '') {
    Header('Location: modules.php?name=Your_Account&op=userinfo&bypass=1&username=' . $username);

to this?
Code:


   } elseif ($redirect == '') {
    Header('Location: index.php);


I'm wondering if YA has been reworked in such a way to not allow this tweek.

_________________
"We want to see if life is ubiquitous." D.Goldin 
View user's profile Send private message
misterpat
Hangin' Around



Joined: Mar 02, 2009
Posts: 48

PostPosted: Fri Apr 10, 2009 5:11 pm Reply with quote

I have done it on my RN 2.3.1 and it works great.
 
View user's profile Send private message
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> Raven's RavenNuke(tm) v2.02.02 Distro

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©