Topic: Please Register to See Links in PunBB

I googled it but no results was turned.. How can I do that in punbb

Thanks

Re: Please Register to See Links in PunBB

Do you have an example of that?
Which links? Normal url's in a post?

Re: Please Register to See Links in PunBB

yes.. notmal http://www links

4 (edited by KeyDog 2009-01-30 09:18)

Re: Please Register to See Links in PunBB

EDIT:

http://www.punres.org/viewtopic.php?pid=11904#p11904

so maybe change parser.php

    if ($forum_user['is_guest'] )
    return ' <span class="members-only">[Members only link, sorry Guests]</span>';
    else
    return '<a href="'.$full_url.'" onclick="window.open(this.href); return false;">'.$link.'</a>';

5 (edited by Programming-Designs 2009-01-30 22:07)

Re: Please Register to See Links in PunBB

Adding to what KeyDog said, you will have to modify ~line 600/601 (inside the handle_url_tag function):

global $forum_user;

if ($forum_user['is_guest'] )
    return ' <span class="members-only">[Register/login to see link]</span>';
elseif ($bbcode)
    {
        if ($full_url == $link)
            return '[url]'.$link.'[/url]';
        else
            return '[url='.$full_url.']'.$link.'[/url]';
    }
    else
        return '<a href="'.$full_url.'">'.$link.'</a>';

Re: Please Register to See Links in PunBB

if ($forum_user['is_guest'] && !$bbcode)

You know... just in case.