The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Template conditionals
How can I check for new posts in a forum/subforum?
Thank you. |
#2
|
||||
|
||||
Where?
|
#3
|
||||
|
||||
Anywhere in a forum/subforum.
vb:if condition="new_posts"> ... <vb:else /> ... I dind't find any official documentation regarding all template variables... |
#4
|
||||
|
||||
You can't, because there is none. What do you mean by "in a forum" - on forumdisplay? On showthread?
This may not be possible without a plugin. On forumdisplay or showthread (you're not entirely clear where you want to use this) you don't normally show if there's unread threads as a whole; that is only determined in the threadbits for the single thread at hand. |
#5
|
||||
|
||||
I'd like to show and image at forumhome and forumdisplay when there is a new post.
So I need to know how to check for new posts in forumdisplay and showthread. |
#6
|
||||
|
||||
Pictures are already shown, when there are new posts in forums, you can see this on any normal forumhome page with the forum status icons.
if you want to get that data outside, you'd need to run a query to figure it out. You'd want to take a look at Number of Posts since last visit mod for something to get you started. |
#7
|
||||
|
||||
That seem quite bad to run a query for every single time I refresh the page to know if it's a new post or not.
I'm working on a mod to reduce http requests and optimise vb. So far I'm testing the beta in my own forum http://www.gamemaniacs.ro The condition that tells me if there are new posts is a must to finish my first mod release. |
#8
|
||||
|
||||
Why don't you checkout my iconic style, it does the things you want (massively reduce http request overhead, in a lot of places).
|
#9
|
||||
|
||||
Thank you mate, but I'm trying to implement css sprites.
|
#10
|
||||
|
||||
CSS sprites won't reduce http requests nearly as much as something like iconic.
But I don't understand why you need to know if there are new posts are not. You should assume there are and load the requires CSS/images anyway. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|