Add some text in viewtopic.php, only first post....How to?

This forum is now closed as part of retiring phpBB2.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

This forum is now closed due to phpBB2.0 being retired.
Post Reply
User avatar
Marnboorapa
Registered User
Posts: 84
Joined: Sat Jan 08, 2005 3:19 pm
Location: Thailand
Contact:

Add some text in viewtopic.php, only first post....How to?

Post by Marnboorapa »

I would like to put some texts warning after first post, but it show to all post. what is the condition that I have to put in if().

if (conditon)
{
$template->assign_block_vars('switch_first_post, array());
}


then if condition is right I can put this code ?

<!-- BEGIN switch_first_post-->
warning
<!-- END switch_first_post-->

User avatar
Brf
Support Team Member
Support Team Member
Posts: 51998
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Post by Brf »

Try this...

Code: Select all

if ($i == 0) {
$template->assign_block_vars('postrow.switch_first_post', array()); 
}
Then, put your warning inside the postrow

Code: Select all

<!-- BEGIN postrow --> 

message code here

<!-- BEGIN postrow.switch_first_post --> 
warning 
<!-- END postrow.switch_first_post -->

<!-- END postrow --> 

User avatar
Marnboorapa
Registered User
Posts: 84
Joined: Sat Jan 08, 2005 3:19 pm
Location: Thailand
Contact:

Post by Marnboorapa »

Today I spent some times did it, and it seem to be OK with "First post separated" by Tsubaru, and now I still find a way to show 'first post' of topic to every topic pages.

User avatar
3Di
Former Team Member
Posts: 15463
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Post by 3Di »

Marnboorapa wrote: Today I spent some times did it, and it seem to be OK with "First post separated" by Tsubaru, and now I still find a way to show 'first post' of topic to every topic pages.


like a global topic inside the topic's pagination?
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
:studio_microphone: Premium extensions @ The Studio

User avatar
Marnboorapa
Registered User
Posts: 84
Joined: Sat Jan 08, 2005 3:19 pm
Location: Thailand
Contact:

Post by Marnboorapa »

Yes some thing like that, first post seted for global to all the the topic's pagination, I'm not sure that is there some one create this mod if not I have to do it myself.

User avatar
3Di
Former Team Member
Posts: 15463
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Post by 3Di »

Marnboorapa wrote: Yes some thing like that, first post seted for global to all the the topic's pagination, I'm not sure that is there some one create this mod if not I have to do it myself.


just start it and let's know how's going, I think it could be an apreciated MOD (I saw it in action into an ASP platform years ago ;) )..

good luck
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
:studio_microphone: Premium extensions @ The Studio

Post Reply

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

cron