vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Forumid has new posts indicator if statement (https://vborg.vbsupport.ru/showthread.php?t=316833)

TrultToast 01-22-2015 12:18 AM

Forumid has new posts indicator if statement
 
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:
Code:

<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

Code:

<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.


All times are GMT. The time now is 08:42 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00977 seconds
  • Memory Usage 1,719KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete