1 (edited by Rich T 2008-02-23 07:54)

Topic: Not sure if this is the right place

Hi all, brand new here. I installed the forum and really like th elook of it. I added the image upload plug and that is cool. I also added Private Messaging plug. I followed the instructions and it works, but it has disabled the Log out feature.

I noticed when I was modding the Functions.php file, I had to replace the code

        {
            if ($pun_user['g_search'] == '1')
                $links[] = '<li id="navsearch"><a href="search.php">'.$lang_common['Search'].'</a>';

            $links[] = '<li id="navprofile"><a href="profile.php?id='.$pun_user['id'].'">'.$lang_common['Profile'].'</a>';
            $links[] = '<li id="navlogout"><a href="login.php?action=out&id='.$pun_user['id'].'">'.$lang_common['Logout'].'</a>';
        }
        else
        {
            $links[] = '<li id="navsearch"><a href="search.php">'.$lang_common['Search'].'</a>';
            $links[] = '<li id="navprofile"><a href="profile.php?id='.$pun_user['id'].'">'.$lang_common['Profile'].'</a>';
            $links[] = '<li id="navadmin"><a href="admin_index.php">'.$lang_common['Admin'].'</a>';
            $links[] = '<li id="navlogout"><a href="login.php?action=out&id='.$pun_user['id'].'">'.$lang_common['Logout'].'</a>';
        }

with

        if ($pun_user['g_id'] > PUN_MOD)
        {
            if ($pun_user['g_search'] == '1')
                $links[] = '<li id="navsearch"><a href="search.php">'.$lang_common['Search'].'</a>';

            $links[] = '<li id="navprofile"><a href="profile.php?id='.$pun_user['id'].'">'.$lang_common['Profile'].'</a>';
            require(PUN_ROOT.'include/pms/functions_navlinks.php');
            $links[] = '<li id="navlogout"><a href="login.php?action=out&id='.$pun_user['id'].'">'.$lang_common['Logout'].'</a>';
        }
        else
        {
            $links[] = '<li id="navsearch"><a href="search.php">'.$lang_common['Search'].'</a>';
            $links[] = '<li id="navprofile"><a href="profile.php?id='.$pun_user['id'].'">'.$lang_common['Profile'].'</a>';
            $links[] = '<li id="navadmin"><a href="admin_index.php">'.$lang_common['Admin'].'</a>';
            require(PUN_ROOT.'include/pms/functions_navlinks.php');
            $links[] = '<li id="navlogout"><a href="login.php?action=out&id='.$pun_user['id'].'">'.$lang_common['Logout'].'</a>';
        }

This does not work. When loading the forum I am presented with an error message in Function.php on Line 1117, past the end of the code.

If I add the two blocks only

            $links[] = '<li id="navprofile"><a href="profile.php?id='.$pun_user['id'].'">'.$lang_common['Profile'].'</a>';
            require(PUN_ROOT.'include/pms/functions_navlinks.php');
            $links[] = '<li id="navlogout"><a href="login.php?action=out&id='.$pun_user['id'].'">'.$lang_common['Logout'].'</a>';

and

            $links[] = '<li id="navsearch"><a href="search.php">'.$lang_common['Search'].'</a>';
            $links[] = '<li id="navprofile"><a href="profile.php?id='.$pun_user['id'].'">'.$lang_common['Profile'].'</a>';
            $links[] = '<li id="navadmin"><a href="admin_index.php">'.$lang_common['Admin'].'</a>';
            require(PUN_ROOT.'include/pms/functions_navlinks.php');
            $links[] = '<li id="navlogout"><a href="login.php?action=out&id='.$pun_user['id'].'">'.$lang_common['Logout'].'</a>';

Then Messaging works but the logout does not.

As I noted at the start, I hope this is the correct place to place this message, if not, I apologise. I hope someone can help me with this.

Kind regards

Richard Turner





and I had to add the lines one at a time

Re: Not sure if this is the right place

If you're using 1.2.17, then you need to make sure you're using the new logout link, which has a CSRF token.

3 (edited by Rich T 2008-02-23 13:15)

Re: Not sure if this is the right place

Hi and thanks, I downloaded the latest version today ? Just checked, yes, V1.2.17

Would that have the latest logout file ? If not, where would I find it.

Richard

Re: Not sure if this is the right place

Yes

Re: Not sure if this is the right place

ok, so what would be my next step then please.

Cheers

Richard

Re: Not sure if this is the right place

So, replace all the logout links with the proper logout links from a fresh copy of include/functions.php

Re: Not sure if this is the right place

Thank you very much. its all good again

best

Richard