PHP Web Host - Quality Web Hosting For All PHP Applications $35/month $250/year (Unlimited) - $25/month - 200,000 impressions - Your Ad Could be Here - Click For Details
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
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 Back to top

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: 6299
Location: Vsetin, Czech Republic

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

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


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

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

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.
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
Guardian2003
Site Admin


Joined: Aug 28, 2003
Posts: 6299
Location: Vsetin, Czech Republic

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

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.
View user's profile Send private message Send e-mail Visit poster's website
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 Back to top

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.
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
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:15 pm Reply with quote Back to top

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.
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
aseitz
Regular
Regular


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

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

Thanks you two, it worked like a charm!
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
Guardian2003
Site Admin


Joined: Aug 28, 2003
Posts: 6299
Location: Vsetin, Czech Republic

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

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
View user's profile Send private message Send e-mail Visit poster's website
CodyG
Life Cycles Becoming CPU Cycles


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

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

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.
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 Back to top

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.

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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum