![]() |
Custom badge in posbit_legacy for users with > X posts per day?
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"> I'm basically looking for <if posts_per_day > 20> Display image </if> Can anyone offer that code for me? |
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) |
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)"> 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? |
Let me try on my site and see what I come up with. I'll be back in a bit.
|
1 Attachment(s)
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. |
Works perfectly now.
Thank you very much for your help Amy! I definitely appreciate it. |
My pleasure.
|
Is there a hack that does this for different groups, usertitles, postcounts?
|
All times are GMT. The time now is 02:42 PM. |
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:
|