![]() |
Template conditional for post count
I am wanting to show something to people who have made over 5 posts in the last 24 hours. For inside a template.
Can anyone help please? |
Try ths:
HTML Code:
<if condition="$post['postcount'] > '5'"> HTML Code:
<if condition="$post['postcount'] > '5'"> |
Boofo - isn't that only going to do if they have more than 5 posts? I want to know if they ahve done 5 posts in the last 24 hours.
|
Ahh, ok, my bad. You are going to have do do a plugin for that to figure out the time portion of it, I think.
|
How would i go about that? Is there somewhere else i ask?
|
No, you're in the right place.
First of all, what templates are you wanting to do this in? |
I have used https://vborg.vbsupport.ru/showthrea...t=subscription to make my own page. And i ahve 2 items on the page, i want to do an if else for it.
if more than 5 posts in the last 24 hours show this else show that |
You could use a plugin with the following code:
PHP Code:
And once you add the plugin (or the code into the page), you can use $show['something'] in your template. |
The 'something' that i want to show is html code - how do i fix that? (sorry i am a noob at this side of things)
|
HTML Code:
<if condition="$show['something']">your html code</if> HTML Code:
<if condition="$show['something']">your html code<else />alternate html code</if> |
All times are GMT. The time now is 07:19 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|