You're right! I am sorry!Mick wrote: ↑Tue Feb 05, 2019 3:16 pm Please read ReadMe Before Posting and make sure you post in the correct forum.
Code: Select all
'S_TOPIC_POSTER' => ($topic_data['topic_poster'] == $poster_id) ? true : false,
'S_FIRST_POST' => ($topic_data['topic_first_post_id'] == $row['post_id']) ? true : false,
/**
* Hack to add a post counter to the postrow
* used to select in the template weather to show a post or not
*/
'POST_COUNTER' => $post_counter++,
'LAST_POST' => $post_counter==count($post_list),
// End Hack
'S_IGNORE_POST' => ($row['foe']) ? true : false,
Code: Select all
$first_unread = $post_unread = false;
/**
* Hack to add a post counter to the postrow
* used to select in the template weather to show a post or not
*/
$post_counter = 0;
// End Hack
for ($i = 0, $end = count($post_list); $i < $end; ++$i)
That’s exactly what i am talking about .horseguards wrote: ↑Wed Feb 06, 2019 11:04 pm If I have a thread with 50 posts, and want the ads on the 1st, 2nd and last post of each page. I don't know if this is what you are talking about.
This is presuming post sort order is by time and ascending. If it's descending then the 2nd banner would be in a different post.horseguards wrote: ↑Wed Feb 06, 2019 11:04 pm If I have a thread with 50 posts, and want the ads on the 1st, 2nd and last post of each page. I don't know if this is what you are talking about.
Maybe I haven't explained myself properly.Lumpy Burgertushie wrote: ↑Thu Feb 07, 2019 12:35 am you can change that, but if you set it to 50 what happens when a topic contains 51 posts. now you have 50 on one page and one on another page.
I try to add as little extensions as I can. I did save both edited pages in a "backup" folder, for the next upgrade.mrgoldy wrote: ↑Thu Feb 07, 2019 12:47 pm On a side note, perhaps have a look at the official extension from phpBB itself: Advertisement management. I believe that offers exactly what you’re asking for without having to make adjustments to the core file.
And if you are sticking to these core adjustments, make sure to write them down somewhere as you are likely having to re-do them when you update to a newer version of phpbb.