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

Discussion forum for MOD Writers regarding MOD Development.
Locked
User avatar
master412160
Registered User
Posts: 314
Joined: Sat May 22, 2010 5:45 pm
Location: Belgium, Flanders
Name: Max Pen
Contact:

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

Post by master412160 » Sat Jun 23, 2012 9:59 am

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.
Last edited by master412160 on Sat Jun 23, 2012 10:56 am, edited 1 time in total.

User avatar
Balint
Registered User
Posts: 952
Joined: Tue Aug 06, 2002 2:19 pm
Location: Germany
Contact:

Re: Need an other IF statement then postrow.S_FIRST_ROW

Post by Balint » Sat Jun 23, 2012 10:45 am

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 -->

User avatar
master412160
Registered User
Posts: 314
Joined: Sat May 22, 2010 5:45 pm
Location: Belgium, Flanders
Name: Max Pen
Contact:

Re: Need an other IF statement then postrow.S_FIRST_ROW

Post by master412160 » Sat Jun 23, 2012 10:56 am

Thank you! That solved it. :)

Locked

Return to “[3.0.x] MOD Writers Discussion”