Open index.php from the modules/Your_Account directory and find the following code within the login function (around line 828 in Nuke 7.4 - this may vary, but look for the login function)
Code:
if ($redirect == "" ) {
Header("Location: modules.php?name=Your_Account&op=userinfo&bypass=1&username=$username");
} else if ($mode == "") {
Header("Location: modules.php?name=Forums&file=$forward");
} else if ($t !="") {
Header("Location: modules.php?name=Forums&file=$forward&mode=$mode&t=$t");
} else {
Header("Location: modules.php?name=Forums&file=$forward&mode=$mode&f=$f");
Alter this line ...
Code:
if ($redirect == "" ) {
Header("Location:modules.php?name=Your_Account&op=userinfo&bypass=1&username=$username");
Edit the URL to take members to an alternate page upon login.
Remove modules.php?name=Your_Account&op=userinfo&bypass=1&username=$username and replace it with the URL of your choosing.
**Update** In unmodified copies of version 7.8, you can find the above code on or around line 855.
_________________ - Prophet
Get the Last Visit module (and others modules I designed) from my website! FREE! http://jasonlau.biz
_________________ Note: i´m not a Natural English Reader/Writer, so, sorry for any gramatical error...
I'm the Rainbow Brite you hated . . .
Xyberian Colonel
Joined: Mar 14, 2004
Posts: 1921
Location: Behind you
Posted:
Sat Sep 10, 2005 5:42 pm
Actually, that codes are not properly working for some reasons. The above codes assumed "naked" module names such as
Forums
Your_Account
etc...
What if you put security patches?
They must be changed using $module_name variable by extracting dirname() function.
So, first of all, use direname() function prior to changing them.
However, you changed modules names such as Forums --> Bulletin Board ?
This modification does not work anymore. Therefore, the best and tight codes, which runs at any cases, must have a query to extract module names from DB tables (module name tables and mid field (module_id or name)).
Good Luck. this is a very good discussion and staring point to dig into what's going on.
Better yet, you can use php sessions to determine when to redirect the user. Here is how ...
Create the following if it does not already exist ...
For versions 7.5 and lower, create includes/myheader.php
For versions 7.6 and above, create includes/custom_files/custom_header.php
How the code works -
// We begin a php session unconditionally when the client enters the site.
// if the client is logged in as a user and is not admin and the temporary variable exists in the session, we unset the temporary variable and redirect the client to whatever page we choose
Using sessionization is another good idea, prophet.
The above codes are much much better.
How about a small admin config tweak? For instance, admin will have an option in there preferces of admin CP which allow them to select module name to redirect or go to when users login/ create account/ or rediction ?
Better yet, you can use php sessions to determine when to redirect the user. Here is how ...
Create the following if it does not already exist ...
For versions 7.5 and lower, create includes/myheader.php
For versions 7.6 and above, create includes/custom_files/custom_header.php
I´m not understanding something. . .
Now i´m using Nuke 7.9(patched) , i create the file :
Quote:
For versions 7.6 and above, create includes/custom_files/custom_header.php
and what else i must do, i must make the changes offirst post too? or only create this file?
I only create the file, but nothing change, i´m forggeting something or i must include this file in some other?
thanx. . .
_________________ Note: i´m not a Natural English Reader/Writer, so, sorry for any gramatical error...
I'm the Rainbow Brite you hated . . .
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