MyBB Hacks

Full Version: Check If First / Last Post in current page (Portal)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

Like the title, which condition I need to use if I want to check first or last post in the portal ?
Hi, it's me again Frown

In the MyBB portal, I want to use template conditional to check if that announcement is first post or last post in the current page.

Because, when a new thread was created, it will be the first announcement!

For example:

PHP Code:
<div class="news-article <if $firstannouncement then>first-child</if>">
<div class="news-article-inner">
....
</div>
</div>


Which condition I need to use in this case ?


Is there any way to check if that announcement is sticky thread or not ?

Because I want to something like Featured Post... Biggrin

Hello, I'm too fool when try to get the first post in portal.

The base of this is all about 'dateline' column in mybb_threads

And MyBB did that work for us, now we just need to compare between two query and we get the first post in portal as I want Biggrin


But how about to know that if that announcement is a superb thread or not ? (superb thread is a custom thread field)

How to get the custom thread field variable in portal.php ?
I've merged your threads.

You can use $threadfields['key'] in the portal_announcement.
Reference URL's