PDA

View Full Version : New Replies / Old replies image


SUSN
03-24-2008, 01:24 PM
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

<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
Thanks for your reply.

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

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