The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
If someone has a few extra minutes and could help me do this I'd greatly appreciate it.
I already have a code in my postbit_legacy that gives a user a badge if their join date was prior to a point X as Code:
<if condition="$post['jd_dateline'] + 31536000 <= TIMENOW"> <img border="0" src="http://www.utopiafootball.com/images/pridestickers/veteran_3.gif" alt="Veteran" vspace="1"> </if> I'm basically looking for <if posts_per_day > 20> Display image </if> Can anyone offer that code for me? |
#2
|
||||
|
||||
![]()
You can do math in templates. So, all you need is $post[posts] divided by the number of days the member has been a member.
So, (TIMENOW - $post['jd_dateline']) / (24*60*60) gives you the number of days. Which means you want $post[posts]/((TIMENOW - $post['jd_dateline']) / (24*60*60)) or $post[posts]/((TIMENOW - $post['jd_dateline']) / 86400) |
#3
|
|||
|
|||
![]()
Thank you for your reply and help, amykhar.
I attempted to implement that code, but my results were not appropriate. I entered the code as follows Code:
<if condition="1 < $post[posts]/((TIMENOW - $post['jd_dateline']) / 86400)"> <img border="0" src="http://www.utopiafootball.com/images/pridestickers/post+++++_2.gif" alt="Post +++++" vspace="1"> </if> The icon displays for every member of the forum if I flip the < to > which seems to indicate to me I'm not getting a proper value. Any ideas? |
#4
|
||||
|
||||
![]()
Let me try on my site and see what I come up with. I'll be back in a bit.
|
#5
|
||||
|
||||
![]()
ok. Here you go. It was TIMENOW that was hosing it. I put together this plugin for you to start with.
It's a plugin, not a product so import it as such. Then, change the activeposter variable to have the image you want. and use $activeposter in the postbit where you want it. |
#6
|
|||
|
|||
![]()
Works perfectly now.
Thank you very much for your help Amy! I definitely appreciate it. |
#7
|
||||
|
||||
![]()
My pleasure.
|
#8
|
|||
|
|||
![]()
Is there a hack that does this for different groups, usertitles, postcounts?
|
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|