Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder harlequin2k5's Avatar
    Join Date
    Sep 2005
    Location
    Holiday, FL
    Posts
    635
    Thanks
    18
    Thanked 0 Times in 0 Posts

    joomla 1.0.13 - redirecting to a link

    ok enough with the laughter...

    so I'm using joomla 1.0.13 and what I'd like to do is this...

    currently if you attempt to view a page and you have not logged in you will see a message that says: You are not authorized to view this.

    in the /languages/english.php file I found the following line:

    DEFINE('_NOT_AUTH','You are not authorized to view this.');

    which I'm assuming is the line I want to change...

    what I'd prefer is instead just saying you're not authorized, provide a link to the login page

    we've tried putting an <a href> but the double slash following http: caused the rest of the address to be commented out

    we've tried using $link(blah) as well as $html->(blah) and they produced white pages of course

    also...if anyone has any suggestions on a good developer book for joomla 1.0 and I don't mean how to build a website using joomla (I have 2 of those ) - I've been able to locate any and it would really come in handy as this post demonstrates

    any and all help is appreciated!

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    PHP Code:
    DEFINE('_NOT_AUTH','<a href="/errorpage.php">Login Here</a>'); 
    You don't need to use the absolute path. The leading foward slash tells the browser to go to the root of the site.

    However if you still want to use the full url then you need to escape the slashes
    PHP Code:
    define('_NOT_AUTH','<a href="http:\/\/somesite.com/errorpage.php">Login Here</a>'); 
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • Users who have thanked _Aerospace_Eng_ for this post:

    harlequin2k5 (02-26-2008)

  • #3
    Regular Coder harlequin2k5's Avatar
    Join Date
    Sep 2005
    Location
    Holiday, FL
    Posts
    635
    Thanks
    18
    Thanked 0 Times in 0 Posts
    escape the slashes!!!!!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •