vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   New Replies / Old replies image (https://vborg.vbsupport.ru/showthread.php?t=174015)

SUSN 03-24-2008 01:24 PM

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.

BBI-Ross 03-25-2008 08:45 AM

Bump

SUSN 03-26-2008 10:27 AM

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.

Lynne 03-26-2008 03:09 PM

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"?

SUSN 03-26-2008 06:22 PM

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.

Lynne 03-26-2008 06:56 PM

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.

SUSN 03-26-2008 08:49 PM

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.

Lynne 03-27-2008 02:51 AM

Quote:

Originally Posted by SUSN (Post 1475355)
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.


All times are GMT. The time now is 04:59 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.01201 seconds
  • Memory Usage 1,726KB
  • 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)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)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