Re:

One feature on my current forum members love is Sig once per topic. If someone has an image in their Sig it really cleans up the topic. This possible with PunBB?

Matt

Re:

Agreed. Thats a very good idea. How to go about implementing it is another matter altogether.

Re:

It's quite easy actually. Just set a flag when the sig has been displayed the first time.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re:

Then I think it would be like Sig once per page right?

http://www.punres.org/img/banner.png

Re:

Thats what I was thinking. I think the suggestion was one sig per poster per topic. Wouldn't that require an array of flags keyed on member name/id.

Re:

Good idea!. I usually disable images in the signatures, but with this it might be better smile One signature / user / page:

#
#---------[ 1. OPEN ]---------------------------------------------------------
#

    viewtopic.php

#
#---------[ 2. FIND (line: 323) ]---------------------------------------------
#

    if ($cur_post['signature'] != '' && $cur_user['show_sig'] != '0')
        $signature = '<br><br>_______________________________________<br>'.parse_signature($cur_post['signature']).'<br><br>';
    else
        $signature = NULL;

#
#---------[ 3. REPLACE ]------------------------------------------------------
#

    if ($cur_post['signature'] != '' && $cur_user['show_sig'] != '0' && !isset($signatures[$cur_post['poster_id']])){
        $signature = '<br><br>_______________________________________<br>'.parse_signature($cur_post['signature']).'<br><br>';
        $signatures[$cur_post['poster_id']] = true;
    }
    else
        $signature = NULL;

#
#---------[ 4. SAVE / UPLOAD ]------------------------------------------------
#

I fixed a typo and added a !isset() so that it won't complain about the element not being initialized /Kennel

Last edited by chacmool (2003-10-04 12:03:09)

Re:

Works Great thx!

Re:

How can I do this with version 1.2.5?

Re:

1 sig/user/page for 1.2.5:

#
#---------[ 1. OPEN ]---------------------------------------------------------
#

    viewtopic.php

#
#---------[ 2. FIND ]---------------------------------------------
#
    // Do signature parsing/caching
    if ($cur_post['signature'] != '' && $pun_user['show_sig'] != '0')
    {
        if (isset($signature_cache[$cur_post['poster_id']]))
            $signature = $signature_cache[$cur_post['poster_id']];
        else
        {
            $signature = parse_signature($cur_post['signature']);
            $signature_cache[$cur_post['poster_id']] = $signature;
        }
    }

#
#---------[ 3. REPLACE WITH ]------------------------------------------------------
#
    // Do signature parsing/caching
    if ($cur_post['signature'] != '' && $pun_user['show_sig'] != '0')
    {
        if (!isset($signature_cache[$cur_post['poster_id']]))
        {
            $signature = parse_signature($cur_post['signature']);
            $signature_cache[$cur_post['poster_id']] = $signature;
        }
    }
http://fluxbb.org

Free PunBB Hosting - lots of mods, easy to customize

10

Re:

So simple, and it works great!

Thanks for finding this

Re:

Cheers people... Just done this on 1.2.10... works lovely...

Blog - Follow Me and FluxBB on Twitter

12

Re:

Cool, its workd! smile

PunBB, Simplicity has been easier than before
Smart is Simple. Fast is Smart. Think Fast, You'll be Smart..

regards,
PunBB & SMF Fans