News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Member Groups Icons

Started by Suki, April 15, 2011, 02:59:03 PM

Previous topic - Next topic

Suki

Link to Mod

Link to Mod

This modification will add icons on both sides of username in various areas.

Only admin has the permission to add/ change/ remove icons for the member groups.

Admins can even choose that on which side icon should be displayed, i.e. right of username or left of username or on both sides.

Even admins can choose which usergroup names will be shown in bold across various sections.


Area where bold username & icons will be displayed with username:

- in Header
- in Last Post of Board Index
- in Forum Stats on Board Index
- In online list on Board Index
- in Message index
- in Posts
- in Profile
- in Personal messages
- in memberlist
- in "who's online"


Icons have to uploaded in default\images\group_images folder. Created a separate folder so that it will be easy to replace images afterwards if one wants to.


After adding image or icon in group_images folder go to,

Administration Center » Membergroups » Edit Membergroups
Click on modify button next to member group name
- add the icon name in "Icon/Image filename" field.
- Check mark 'Show username in bold' if you want to show the username of the specific group in bold


To enable or disable different permissions regarding mod go to,
Administration Center » Modification Settings » Member Group Icons


Note:
QuoteThe "group_images" directory will be still be present in the images folder even after the uninstallation of the mod

themes/default/images/group_images

This is done on purpose so that if an admin re-installs the mod he can use the mod from last state where he uninstalled it.

If you wish you can remove the "group_images" directory after uninstalling the mod there is no harm in it.

Also for the mod has started to support regular membergroups  partially.


Change Log

Version 1.3
- Added the functionality to show username in bold across various sections of your forum
- Enhancements across various sections
- A lot of bug fixes
- License changed
- Mod added to GitHub

Version 1.23
- A small bug fix for chrome and safari. A broken image was shown on those browsers for user group having no images.


Version 1.22
- Somehow in last fix the edits for the code of MemberOnline on board index were removed. The codes have been placed again.


Version 1.21
- In last update the mod lost its functionality to show member images on Board Index and inside of boards, fixed.
- Also as pointed out by BC- that the settings for who is online page are not working at all. Fixed.


Version 1.2
- The mod addresses the bug due to which the guests where shown database error when they try to access the forum.


Version 1.1
- Added the icons to 2 new places
- Number of queries reduced considerably
- License added to the mod

GitHub Link

License
* This SMF Modification is subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this SMF modification except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Matthew K.

Congratulations on the release, Joker! :) Looks pretty good!

Joker™

Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Arantor

Am I reading it right, that it does a new query for every row of the message index, or of the board index?

Joker™

Quote from: Arantor on April 15, 2011, 03:50:36 PM
Am I reading it right, that it does a new query for every row of the message index, or of the board index?
Yeah, I'm not that good with queries. Any ideas about this that how can we minimize it?
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Matthew K.

I think what Arantor was trying to imply is that instead of running another query for every board and messageindex, you could feed this feature off an existing query.

Arantor

Oh, I got ideas, just no time to sit and figure them out but there should be no reason to use any more than one extra query, to get all the groups and their icons, store that in an array in $context, and just figure out which icon is needed from primary/post group in loadMemberData/loadMemberContext. You don't even really need to get additional groups since if it's not important enough to put as their primary group, it's probably not appropriate to put the icon there.

BC-

Thanks for the mod.
I was wondering if someone could help me with one problem though.
When installing I got a few errors. I continued to install anyways,
It seems the crowns show up everywhere I want it to other than in posts.
Can anyone help me get it to show up in posts? Thanks!
Great mod btw

Joker™

Quote from: BC- on August 30, 2011, 01:22:18 PM
Thanks for the mod.
I was wondering if someone could help me with one problem though.
When installing I got a few errors. I continued to install anyways,
It seems the crowns show up everywhere I want it to other than in posts.
Can anyone help me get it to show up in posts? Thanks!
Great mod btw
What were the errors when you installed the mod.

Most probably the edits were not made in Display.template.php
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

BC-

Quote from: Joker™ on August 30, 2011, 01:48:11 PM
Quote from: BC- on August 30, 2011, 01:22:18 PM
Thanks for the mod.
I was wondering if someone could help me with one problem though.
When installing I got a few errors. I continued to install anyways,
It seems the crowns show up everywhere I want it to other than in posts.
Can anyone help me get it to show up in posts? Thanks!
Great mod btw
What were the errors when you installed the mod.

Most probably the edits were not made in Display.template.php

Displat.Template.php Test Failed
Messageindex.template.php Test Failed
All the rest for that theme were successful.

Joker™

Quote from: BC- on August 30, 2011, 05:24:22 PM
Displat.Template.php Test Failed
Messageindex.template.php Test Failed
All the rest for that theme were successful.
So icons are not displaying inside boards and posts? Am I right or am I right :laugh:.

Install the mod and attach both files here. You can find them in

themes\<theme you are using>\
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

BC-


Joker™

Try the attached file.


BTW I'm trying to understand how hooks work so that I can remove these template edits from the mod ;).
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

BC-

Quote from: Joker™ on August 31, 2011, 06:59:17 AM
Try the attached file.


BTW I'm trying to understand how hooks work so that I can remove these template edits from the mod ;).
Didn't work =/

Joker™

Quote from: BC- on August 31, 2011, 01:51:31 PM
Didn't work =/
What didn't worked? A screen shot, forum link can do wonders :).
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

BC-

Quote from: Joker™ on August 31, 2011, 01:53:14 PM
Quote from: BC- on August 31, 2011, 01:51:31 PM
Didn't work =/
What didn't worked? A screen shot, forum link can do wonders :).
I sent you a PM of the website link. Nothing changed when i added the new attached files.

Joker™

Quote from: BC- on August 31, 2011, 01:54:48 PM
I sent you a PM of the website link. Nothing changed when i added the new attached files.
Replied and please use this thread for further discussion as it might help others too.
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

BC-

You asked the question is the mod already installed?
My response yes.

Joker™

Quote from: BC- on August 31, 2011, 01:57:28 PM
You asked the question is the mod already installed?
My response yes.


When I tried to visit the site I got the following error.
Quote
Database Error
Please try again. If you come back to this error screen, report the error to an administrator.
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

BC-

I have members posting right now at the site. mind to take a screenshot so i can fix that?

Advertisement: