Page 1 of 1

[solved]Need an other IF statement then postrow.S_FIRST_ROW

Posted: Sat Jun 23, 2012 9:59 am
by master412160
Hello,

I'm trying to get the first post of a topic to do something with it IF it is indeed the first post of a topic.

The current IF statement does it for the first post of each page of a topic. :(

I couldn't find any other if statement that does close to what I want so I choose the postrow.S_FIRST_ROW one.

What can I do? I'm using phpBB 3.0.10.

Re: Need an other IF statement then postrow.S_FIRST_ROW

Posted: Sat Jun 23, 2012 10:45 am
by Balint
you have to alter one line in viewtopic.php to accomplish this:
http://www.phpbb.com/customise/db/mod/advertisement_management/faq/f_463 wrote:find

Code: Select all

'S_TOPIC_POSTER'   => ($topic_data['topic_poster'] == $poster_id) ? true : false,
after add

Code: Select all

'S_FIRST_POST'      => ($topic_data['topic_first_post_id'] == $row['post_id']) ? true : false,
Then you can do a

Code: Select all

<!-- IF postrow.S_FIRST_POST -->do something<!-- ENDIF -->

Re: Need an other IF statement then postrow.S_FIRST_ROW

Posted: Sat Jun 23, 2012 10:56 am
by master412160
Thank you! That solved it. :)