The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
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? |
#2
|
||||
|
||||
Try ths:
HTML Code:
<if condition="$post['postcount'] > '5'"> do this <else /> do that </if> HTML Code:
<if condition="$post['postcount'] > '5'"> do this </if> |
#3
|
|||
|
|||
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.
|
#4
|
||||
|
||||
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.
|
#5
|
|||
|
|||
How would i go about that? Is there somewhere else i ask?
|
#6
|
||||
|
||||
No, you're in the right place.
First of all, what templates are you wanting to do this in? |
#7
|
|||
|
|||
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 |
#8
|
|||
|
|||
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. |
#9
|
|||
|
|||
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)
|
#10
|
|||
|
|||
HTML Code:
<if condition="$show['something']">your html code</if> HTML Code:
<if condition="$show['something']">your html code<else />alternate html code</if> |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|