Topic: [ask] Hide link

I am new in punbb and weak in php lol. I wanna know how to hide links from guest.

I know it must be somewhere in parser.php,
like
if ($pun_user["is_guest"])
return 'blabla';
else
return '<a href="'.$full_url.'">'.$link.'</a>';

But there are several return in parser.php

Which one or how to modify it.

thanks

Re: [ask] Hide link

Add to a new line after Line 607:

    else if ($forum_user['is_guest'])
        return 'Please register/login to view links.'; //Replace by your own message

3 (edited by anggiawan 2008-11-19 05:24)

Re: [ask] Hide link

but there is an error when I add that code

Notice: Undefined variable: forum_user in /home/xxxxxx/public_html/forum/include/parser.php on line 608

Notice: Undefined variable: forum_user in /home/xxxxxx/public_html/forum/include/parser.php on line 608

Re: [ask] Hide link

Try to add

global $forum_user;

in the beginning of the function (about line 581).

Carpe diem

Re: [ask] Hide link

Ya I forgot to define the variable

Thanks Garciat n Anatoly