Module: User Tagging
Posted by Maurice Makaay
Re: Module: User Tagging December 04, 2009 03:56AM |
Registered: 14 years ago Posts: 60 |
Re: Module: User Tagging December 04, 2009 03:58AM |
Admin Registered: 21 years ago Posts: 9,240 |
Re: Module: User Tagging December 04, 2009 04:14AM |
Registered: 14 years ago Posts: 60 |
Re: Module: User Tagging December 04, 2009 11:28AM |
Admin Registered: 19 years ago Posts: 8,532 |
So it seems that some code is setting the admin field incorrectly and I can assure you that it is not the core Phorum code.
Try disabling modules to see what module is breaking the admin field for you.
Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Try disabling modules to see what module is breaking the admin field for you.
Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Module: User Tagging December 05, 2009 04:55AM |
Registered: 14 years ago Posts: 60 |
Hi Maurice,
I have tracked the problem down. As suggested I have disabled all other modules to ensure that I am only looking at the phorum core code and the user tagging module.
In the user_tagging.php the calling function to user_tagging_process_rule is passing through $message['author'] this value appears to contain only the username, which would explain the characters I was getting as they are the first letter of the username.
I have tweeked the code the call $user = phorum_api_user_get($message['user_id'], TRUE); and pass $user as the second parameter into the process_rule function and all is working as expected, just a little slower than it should..
I have tracked the problem down. As suggested I have disabled all other modules to ensure that I am only looking at the phorum core code and the user tagging module.
In the user_tagging.php the calling function to user_tagging_process_rule is passing through $message['author'] this value appears to contain only the username, which would explain the characters I was getting as they are the first letter of the username.
I have tweeked the code the call $user = phorum_api_user_get($message['user_id'], TRUE); and pass $user as the second parameter into the process_rule function and all is working as expected, just a little slower than it should..
Re: Module: User Tagging December 05, 2009 05:50AM |
Admin Registered: 19 years ago Posts: 8,532 |
Exactly on what line do you see $message['author'] in user_tagging.php? It does not occur in my version of the script.
Additionally, I still don't see how the admin field would get the first letter of the author name in it because of this module. This module only inspects the contents of the admin field and never sets it.
Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Edited 1 time(s). Last edit at 12/05/2009 05:57AM by Maurice Makaay.
Additionally, I still don't see how the admin field would get the first letter of the author name in it because of this module. This module only inspects the contents of the admin field and never sets it.
Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Edited 1 time(s). Last edit at 12/05/2009 05:57AM by Maurice Makaay.
Re: Module: User Tagging December 05, 2009 03:34PM |
Registered: 14 years ago Posts: 60 |
Hi Maurice,
Line 79 was the offending line of code. I just checked that against the latest version variable should be $message['user']..
I inherited the forum of another person who had made some mods, strange that the problem only appeared when the forum was copied between servers.
Thanks for your help and the time you spent on this. It's much appreciated.
Line 79 was the offending line of code. I just checked that against the latest version variable should be $message['user']..
I inherited the forum of another person who had made some mods, strange that the problem only appeared when the forum was copied between servers.
Thanks for your help and the time you spent on this. It's much appreciated.
Re: Module: User Tagging December 05, 2009 05:24PM |
Admin Registered: 19 years ago Posts: 8,532 |
I'm glad that you found it. The problem already sounded like some code was either hacked up or not up-to-date. I hope all the rest will be a smooth ride from here.
Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Module: User Tagging June 18, 2010 03:45PM |
Registered: 14 years ago Posts: 115 |
Maurice, this is an awesome module, thanks for creating it!
I made an addition to it, and am posting it in case you or anyone finds useful. I added a match for when a user_id is found in a ban list (or not in a ban list). I sometimes use the the ban list on user_id option to temporarily ban misbehaving users from posting, and recently thought it would be useful to make the user tagging recognize these. I attached the hack as diff files in the ban_list.zip.
-phil.
mmakaay: delete the attached diff, it is now part of the release package
Edited 1 time(s). Last edit at 06/19/2010 05:33AM by Maurice Makaay.
I made an addition to it, and am posting it in case you or anyone finds useful. I added a match for when a user_id is found in a ban list (or not in a ban list). I sometimes use the the ban list on user_id option to temporarily ban misbehaving users from posting, and recently thought it would be useful to make the user tagging recognize these. I attached the hack as diff files in the ban_list.zip.
-phil.
mmakaay: delete the attached diff, it is now part of the release package
Edited 1 time(s). Last edit at 06/19/2010 05:33AM by Maurice Makaay.
Re: Module: User Tagging June 19, 2010 05:37AM |
Admin Registered: 19 years ago Posts: 8,532 |
Thanks for the idea and patch.
I included it in version 1.0.7 of the module.
Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
I included it in version 1.0.7 of the module.
Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Sorry, only registered users may post in this forum.