How to replace user role with badge.

Share your ideas & teach other
Post Reply
Evansp
Posts: 2
Joined: Mon Mar 27, 2023 2:10 pm

How to replace user role with badge.

Post by Evansp »

{{VALUE(%role%)@IFEQ(Super Admin)@THEN(Img url)@ELSE()}}
Hariph
Posts: 35
Joined: Tue May 23, 2023 9:33 pm

Re: How to replace user role with badge.

Post by Hariph »

Please explain better, where do I insert this code is it at registration box or where
User avatar
Xkria-uy
Posts: 80
Joined: Fri Apr 07, 2023 9:27 pm
Location: Uruguay
Contact:

Re: How to replace user role with badge.

Post by Xkria-uy »

coloque donde quiera mostrar la insignia de rol de usuario, ejemplo API data lister

Code: Select all

  
{{VALUE(%role%)@IFEQ(Subscriber)@THEN(<img src="https://cdn-icons-png.flaticon.com/512/2740/2740655.png" width="20px" height="auto">)@ELSE()}}{{VALUE(%role%)@IFEQ(Super Admin)@THEN(<img src="https://cdn-icons-png.flaticon.com/512/1759/1759309.png" width="20px" height="auto">)@ELSE()}} <a href="/user/?id=%userid%"> <b class="{{SLUG(%role%)}}">%username%</b> </a> 

cambie url por la de su imagen preferida, este código no reemplaza nada, solo agrega insignia por rol
Hariph
Posts: 35
Joined: Tue May 23, 2023 9:33 pm

Re: How to replace user role with badge.

Post by Hariph »

Gracias, pero ¿qué pasa con el código de configuración?
User avatar
Xkria-uy
Posts: 80
Joined: Fri Apr 07, 2023 9:27 pm
Location: Uruguay
Contact:

Re: How to replace user role with badge.

Post by Xkria-uy »

Hariph wrote: Tue Feb 06, 2024 5:30 pm Gracias, pero ¿qué pasa con el código de configuración?

No entiendo exactamente que es lo que necesitas.
Esto parece ser para un maestro como @Francisco
Hariph
Posts: 35
Joined: Tue May 23, 2023 9:33 pm

Re: How to replace user role with badge.

Post by Hariph »

OK thank you
Post Reply