News:

Want to get involved in developing SMF? Why not lend a hand on our GitHub!

Main Menu

Custom badges in user profile with BBC

Started by johan7804, November 18, 2014, 03:21:05 AM

Previous topic - Next topic

johan7804

I'm trying to create a custom profile field in the user profile allowing the admins to post pictures, or 'badges', to users profiles to display certain accomplishments. I set the field to allow BBC, but it only accepts unbroken code, like [img]http://location.com/badge/badge.png[/img]

If I try to enter a comment, an image size modifier or comment, the badge won't show. Instead the code itself shows. The symbol " becomes &qoute; and so on. Thus no image is displayed. I'd like to enter a mouse over description what the badge means, or even better a link, but the BBC won't allow it...

Is there a mod to do do this better, or how do I properly use the BBC?

Arantor

There are badges mods out there, would that not serve your purpose better? Hard to say without being clear on what exactly you want.
Holder of controversial views, all of which my own.


johan7804

Quote from: Arantor on November 18, 2014, 03:24:09 AM
There are badges mods out there, would that not serve your purpose better? Hard to say without being clear on what exactly you want.

I've found a few automatic badge mods that assigns badges to members per forum post count. I would like to manually assign badges, say, if the member is very helpful, is from a certain country or is a lady or gentleman. Most of all I would like it to show up under the contact icons to the left part of all forum posts for the world to see, but I didn't find any mods to fix it. Can you perhaps point me in the right direction? :)


Arantor

Holder of controversial views, all of which my own.


Kindred

yup... there are 2 or 3 awards mods that seem to do exactly what you are describing - including the one that Arantor linked.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

johan7804

Quote from: Arantor on November 18, 2014, 04:19:27 AM
So, https://github.com/Spuds/SMF-Member-Awards then.

Thank you, this seems like a nice mod. Such a fantastic community that develops all the awesome mods :)

Do you by any chance have a clue either how the mod sorts the awarded awards, or how I can sort them myself?

I added 3 test awards under the profile picture which works fine, but they are displayed in the "order" 3, 1, 2.

johan7804

Quote from: Kindred on November 18, 2014, 09:04:29 AM
yup... there are 2 or 3 awards mods that seem to do exactly what you are describing - including the one that Arantor linked.

Would you by any chance have a name or link available? I can't seem to find then, probably looking for the wrong thing... Had never heard of Github before, only looked through SMF Customize before this.

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

johan7804

Quote from: Kindred on November 19, 2014, 07:57:32 AM
http://custom.simplemachines.org/mods/index.php?action=search;basic_search=award

Thank you, and pardon my ignorance, but aren't those only supported by SMF 2.0.6, 1.1.2 and 2.0 R.C?

I was under the impression that they would not work optimally with 2.0.9? Or did I get that kind of backwards?

Arantor

The thing for 2.0.6 should work fine on 2.0.9. The one for RC... maybe, the one for 1.1.x no. And then there's the one I outlined, which is different to all of those.

Also note that the one I outlined... I suspect the reason for your issue is that it is organising them by name
Holder of controversial views, all of which my own.


johan7804

Quote from: Arantor on November 19, 2014, 08:58:35 AM
...I suspect the reason for your issue is that it is organising them by name

Yes, it sorts them by name, alphabetically, in the admin console, but not when displaying them on the Member profile summary. I would be fine if they were in both alphabetical order both in the console and on the Profile summary, or even in the creation order, but neither seem to match up...

johan7804



As you can see, the Destiny DB profile field is sorted on top in the admin panel, due to alphbetical order, but it ends up at the end on the profile page (black icon to the right of Youtube icon). Sure, I COULD redo the fields, but that would be pretty silly when I want to put a new field between say Facebook and Reddit...

Kindred

wait....   you are trying to do social media account links?

Well, THAT is a different story - and you should indeed be using custom profile fields for that - not awards.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

johan7804

Quote from: Kindred on November 19, 2014, 09:16:53 AM
wait....   you are trying to do social media account links?

Well, THAT is a different story - and you should indeed be using custom profile fields for that - not awards.

Hmm, I do believe I mixed up two threads and posted the wrong image/text here... brb...

johan7804

Here is a link to show what I'm after.

http://bennerheim.se/forum/index.php?topic=21.0



The first shield has ID=6, the Destiny symbol has ID=2 and the second shield has ID=5. Also the images on the FTP are namned (in order of apperance) 6, 2 and 5.

The awards are sorted into two different categories, Site and Destiny. The Destiny symbol is actually in the Site category and the shields in the Destiny category.

The Award names are (in order of apperance) Commander (The Dark Below), Original Traveler and Commander (Vault of Glass)

As you can see, there is no logic to the current sorting at all! Not ID, not category, not alphabetically...

Edit: these are just our test forums so pardon the mess :)

Arantor

I have no idea how the mod's code actually does it, unfortunately but there will be a reason for how it operates, I just don't know what it is.
Holder of controversial views, all of which my own.


Advertisement: