Topic: Sig once per topic
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
You are not logged in. Please login or register.
PunBB Forums → PunBB 1.2 modifications, plugins and integrations → Sig once per topic
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
Agreed. Thats a very good idea. How to go about implementing it is another matter altogether.
It's quite easy actually. Just set a flag when the sig has been displayed the first time.
Then I think it would be like Sig once per page right?
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.
Good idea!. I usually disable images in the signatures, but with this it might be better 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
Works Great thx!
How can I do this with version 1.2.5?
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;
}
}
So simple, and it works great!
Thanks for finding this
Cheers people... Just done this on 1.2.10... works lovely...
Cool, its workd!
Hi !
Is there a solution to make this in Punbb 1.3 ?
Thanks.
Just FYI (whoever wants to make this extension) this is what the code looks like now; maybe you (progent) could post a feature/extension request referencing this post...
// Do signature parsing/caching
if ($cur_post['signature'] != '' && $forum_user['show_sig'] != '0' && $forum_config['o_signatures'] == '1')
{
if (!isset($signature_cache[$cur_post['poster_id']]))
$signature_cache[$cur_post['poster_id']] = parse_signature($cur_post['signature']);
$forum_page['message']['signature'] = '<div class="sig-content"><span class="sig-line"><!-- --></span>'.$signature_cache[$cur_post['poster_id']].'</div>';
}
($hook = get_hook('vt_row_pre_display')) ? eval($hook) : null;
PunBB Forums → PunBB 1.2 modifications, plugins and integrations → Sig once per topic
Powered by PunBB, supported by Informer Technologies, Inc.