Years of Service Postbit Add-On 1.8.20
#11
(2019-05-30, 12:52 PM)Serpius Wrote:
(2019-05-10, 06:58 AM)FaridAzhar777 Wrote: [Image: uFfvWg7.png]

[Image: rzi6g0I.png]

Required
<div class="smalltext" style="background: #212121;padding: 7px;margin: 5px 0;">
<if $post['regdate']+(60*60*24*1095) <= TIME_NOW then><span style="color: #FF0040;">4 Years of Service</span>
<elseif $post['regdate']+(60*60*24*1095) <= TIME_NOW then><span style="color: #FF0080;">3 Years of Service</span>
<elseif $post['regdate']+(60*60*24*730) <= TIME_NOW then><span style="color: #FF00BF;">2 Years of Service</span>
<elseif $post['regdate']+(60*60*24*365) <= TIME_NOW then><span style="color: #FF00FF;">1 Year of Service</span>
<elseif $post['regdate']+(60*60*24*330) <= TIME_NOW then><span style="color: #0080FF;">11 Months of Service</span>
<elseif $post['regdate']+(60*60*24*300) <= TIME_NOW then><span style="color: #00FFFF;">10 Months of Service</span>
<elseif $post['regdate']+(60*60*24*270) <= TIME_NOW then><span style="color: #00FF80;">9 Months of Service</span>
<elseif $post['regdate']+(60*60*24*240) <= TIME_NOW then><span style="color: #00FF00;">8 Months of Service</span>
<elseif $post['regdate']+(60*60*24*210) <= TIME_NOW then><span style="color: #FF4000;">7 Months of Service</span>
<elseif $post['regdate']+(60*60*24*180) <= TIME_NOW then><span style="color: #FF8000;">6 Months of Service</span>
<elseif $post['regdate']+(60*60*24*150) <= TIME_NOW then><span style="color: #FFBF00;">5 Months of Service</span>
<elseif $post['regdate']+(60*60*24*120) <= TIME_NOW then><span style="color: #FFFF00;">4 Months of Service</span>
<elseif $post['regdate']+(60*60*24*90) <= TIME_NOW then><span style="color: #F4FA58;">3 Months of Service</span>
<elseif $post['regdate']+(60*60*24*60) <= TIME_NOW then><span style="color: #D8D8D8;">2 Months of Service</span>
<elseif $post['regdate']+(60*60*24*30) <= TIME_NOW then><span style="color: #848484;">1 Month of Service</span>
<elseif $post['regdate']+(60*60*24*0) <= TIME_NOW then><span style="color: #848484;">Less Than a Month</span></if>
</div>

Tested on v1.8.20

Demo: https://forum.sinfulsite.com/thread-1169-post-4032.html

This tutorial is lacking a few steps.

You did not indicate WHERE that code is supposed to go to. No one has any idea where that code goes.

You did not indicate HOW someone can change the colors of the postbit fonts. 

You did not indicate HOW to change the font styling to something different if someone prefers a different default font styling of their theme.

Those items needs to be explained in detail.

Take Crazycat's idea and make this a plugin. You can add the plugin in the MyBB 'Extend' section for everyone to view and download.


Why would he need to tell you where to place it. Everyone has a different postbit template. He gave you the full element, you just paste it in your desired spot in the postbit.
Name's Waleed, I'm a graphic and web design (2015) graduate from Canada. Self-employed and lending my design skills to the MyBB community.
Reply
#12
(2019-05-30, 12:52 PM)Serpius Wrote: This tutorial is lacking a few steps.

You did not indicate WHERE that code is supposed to go to. No one has any idea where that code goes.

You did not indicate HOW someone can change the colors of the postbit fonts. 

You did not indicate HOW to change the font styling to something different if someone prefers a different default font styling of their theme.

Those items needs to be explained in detail.

Take Crazycat's idea and make this a plugin. You can add the plugin in the MyBB 'Extend' section for everyone to view and download.

Hahaha what?

It's not a person's responsibility to hand feed you the code you need to make it look exactly how you want.

If you want to learn how to use HTML, which is perhaps among the easiest things in the world to learn, I'd recommend hitting up w3schools; there's many better places than here to learn.

This does not need to be a plugin, since it's just HTML. You'd be introducing a security risk for no benefit.
Reply
#13
(2019-06-21, 03:39 PM)kuttysoft Wrote: not working with  1.8.21

i am getting error

[Image: Screenshot_1241.png]

Error is unrelated to this - works fine in 1.8.21. Good job OP, thanks for contributing.
What goes around comes around
Reply
#14
(2019-06-28, 04:16 AM)Ben Cousins Wrote: This does not need to be a plugin, since it's just HTML. You'd be introducing a security risk for no benefit.
It contains logical process, math operations... It could be a plugin.
[MyBB 1.8 mods] - Offer me a coffee
Do not ask me help through PM or Discord
Reply
#15
(2019-06-28, 04:16 AM)Ben Cousins Wrote:
(2019-05-30, 12:52 PM)Serpius Wrote: This tutorial is lacking a few steps.

You did not indicate WHERE that code is supposed to go to. No one has any idea where that code goes.

You did not indicate HOW someone can change the colors of the postbit fonts. 

You did not indicate HOW to change the font styling to something different if someone prefers a different default font styling of their theme.

Those items needs to be explained in detail.

Take Crazycat's idea and make this a plugin. You can add the plugin in the MyBB 'Extend' section for everyone to view and download.

Hahaha what?

It's not a person's responsibility to hand feed you the code you need to make it look exactly how you want.

If you want to learn how to use HTML, which is perhaps among the easiest things in the world to learn, I'd recommend hitting up w3schools; there's many better places than here to learn.

This does not need to be a plugin, since it's just HTML. You'd be introducing a security risk for no benefit.

You totally misread my post, but I am not here to argue with you about it.
I'm Serpius and You're Not    ¯\_(ツ)_/¯
LUXOR FORUMS
Reply
#16
--- please refrain from personal comments ---
Reply
#17
(2019-05-10, 06:58 AM)FaridAzhar777 Wrote: Demo: https://forum.sinfulsite.com/thread-1169-post-4032.html

Your demo site uses MyBB, but it doesn't put powered by MyBB. like this jerk user on my website
MyBB Indonesia | Facebook Page | Twitter
Bangga Menggunakan MyBB sebagai Forum Core Engine Big Grin
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)