Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
  #1  
Old 03-24-2008, 01:24 PM
SUSN SUSN is offline
 
Join Date: Dec 2007
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default New Replies / Old replies image

Hi,

I am working on a new front page for my vBulletin forum. I need to show n.gif if there is a new post / thread in a forum and o.gif if there is no new threads / posts. How would I go about doing this?

Thanks in advance.
Reply With Quote
  #2  
Old 03-25-2008, 08:45 AM
BBI-Ross BBI-Ross is offline
 
Join Date: Apr 2007
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Bump
Reply With Quote
  #3  
Old 03-26-2008, 10:27 AM
SUSN SUSN is offline
 
Join Date: Dec 2007
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is this actually possible to use on another page, other than the forumhome? I went through the stock templates and couldn't see anything I could copy and use.

Cheers.
Reply With Quote
  #4  
Old 03-26-2008, 03:09 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

When I go to my home page, I have different icons depending on if there are new posts or not. If there are new posts, it uses "forum_new.gif", if there are no new posts it uses "forum_old.gif". Are you saying you want to replace those with "n.gif" and "o.gif"?
Reply With Quote
  #5  
Old 03-26-2008, 06:22 PM
SUSN SUSN is offline
 
Join Date: Dec 2007
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi,

Basically I will be creating a sidebar that can be seen from any part of the site apart from the forum home page. In the side bar, will be a list of the sites forums and next to them, I was hoping to put an icon to indicate if there was a new post in that forum.

Thanks for your reply.
Reply With Quote
  #6  
Old 03-26-2008, 06:56 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Looking in the template, that is determined by "forum_$forum[statusicon].gif", so $forum[statusicon] seems to be either 'old' or 'new'. Looking in forumdisplay.php, that is determined by the function fetch_forum_lightbulb which is in functions_forumlist.php around line 365. You can probably use that function for your own purposes or if you have access to the variable $forum[statusicon] on your page, you can use that to toggle between your two gifs.
Reply With Quote
  #7  
Old 03-26-2008, 08:49 PM
SUSN SUSN is offline
 
Join Date: Dec 2007
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for your reply.

So in theory (I haven't tested this yet), if I put this

Code:
<img src="/images/statusicon/$forum[imageprefix]forum_$forum[statusicon].gif"  id="forum_statusicon_$forum[4]" />
4 being the forum I would want the status of, I would be able to use the original file names forum_old.gif and forum_new.gif?

Cheers.
Reply With Quote
  #8  
Old 03-27-2008, 02:51 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by SUSN View Post
Thanks for your reply.

So in theory (I haven't tested this yet), if I put this

Code:
<img src="/images/statusicon/$forum[imageprefix]forum_$forum[statusicon].gif"  id="forum_statusicon_$forum[4]" />
4 being the forum I would want the status of, I would be able to use the original file names forum_old.gif and forum_new.gif?

Cheers.
Well, the template gets spit out in a loop that goes through the forumid. So, when you get to forumid 4, it finds out if there are new posts or not and then the statusicon is determined from there. So, you can't just put a "4" in there and have it work - you need to actually fetch the status for forumid 4 first.
Reply With Quote
Reply

Thread Tools
Display Modes

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 02:00 PM.


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.12386 seconds
  • Memory Usage 2,223KB
  • 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)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (8)postbit
  • (8)postbit_onlinestatus
  • (8)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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete