There's no need to add a template, and it wouldn't even work the way you proposed because the number of posts per page varies depending upon the user.
Instead, there should be (if there isn't already) a hook at the top of the post fetching loop. You can check the post number there and act on it.

And don't worry, it's nowhere near too late to propose hooks smile

Could you paste a copy of your post.php code?

2,078

(3 replies, posted in PunBB 1.2 troubleshooting)

I think your problem is different and I could probably diagnose it with a link to your forum

2,079

(3 replies, posted in PunBB 1.2 troubleshooting)

You're sure it's enabled in your profile?

2,080

(105 replies, posted in General discussion)

right

Well, yes, if somehow the default values got changed

A. You should upgrade to PunBB 1.2.15 if you haven't already
B. It looks like your backup is lacking certain settings on the database. You need to add auto_increment back to the ID column

2,083

(105 replies, posted in General discussion)

Enable debug mode, paste the full error

Which is how the code works wink
Could you paste a copy of your edit.php and viewtopic.php?

Enable debug mode, paste the full error when adding

2,086

(105 replies, posted in General discussion)

FIND

$subforum_result = $db->query('SELECT forum_desc, forum_name, id, last_post, last_post_id, last_poster, moderators, num_posts, num_topics, redirect_url FROM '.$db->prefix.'forums WHERE parent_forum_id='.$id.' ORDER BY disp_position') or error('Unable to fetch sub forum info',__FILE__,__LINE__,$db->error());

REPLACE WITH

$subforum_result = $db->query('SELECT f.forum_desc, f.forum_name, f.id, f.last_post, f.last_post_id, f.last_poster, f.moderators, f.num_posts, f.num_topics, f.redirect_url, p.poster_id AS last_poster_id FROM '.$db->prefix.'forums LEFT JOIN '.$db->prefix.'posts ON (f.last_post_id=p.id) WHERE parent_forum_id='.$id.' ORDER BY disp_position') or error('Unable to fetch sub forum info',__FILE__,__LINE__,$db->error());

FIND

$last_post = '<a href="viewtopic.php?pid='.$cur_subforum['last_post_id'].'#p'.$cur_subforum['last_post_id'].'">'.format_time($cur_subforum['last_post']).'</a><br /> <span class="byuser">'.$lang_common['by'].' '.pun_htmlspecialchars($cur_subforum['last_poster']).'</span>';

REPLACE WITH

$last_post = '<a href="viewtopic.php?pid='.$cur_subforum['last_post_id'].'#p'.$cur_subforum['last_post_id'].'">'.format_time($cur_subforum['last_post']).'</a><br /> <span class="byuser">'.$lang_common['by'].' <a href="profile.php?id='.$cur_subforum['last_poster_id'].'">'.pun_htmlspecialchars($cur_subforum['last_poster']).'</a></span>';

2,087

(105 replies, posted in General discussion)

I would need to see the query where $cur_subforum is populated wink

2,088

(105 replies, posted in General discussion)

I updated my post

2,089

(105 replies, posted in General discussion)

FIND

 $idm = $cur_forum['subject'];

REPLACE WITH

 $idm = $l_pr_su;

FIND

$forums_info = $db->query('SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, f.id, forum_name, p.poster_id as last_poster_id FROM '.$db->prefix.'forums AS f LEFT JOIN '.$db->prefix.'posts AS p ON (p.id=f.last_post_id) ORDER BY disp_position') or error(implode($db->error(),''),__FILE__,__LINE__,$db->error());

REPLACE WITH

$forums_info = $db->query('SELECT f.num_topics, f.num_posts, f.parent_forum_id, f.last_post_id, f.last_poster, f.last_post, f.id, f.forum_name, p.poster_id as last_poster_id, t.subject FROM '.$db->prefix.'forums AS f LEFT JOIN '.$db->prefix.'posts AS p ON (p.id=f.last_post_id) LEFT JOIN '.$db->prefix.'topics AS t ON t.last_post_id=f.last_post_id ORDER BY disp_position') or error(implode($db->error(),''),__FILE__,__LINE__,$db->error());

It does indeed seem to take a while. Have you edited post.php at all?

2,091

(1 replies, posted in PunBB 1.2 troubleshooting)

Right

Yes, my point is that silent edit doesn't modify any of those details, so they're exactly the same as they were before the edit. Which brings me back to my original question, did you modify any code? wink

2,093

(105 replies, posted in General discussion)

The issue is

$idm = $cur_forum['subject'];

basically, the subforum mod code necessitates that I undo everything you asked for previously and implement it specifically for the subforum mod. Essentially, you need to do the find/add after stuff from here, except getting the subject instead of last_poster_id, and then add a join to the query so that you can get the subject.

2,094

(5 replies, posted in PunBB 1.2 troubleshooting)

So, hosted forum solutions are not supported here, go to the PortBB support forum as people have said. Closed.

2,095

(1 replies, posted in PunBB 1.2 troubleshooting)

Internal server error: Do what it says, check the error log and post the content here. We can't tell anything from that error

Importing: Your database dump doesn't appear to have semi-colons after queries like it should.

Have you edited the code? Because there's no reason that upgrade would change anything (in fact, it looks like an issue in viewtopic.php more than anything else, since it looks like you have an empty timestamp and editor name).

2,097

(105 replies, posted in General discussion)

Try now

2,098

(15 replies, posted in PunBB 1.2 troubleshooting)

install.php has no relevance here.

2,099

(105 replies, posted in General discussion)

Updated again wink

2,100

(105 replies, posted in General discussion)

I updated my post.