thank you but i'm trying to display the only 20 last posts of a topic. not display 20 posts in each page of a topic.P_I wrote: ↑Sat Apr 24, 2021 1:59 pm You could try the extension Individual posts per page, check the feature list.
I use this on most of my boards to give users individual control of their posts per page. I haven't tried the topic-specific feature.
it's not a custom page. it's topic itself.axe70 wrote: ↑Mon Apr 26, 2021 3:25 pm After my last answer into other post, i understand that you do not want to print the topic into a sheet and cut it with scissors.
So my (real ) next questions would be:
You need to do this where?
Creating a page with what?
May an sql query for this is easier and faster, if it is a custom page, but that start with what code, phpBB code? Or what?
There are 1001 ways/contests (probably more) to do this!
How you created this page, or where you'll go to display the result?
core.viewtopic_get_post_data
event?'core.viewtopic_modify_post_data' => 'viewtopic_modify_post_data',
Code: Select all
public function viewtopic_modify_post_data($e)
{
if($e['topic_id'] == '8')
{
$e['post_list'] = array_slice($e['post_list'], 5);
}
}
Code: Select all
if($e['topic_id'] == '2591066')
{
$e['post_list'] = array_slice($e['post_list'], 5); // get last 5 of this topic
}
thank you. its workingaxe70 wrote: ↑Tue Apr 27, 2021 9:50 am Complete your question:happy coding!Code: Select all
if($e['topic_id'] == '2591066') { $e['post_list'] = array_slice($e['post_list'], 5); // get last 5 of this topic }
some other extended explain or an image could help, i did not understand this, and pagination (?)one problem. its still show the pagination. how can i hide all the pagination except first page [1] ?
Really?