Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 01-22-2015, 12:18 AM
TrultToast's Avatar
TrultToast TrultToast is offline
 
Join Date: Aug 2013
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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!
Reply With Quote
  #2  
Old 01-22-2015, 02:56 AM
nerbert nerbert is offline
 
Join Date: May 2008
Posts: 784
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
Благодарность от:
TrultToast
  #3  
Old 01-22-2015, 01:34 PM
TrultToast's Avatar
TrultToast TrultToast is offline
 
Join Date: Aug 2013
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #4  
Old 01-22-2015, 03:06 PM
nerbert nerbert is offline
 
Join Date: May 2008
Posts: 784
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #5  
Old 01-22-2015, 04:33 PM
TrultToast's Avatar
TrultToast TrultToast is offline
 
Join Date: Aug 2013
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #6  
Old 01-25-2015, 07:25 PM
greigeh greigeh is offline
 
Join Date: Jan 2015
Posts: 113
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:30 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04476 seconds
  • Memory Usage 2,212KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (1)post_thanks_box_bit
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (6)post_thanks_postbit_info
  • (6)postbit
  • (6)postbit_onlinestatus
  • (6)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete