Advanced Group Color Management - IM 141

This forum contains member submitted mods and hacks for IntegraMOD/IM Portal versions

*please read the "Read Me" post*

Moderator: Integra Moderator

Re: Advanced Group Color Management - IM 141

PostAuthor: nGAGE » Sat May 12, 2007 6:48 am

"sgomes";p="23827" wrote:There seems to be a bug regarding group moderators, where they show up as "username_color" instead of with the correct group name. To view this, just assign to any group the moderation of a forum and view that forum.

After banging my head for a while (I don't know any PHP) I was able to find and fix the problem. Just go to includes/functions_categories_hierarchy.php and replace

Code: Select all
$s_group_names .= ( empty($s_group_names) ? '' : ', ' ) . sprintf("'%s'", str_replace("'", "'", $agcm_color->get_user_color($data['user_group_id'][$j], $data['group_name'][$j])));


with

Code: Select all
$s_group_names .= ( empty($s_group_names) ? '' : ', ' ) . sprintf("'%s'", str_replace("'", "'", $agcm_color->get_user_color($data['group_id'][$j], 0, $data['group_name'][$j])));


on line 425.

I hope this is useful to someone!


SÃÂÂ ©rgio Gomes


This fix worked fine for me... Thnx, but there is a nother little problem with it... don't know if it has to do with "cache" yet... will have to check that!

If you change the name of a group, for example from "Administrators" to "Admins"... it keeps displaying "Administrators"...
Like I said... have to check if it's a caching thing, but I currently solved it by going into the group/permissions for a group and without changing anything simply "Submit" again.
After that it's changed to "Admins"
Last edited by nGAGE on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
[url=http][img=left]http://www.net-clan-gaming.eu/ftp/ngage/images/nEt_v3_sig.png[/img][/url]
User avatar
nGAGE
Sr Integra Member
Sr Integra Member
 
Posts: 248
Likes: 0 post
Liked in: 0 post
Joined: Mon Mar 27, 2006 6:28 am
Cash on hand: 0.00

PostAuthor: nGAGE » Sat May 12, 2007 7:08 am

OK... So I've now tried several things... Clearing Cache in IM-PORTAL of the ACP and via EXTREME-STYLES Manage Cache in ACP, and it both doesn't solve the minor issue!

Further I've tested changing group type. This issue also occurs when changing the group-type from Closed to Hidden (group remains visible on forum) and also the other way around. If from Hidden to closed, group does not become visible, until you go to Group-Permissions and submit again.
So the problem happens somewhere in that it stores and reads the data but not dynamically updates it (I guess)

Any suggestions?
Last edited by nGAGE on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
[url=http][img=left]http://www.net-clan-gaming.eu/ftp/ngage/images/nEt_v3_sig.png[/img][/url]
User avatar
nGAGE
Sr Integra Member
Sr Integra Member
 
Posts: 248
Likes: 0 post
Liked in: 0 post
Joined: Mon Mar 27, 2006 6:28 am
Cash on hand: 0.00

PostAuthor: nGAGE » Sat May 12, 2007 7:16 am

Hmmm... VERY ODD!

Now I've made a post in my own BUG-TRACKER forum to not forget a bout this... and after the post it updated it :o
But why doesn't it do it after changes are made in ACP?

[EDIT-2]: I've now waited over 30-min and it doesn't change if I don't make a new post, after making a name change to the usergroup! So definately not a cache issue. Must be something that's missing in the admin/admin_groups.php or the admin/admin_group_extend.php that causes it to not update, I'd guess. Or... Aww shoot... dunno what files to look at, as it also update when posting :S

Perhaps in the files responsible/used when posting/editing it reads something from database that is not read after updating info on Group/Manage of ACP?

Will have a "beginer"-look at those to see if I notice anything <img>
Last edited by nGAGE on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
[url=http][img=left]http://www.net-clan-gaming.eu/ftp/ngage/images/nEt_v3_sig.png[/img][/url]
User avatar
nGAGE
Sr Integra Member
Sr Integra Member
 
Posts: 248
Likes: 0 post
Liked in: 0 post
Joined: Mon Mar 27, 2006 6:28 am
Cash on hand: 0.00

PostAuthor: nGAGE » Sat May 12, 2007 8:10 am

Another Question about this MOD... When adding new usergroups, it always adds them to the top of the list in ACPs Group/Colors... That can be a pain in the "you know what" when you constantly have to move them down. I'll see if I can findout why or where to change it to display the otherway arround, but if I can't find it... any suggestions are welcome.
Last edited by nGAGE on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
[url=http][img=left]http://www.net-clan-gaming.eu/ftp/ngage/images/nEt_v3_sig.png[/img][/url]
User avatar
nGAGE
Sr Integra Member
Sr Integra Member
 
Posts: 248
Likes: 0 post
Liked in: 0 post
Joined: Mon Mar 27, 2006 6:28 am
Cash on hand: 0.00

PostAuthor: nGAGE » Sat May 12, 2007 4:21 pm

OK... so this has been going wrong again for me and I think the earlier mentioned fix wasn't a fix, but rather a bypass for the bug.

FILE: /includes/functions_categories_hierarchy.php

I think there is something wrong with this part:
Code: Select all
 $agcm_color->get_user_color($data['group_id'][$j], 0, $data['group_name'][$j])  

I think it should be this (and it has the same effect and works for me):
Code: Select all
 $agcm_color->get_user_color($data['group_id'][$j], $data['user_group_id'][$j], $data['group_name'][$j])  



Please correct me if I'm wrong, but the correct fix on that line of code should be this:

Code: Select all
 ##-----[ FIND ]------------------------------------------#             $s_group_names .= ( empty($s_group_names) ? '' : ', ' ) . sprintf("'%s'", str_replace("'", "'", $agcm_color->get_user_color($data['user_group_id'][$j], $data['group_name'][$j])));  ##-----[ REPLACE WITH ]------------------------------------------#             $s_group_names .= ( empty($s_group_names) ? '' : ', ' ) . sprintf("'%s'", str_replace("'", "'", $agcm_color->get_user_color($data['group_id'][$j], $data['user_group_id'][$j], $data['group_name'][$j])));        


This has the same effect and will call the correct "group_id" + "user_group_id"

Which since this afternoon on the other fix (don't know if it had to do with the value ", 0" that was there), somehow set all my users' user_group_id to "0" and no colors displayed anymore.

Somewhere there must be some code that doesn't update the phpbb_users.user_group_id properly (I think)... I'm still searching... going through the manual install for clues.
Last edited by nGAGE on Tue May 22, 2007 5:09 am, edited 1 time in total.
[url=http][img=left]http://www.net-clan-gaming.eu/ftp/ngage/images/nEt_v3_sig.png[/img][/url]
User avatar
nGAGE
Sr Integra Member
Sr Integra Member
 
Posts: 248
Likes: 0 post
Liked in: 0 post
Joined: Mon Mar 27, 2006 6:28 am
Cash on hand: 0.00

PostAuthor: nGAGE » Mon May 14, 2007 8:48 pm

Ok... I'm still convinced my version for displaying the forum moderators is the correct one, but now also want to call off false alarm on the updating issue.
Another mod was the cause! Got it fixed.
Last edited by nGAGE on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
[url=http][img=left]http://www.net-clan-gaming.eu/ftp/ngage/images/nEt_v3_sig.png[/img][/url]
User avatar
nGAGE
Sr Integra Member
Sr Integra Member
 
Posts: 248
Likes: 0 post
Liked in: 0 post
Joined: Mon Mar 27, 2006 6:28 am
Cash on hand: 0.00

PostAuthor: nGAGE » Tue May 22, 2007 5:12 am

Ok... I didn't get a reply from my PM to "Teelk"... could please somebody else confirm that this would be the proper fix?

FILE: /includes/functions_categories_hierarchy.php

Original full line:
Code: Select all
 $s_group_names .= ( empty($s_group_names) ? '' : ', ' ) . sprintf("'%s'", str_replace("'", "'", $agcm_color->get_user_color($data['user_group_id'][$j], $data['group_name'][$j])));  

Original inline:
Code: Select all
 $agcm_color->get_user_color($data['user_group_id'][$j], $data['group_name'][$j])  


Proposed fix: I think there is something wrong with this part:
Code: Select all
 $agcm_color->get_user_color($data['group_id'][$j], 0, $data['group_name'][$j])  


My proposed fix: I think it should be this (and it has the same effect and works for me):
Code: Select all
 $agcm_color->get_user_color($data['group_id'][$j], $data['user_group_id'][$j], $data['group_name'][$j])  
Last edited by nGAGE on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
[url=http][img=left]http://www.net-clan-gaming.eu/ftp/ngage/images/nEt_v3_sig.png[/img][/url]
User avatar
nGAGE
Sr Integra Member
Sr Integra Member
 
Posts: 248
Likes: 0 post
Liked in: 0 post
Joined: Mon Mar 27, 2006 6:28 am
Cash on hand: 0.00

Re: Advanced Group Color Management - IM 141

PostAuthor: MWE_001 » Sat May 26, 2007 10:35 am

My Issue with it is real simple. For some reason or the other, the only people whos names change colors anywhere on the board seems to be group owners and admin.

Ive messed with it, piched here, poked there, and yet still the smae results. If It wasnt such a major mod, I'd uninstall it completely. Teelk did a fine job with it, but needs overhauled something terrible.
Last edited by MWE_001 on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
"Don't gain the world and lose your soul, wisdom is better than silver and gold" -Bob Marley

If you build it, I can break it! ~ Whispered in the tone of the movie Field of Dreams.
User avatar
MWE_001
Sr Integra Member
Sr Integra Member
 
Posts: 1265
Likes: 0 post
Liked in: 0 post
Images: 12
Joined: Fri Apr 21, 2006 6:59 pm
Cash on hand: 0.00
Location: Illinois

PostAuthor: nGAGE » Sat May 26, 2007 12:02 pm

I'm not totally sure, might be misunderstanding, but if I do understand it correctly, then there might actually not even be any bug anymore! Before I had the updating/resetting issue of the user's "user_group_id" to "0" all the time, I only excidentally found out about the UCP's UserColor Options.
Perhaps that's what makes you believe that the colors don't change, as you expect them to change by themselfs. However... that's not part of the mod (not entirely)... once a user has the choice of more then one color, the user will have to specify that color in his UCP himself (or the admins do it for them).
The reason is, if a user is member in 4 usergroups, that each allow the use of a special color, there is no way of telling which should get priority! Therefore the color will reset to default (in general that's the "Registered Users" color.

Follow this link for a quick visualization of what the users need to do! I actually made a very quick KnowledgeBase article for my members because they didn't realize it.

http://www.net-clan-gaming.com/kb.php?mode=article&k=1

Hope this is the solution/info you need... if not... :P
Last edited by nGAGE on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
[url=http][img=left]http://www.net-clan-gaming.eu/ftp/ngage/images/nEt_v3_sig.png[/img][/url]
User avatar
nGAGE
Sr Integra Member
Sr Integra Member
 
Posts: 248
Likes: 0 post
Liked in: 0 post
Joined: Mon Mar 27, 2006 6:28 am
Cash on hand: 0.00

Re: Advanced Group Color Management - IM 141

PostAuthor: MWE_001 » Sun May 27, 2007 8:47 pm

Nice.... I hadnt ever noticed the user part of it as well. ;-) BUT, When a user has logged in, and if the inactive user is set to display and session is enabled on the board, even members that are NOT logged in turn that color as well....

Once I figure that one out I should be ok.
Last edited by MWE_001 on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
"Don't gain the world and lose your soul, wisdom is better than silver and gold" -Bob Marley

If you build it, I can break it! ~ Whispered in the tone of the movie Field of Dreams.
User avatar
MWE_001
Sr Integra Member
Sr Integra Member
 
Posts: 1265
Likes: 0 post
Liked in: 0 post
Images: 12
Joined: Fri Apr 21, 2006 6:59 pm
Cash on hand: 0.00
Location: Illinois

Re: Advanced Group Color Management - IM 141

PostAuthor: shentrax » Fri Jun 01, 2007 12:33 pm

I only got colors on the group legend, the user online in x housr are only grey and white. The usernames on the forum indexes are gray. If you look at a post, it shows the default colors.

Dark Templates

reinstalled the mod 3+ times... cant figure it out.

http://nsbadclan.shentrax.net/forums
Last edited by shentrax on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.

shentrax
Newbie
Newbie
 
Posts: 22
Likes: 0 post
Liked in: 0 post
Joined: Tue Nov 21, 2006 5:16 am
Cash on hand: 0.00

Re: Advanced Group Color Management - IM 141

PostAuthor: shentrax » Sat Jun 02, 2007 10:06 am

added the adjustmnent from nGAGE, now SOME of the groups are colorizing.

Seems that the 'default' integra board group colors are taking presidence over the 'agc' colors....

e.g. the administrators and register users default colors are orange and white... Some members updated and have populated throughout the board with the correct colors.

any ideas?
Last edited by shentrax on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.

shentrax
Newbie
Newbie
 
Posts: 22
Likes: 0 post
Liked in: 0 post
Joined: Tue Nov 21, 2006 5:16 am
Cash on hand: 0.00

Re: Advanced Group Color Management - IM 141

PostAuthor: shentrax » Sat Jun 02, 2007 2:35 pm

zomg. I'm retarded.

Profile -> Profile Settings -> Username Color Options...

<img>
Last edited by shentrax on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.

shentrax
Newbie
Newbie
 
Posts: 22
Likes: 0 post
Liked in: 0 post
Joined: Tue Nov 21, 2006 5:16 am
Cash on hand: 0.00

PostAuthor: nGAGE » Sat Jun 02, 2007 4:57 pm

Nice that you got it sorted shentrax. It's a lot of reading here and can get quite confusing, I'm sure. This whole mod (don't know why) got me thinking even now that it seems to work for me.

Why would the mod offer the "move up / move down" arrows in the ACP, if the order doesn't seem to have effect on what is default to a user anyhow?!
Now I'm not sure if it was intended to work the way I'll suggest in a moment, but I'm gonna add it to a list of my "TO-DOs".

It would be a lot better if the mod, when a user is added to a group, automatically applies the "highest ranked color" specified in the ACP's order of ranking of the colors, so it not only defines the order in the "Legend", but also by default picks a user color based on the highest positioned group. This will definitely stop people from thinking it's not working and prevent a lot of questions from the users, I'd say.

Perhaps the code is already in place to work like that, but there's a little typo somewhere, but if not... I'll see if I can add that tiny bit of extra code to automatically update the user's default color, based on the group's color ranking.

Hope I explained it correctly and hope I'll be able to come up with a proper update on this for those that are interested <img>
Last edited by nGAGE on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
[url=http][img=left]http://www.net-clan-gaming.eu/ftp/ngage/images/nEt_v3_sig.png[/img][/url]
User avatar
nGAGE
Sr Integra Member
Sr Integra Member
 
Posts: 248
Likes: 0 post
Liked in: 0 post
Joined: Mon Mar 27, 2006 6:28 am
Cash on hand: 0.00

PostAuthor: krencho » Tue Jun 19, 2007 12:42 pm

hello

can i get any help integrating agcm to shoutbox mod,
and someone can get out the sql queries from the install.php
Last edited by krencho on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.

krencho
Newbie
Newbie
 
Posts: 12
Likes: 0 post
Liked in: 0 post
Joined: Sat May 27, 2006 2:31 pm
Cash on hand: 0.00

PreviousNext

Return to Mods/Hacks

Who is online

Registered users: Bing [Bot]

cron