MyBB Community Forums

Full Version: Obtain the last announcement thread
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I would like to add a button on the portal page and the forum pages.
This button would redirect to the last announcement of the forum : like the showthread page.
The forums for announcement are defined in the "Portal settings" configuration in administration.

There is already the number of new announcements display on the portal page using :
{$lang->new_announcements}
in the "portal_welcome_membertext" template.
And on the portal page there is this for each announcement.
<a href="{$mybb->settings['bburl']}/{$announcement['forumlink']}">{$announcement['forumname']}</a> {$numcomments}</span>
in the "portal_announcement" template.
For new messages it is possible to use these link :
https://board_url/search.php?action=getnew
and
https://board_url/search.php?action=getdaily

I couldn't find the variables to use in order to obtain a valid url for this.

I have only one forum for the announcement, so if it's possible to have the showthread link for the last thread of a specific forum that would work too.

Anybody with a hint ? Smile