PDA

View Full Version : Forumid has new posts indicator if statement


TrultToast
01-22-2015, 12:18 AM
Hello, I'm sorry for making all these threads, lol... But I need the help.

I am creating a new forumhome and I was wondering if there is some kind of if statement that will display something if there are new posts/threads in a specific forum. I had found a thread kind of asking the same thing, but I didnt get the answer at all...

This is kind of what I'm asking for:
<if condition="$bbuserinfo[forumid has new posts] == X">(There are NEW Posts in this forum)</if>
If there are no new threads/posts: [FORUM ICON] Forum Category 1
IF there are new threads/posts: [FORUM ICON] Forum Category 1 (There are NEW Posts in this forum)

something like that, idk...
All help is welcome!

nerbert
01-22-2015, 02:56 AM
I'm pretty sure this would do it


<if condition="$forum['statusicon'] == 'new'">NEW POSTS IN THIS FORUM</if>


EDIT: I didn't notice this was for vB3. Edited code accordingly. From the icons here on vB.org I still think it will work.

TrultToast
01-22-2015, 01:34 PM
Thank you nerbert!
I'll make sure to give it a try that way, but I was wondering if there was something like that but it would use a forum id. Because I'd be putting this into some HTML and not a forumbits template.

nerbert
01-22-2015, 03:06 PM
I don't know what your plan is, but outside a template, conditionals like that don't mean a thing, they'll just show up as text.

Unless you plan on a radical redesign, you better stick with the template system. You can radically redesign the forumbits template if your html/css skills are up to it.

TrultToast
01-22-2015, 04:33 PM
I am very fluent in HTML and CSS, just not too much in PHP, haha.
I think I'll just scratch my idea, and start heavily modifying the templates one by one... But thanks again for the if conditional nerbert.

greigeh
01-25-2015, 07:25 PM
I found this script which may prove useful:

https://vborg.vbsupport.ru/showthread.php?t=201308

If you have an understanding, you may be able to tweak it so it will only work with a set forum rather than the entire new posts? Just a suggestion. Nevertheless, nerbert's suggestion seems best.