Home N-13 News Forums Help Search
RegisterForgot password?
How to add image to post necklacesdiscou
Known bugs - 4.0.3 necklacesdiscou

Latest N-13 News 4.0.3

What is N-13 News?
Where can I get help?
Known bugs

Forums Help & Support Self Registration Error
Krysm
Posted on 16 Feb 2010, 17:40:42

Access: Member
Total Posts: 18
Joined: 2010-02-11

Hi,

I've just tested the registration form on my site, for users to register themselves, but i've noticed that once they register and are given the link to login, it directs them to the wrong url. I've just renamed the /news/ folder but where/how do I change the url that the user is given, to the correct one?

Thanks for any help.
#1902
Chris
Posted on 16 Feb 2010, 17:47:45

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

If you're using 3.3, edit newslangmsg.php, if using 3.4 edit modules/langmsg_english.php
#1903
Krysm
Posted on 16 Feb 2010, 17:57:37

Access: Member
Total Posts: 18
Joined: 2010-02-11

Thanks!

However im having a problem. All I can find is this line;

Your account has been created, you can now <a href=\"{adminpath}\">login here</a>
Do I edit {adminpath} to the URL of the admin.php file?
#1904
Chris
Posted on 16 Feb 2010, 18:01:58

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

You shouldn't really rename directories after the script has already been installed. To fix this however edit the admin.php file, towards the top you'll see this chunk of code

Code:
$scriptpath = DataAccess::fetch("SELECT scriptpath FROM $newsoptions WHERE 1");
if(!$scriptpath['0']['scriptpath']){
    $scriptpath = str_replace(basename($_SERVER['REQUEST_URI']),"",$_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
    $scriptpath= "http://" . $scriptpath;
    DataAccess::put("UPDATE $newsoptions SET scriptpath = ? WHERE 1",$scriptpath);
}


Change that to

Code:
$scriptpath = DataAccess::fetch("SELECT scriptpath FROM $newsoptions WHERE 1");
if($scriptpath['0']['scriptpath']){
    $scriptpath = str_replace(basename($_SERVER['REQUEST_URI']),"",$_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
    $scriptpath= "http://" . $scriptpath;
    DataAccess::put("UPDATE $newsoptions SET scriptpath = ? WHERE 1",$scriptpath);
}


Then simply navigate to the admin.php file in your browser to have it update the path to the new one.
#1905
Krysm
Posted on 16 Feb 2010, 18:54:30

Access: Member
Total Posts: 18
Joined: 2010-02-11

Okay, I did that but now when I test it, I get directed to http://admin.php/ :S
#1909
Chris
Posted on 16 Feb 2010, 19:03:24

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

If that doesn't work it might be easier just adding the url directly into the langmsg_english.php file.
#1910
Krysm
Posted on 16 Feb 2010, 19:13:55

Access: Member
Total Posts: 18
Joined: 2010-02-11

Thank you so much! That's it FINALLY sorted. It was such a head scratcher - i've been puzzled for hours :laughing:
#1911
Network-13.com © 2013