inherit
206056
0
Oct 22, 2024 12:06:59 GMT -8
adminabp
378
February 2014
adminabp
|
Post by adminabp on Nov 26, 2022 4:21:27 GMT -8
So I managed a simple thing to add an image after a user's name based on the user id, but I want to use it for multiple users based off their ids. How do I do that?
<div style="{if $[user.id] == 1}"><img src="https://storage.proboards.com/5732327/images/UswUPEZULthZziiqwVhP.png" title="Verified Account {/if}"></div>
Any help is appreciated.
|
|
inherit
223590
0
May 17, 2023 9:13:21 GMT -8
Kitty Katt
My Username is @kittykatt (with 2 t's in katt)
821
July 2015
kittykatt
|
Post by Kitty Katt on Nov 26, 2022 7:14:09 GMT -8
So I managed a simple thing to add an image after a user's name based on the user id, but I want to use it for multiple users based off their ids. How do I do that? <div style="{if $[user.id] == 1}"><img src="https://storage.proboards.com/5732327/images/UswUPEZULthZziiqwVhP.png" title="Verified Account {/if}"></div> Any help is appreciated. Hello. If you are using the same image for each user, then I believe something like: {if $[user.id] == 1 || $[user.id] == 6 || $[user.id] == 36} Replace the ID numbers with the actual ID numbers of the members that are affected. If this was used in your line above, it should look like this: <div style="{if $[user.id] == 1 || $[user.id] == 6 || $[user.id] == 36}"><img src="https://storage.proboards.com/5732327/images/UswUPEZULthZziiqwVhP.png" title="Verified Account {/if}"></div> The problem I foresee with this is when you have many users to affect. You will most likely need an actual coder to give you a better solution, but the above should work (with a limited amount of affected users) in the interim.
|
|
Kami
Forum Cat
Posts: 40,198
Mini-Profile Theme: Kami's Mini-Profile
#f35f71
156500
0
Offline
Jul 24, 2021 11:48:29 GMT -8
Kami
40,198
July 2010
kamiyakaoru
Kami's Mini-Profile
|
Post by Kami on Nov 26, 2022 7:41:02 GMT -8
The above solution is fine, actually, and the best method if you are using the same image for multiple users, irrespective of the number of users you need to affect. A Javascript code would need to target multiple IDs in the same fashion.
That said, if there's just a lot of IDs to type in, you may want to put them in the same member group and then add the image based on group ID.
|
|
inherit
206056
0
Oct 22, 2024 12:06:59 GMT -8
adminabp
378
February 2014
adminabp
|
Post by adminabp on Nov 27, 2022 4:02:59 GMT -8
So I managed a simple thing to add an image after a user's name based on the user id, but I want to use it for multiple users based off their ids. How do I do that? <div style="{if $[user.id] == 1}"><img src="https://storage.proboards.com/5732327/images/UswUPEZULthZziiqwVhP.png" title="Verified Account {/if}"></div> Any help is appreciated. Hello. If you are using the same image for each user, then I believe something like: {if $[user.id] == 1 || $[user.id] == 6 || $[user.id] == 36} Replace the ID numbers with the actual ID numbers of the members that are affected. If this was used in your line above, it should look like this: <div style="{if $[user.id] == 1 || $[user.id] == 6 || $[user.id] == 36}"><img src="https://storage.proboards.com/5732327/images/UswUPEZULthZziiqwVhP.png" title="Verified Account {/if}"></div> The problem I foresee with this is when you have many users to affect. You will most likely need an actual coder to give you a better solution, but the above should work (with a limited amount of affected users) in the interim. Thank You! I was afraid it would be something like that instead of just a simple separator between the numbers. I was actually using a plugin Add Icon to Corner of Mini-Profile initially, and since the plugin was editable I did mange to get it to display everywhere the mini-profile did which oddly it did not initially, but I also wanted to add the image other places like on the main profile and also to an alternate version of the mini-profile I created that appears on smaller screens.
The plugin developer said he was going to rewrite the plugin with some of those changes in mind but it's now been three years since I heard anything from them.
The above solution is fine, actually, and the best method if you are using the same image for multiple users, irrespective of the number of users you need to affect. A Javascript code would need to target multiple IDs in the same fashion. That said, if there's just a lot of IDs to type in, you may want to put them in the same member group and then add the image based on group ID.
A group was my first thought, but I ruled that out since it would only work if that group was the one displayed on things like the mini-profile. I might try a combination of one for Group ID's and another for User IDs.
The point of the whole thing is to add a 'verified account' check-mark to the main-profile, mini-profile, and my custom alt-mini-profile. I'm amazed there isn't a plugin specifically for that already.
|
|