Jump to content
"Idzie nowe..." - o zmianach i nie tylko ×
Przeniesienie zakupów z IPS Marketplace / Moving bought items from IPS Marketplace ×

postContainer custom badges


Go to solution Solved by DawPi,

Recommended Posts

Posted

Hello, i want to add this two type of badges into my postContainer. The "staff member" badge i figured out with a method, using the "{{if $comment->author()->modShowBadge()}}" code but for the time since member registred i don`t know what code to use.

AdORxnL.png

So far this is what i've made :

csZfYAC.png

Also, do you have any recommendation of what to use instead the code i`ve used for the staff one, i wanted to be automatic instead of adding the groups id.

  • Manager
Posted
43 minuty temu, YGEX napisał(a):

code but for the time since member registred i don`t know what code to use

You mean joined date?

Try it:

 {datetime="$comment->author()->joined"}

 

intermedia - profesjonalne rozwiązania Invision Power Board

---

Chcesz uzyskać szybko i sprawnie pomoc? Uzupełnij wersję i adres w profilu.

Posted
16 minutes ago, DawPi said:

You mean joined date?

Try it:

 {datetime="$comment->author()->joined"}

 

 

More like how many days / months / years passed by since he`is registered.

Posted (edited)
40 minutes ago, DawPi said:

 

I've made it...but is not working properly, it`s display only in days. I used the "if" and "elseif" to create the code but only the first part works...

 

<div class="ipsType_center regTime" data-ipstooltip="" _title="Time Since User Registration" style="">
{{if $date_joined = floor((strtotime("now")-strtotime("{$comment->author()->joined}"))/86400)}}
	<li class="regTimeformat">{$date_joined} DAYS OF REGISTRATION</li>
{{elseif $date_joined = floor((strtotime("now")-strtotime("{$comment->author()->joined}"))/2592000)}}
	<li class="regTimeformat">{$date_joined} MONTHS OF REGISTRATION</li>
{{elseif $date_joined = floor((strtotime("now")-strtotime("{$comment->author()->joined}"))/31536000)}}
	<li class="regTimeformat">{$date_joined} YEARS OF REGISTRATION</li>
{{endif}}
</div>

 

EDIT : I see now that i arranged the code in a wrong way, switched days with years and now works properly.

Edited by YGEX
i`m to blind for this xD
  • Manager
Posted

Problem ROZWIĄZANY. Jeśli są jakiekolwiek wątpliwości, pytania proszę o założenie nowego tematu.

Wszelkie uzasadnione reklamacje/pretensje/sugestie/rady przyjmuje ekipa forum.

intermedia - profesjonalne rozwiązania Invision Power Board

---

Chcesz uzyskać szybko i sprawnie pomoc? Uzupełnij wersję i adres w profilu.

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.