Latest topic in a forum

Discussion forum for MOD Writers regarding MOD Development.
Locked
snake1987
Registered User
Posts: 26
Joined: Mon Jan 18, 2010 11:15 pm

Latest topic in a forum

Post by snake1987 »

I'm trying to make a query that obtains the newest topic in a particular forum and show the title with the link on index
I need the topic_id (so I can add it it to the url) and the title_topic
I got the query but I don't know how can I save it somewhere and show the result on index

Could you please help me a bit?

Thanks!


PD: edit, mistake on the title!
Last edited by snake1987 on Thu Feb 17, 2011 10:33 pm, edited 1 time in total.
User avatar
Brf
Support Team Member
Support Team Member
Posts: 52111
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: Latest post in a forum

Post by Brf »

There is no need to query it for the index. The topic title is already retrieved for each forum on the index.
See its variable is set here in display_forums() in includes/functions_display

Code: Select all

			'LAST_POST_SUBJECT'		=> censor_text($last_post_subject),
snake1987
Registered User
Posts: 26
Joined: Mon Jan 18, 2010 11:15 pm

Re: Latest post in a forum

Post by snake1987 »

Sorry! I made a mistake explaining myself.
I mean show the latest topic from a specific forum, for example, show the newest topic title from the forum with id 5 in the index and a link on it that leads you to that topic

Thanks!
CMCDragonkai
Registered User
Posts: 483
Joined: Sat Jun 09, 2007 11:37 pm
Location: Australia.. and other parts of the world sometimes...

Re: Latest topic in a forum

Post by CMCDragonkai »

Check my signature, that'll do what you want.
Show phpbb threads as html articles. V.5.03 Thanks Erik! (This will be updated constantly as I or others contribute...) This code is to be used on external HTML page, but if you want a template version see here.

For the best PHPBB total modification to posting - bbcode, embedding... everything! Visit MSSTI's ABBC3 Modification.
Locked

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