[Andrew] Moderator Panel

[Andrew] Moderator Panel 1.9.4

No permission to download
Thanks Andrew, I was concerned the "GUI" would look different.

Regards,

Andre
Not much in the GUI. There are a lot of permission changes due to editing notes and the new user group option.

I have been meaning to make a video showcasing the add-on because it's hard to do with the attachment limit.
 
On another note, I will have some time this next week to work on some other features. Right now the only thing I have on the list is to finally add filters. I struggle to implement filters the XF way so not sure I will get that done. If anyone else has any other ideas then feel free to let me know.
 
First of all, thank you very much for this great complement and the work done.

And now a little question, would it be possible to respect in the moderator-log the admin IPs that other plugins already hide from the rest of the staff?
 
First of all, thank you very much for this great complement and the work done.

And now a little question, would it be possible to respect in the moderator-log the admin IPs that other plugins already hide from the rest of the staff?
It certainly is possible to do this but I would need to have whichever add-ons have this capability. My add-on respects the default permission on whether a user has access to view IPs. Any mod that hides admins IPs should modify this permission to hide admins IPs and then create a new permission to view them.
 
It certainly is possible to do this but I would need to have whichever add-ons have this capability. My add-on respects the default permission on whether a user has access to view IPs. Any mod that hides admins IPs should modify this permission to hide admins IPs and then create a new permission to view them.
I have this plugin installed to hide my IP from other staff: https://xenforo.com/community/resources/ozzmodz-hide-users-ip-in-public.7899/

And it works in all areas of the forum (except the ACP), the ACP part doesn't worry me since only I have access. But from the moderator panel, any moderator can see into my IP logs.

I have also modified the src/XF/repository/Ip.php

With:

PHP:
public function logIp($userId, $ip, $contentType, $contentId, $action = '')
    {
        $entity = $this->em->create('XF:Ip');
        $entity->user_id = $userId;
        $removeip= array ('1','4','19444');  /* 1,2,3 sample user id */
        if (in_array($userId,$removeip)) {
            $entity->ip = '123.12.34.56'; /* 1.1.1.1 sample user IP */
        } else {
            $entity->ip = $ip;
        }
        $entity->content_type = $contentType;
        $entity->content_id = $contentId;
        $entity->action = $action;

        if ($entity->save(false))
        {
            return $entity;
        }
        else
        {
            return null;
        }
    }

But in the moderator panel log the IP is still shown in the changelogs or moderation logs to the rest of the staff.

Would it be possible for to respect the logic of that other plugin and hide it from other staff users?

Thank you very much and happy holidays
 
Last edited:
I have this plugin installed to hide my IP from other staff: https://xenforo.com/community/resources/ozzmodz-hide-users-ip-in-public.7899/

And it works in all areas of the forum (except the ACP), the ACP part doesn't worry me since only I have access. But from the moderator panel, any moderator can see into my IP logs.

I have also modified the src/XF/repository/Ip.php

With:

PHP:
public function logIp($userId, $ip, $contentType, $contentId, $action = '')
    {
        $entity = $this->em->create('XF:Ip');
        $entity->user_id = $userId;
        $removeip= array ('1','4','19444');  /* 1,2,3 sample user id */
        if (in_array($userId,$removeip)) {
            $entity->ip = '123.12.34.56'; /* 1.1.1.1 sample user IP */
        } else {
            $entity->ip = $ip;
        }
        $entity->content_type = $contentType;
        $entity->content_id = $contentId;
        $entity->action = $action;

        if ($entity->save(false))
        {
            return $entity;
        }
        else
        {
            return null;
        }
    }

But in the moderator panel log the IP is still shown in the changelogs or moderation logs to the rest of the staff.

Would it be possible for to respect the logic of that other plugin and hide it from other staff users?

Thank you very much and happy holidays
I think it will be just as quick for me to build in a similar feature opposed to trying to support other add-ons. Like I said earlier, I will modify the permission so that it works across all add-ons that utilize the base permission.
 
I think it will be just as quick for me to build in a similar feature opposed to trying to support other add-ons. Like I said earlier, I will modify the permission so that it works across all add-ons that utilize the base permission.
It would be great, as long as it doesn't show the rest of the staff the IP of the Super admin in the records, I think it would be enough and effective.
Thanks!!
 
It would be great, as long as it doesn't show the rest of the staff the IP of the Super admin in the records, I think it would be enough and effective.
Thanks!!
I've made the update but decided to only have it impact the moderator panel. You should continue to user your other add-on for other sites of the site.
 
Hi Andrew, server errors immediately after updating to 1.7.5...


Server error log [LIST] [*]ErrorException: Template error: [E_USER_WARNING] Method canViewModeratorPanel is not callable on the given object (xenMade\LAU\XF\Entity\User) [*]src/XF/Template/Templater.php:1187 [*]Generated by: [URL='https://vi-control.net/community/admin.php?users/kvjin.34414/edit']kvjin[/URL] [*]Jan 1, 2023 at 8:16 PM [/LIST] [HEADING=2]Stack trace[/HEADING] #0 [internal function]: XF\Template\Templater->handleTemplateError(512, '[E_USER_WARNING...', '/home/vicontr/p...', 1187) #1 src/XF/Template/Templater.php(1187): trigger_error('Method canViewM...', 512) #2 internal_data/code_cache/templates/l1/s39/public/andrew_moderatorpanel_macros.php(238): XF\Template\Templater->method(Object(xenMade\LAU\XF\Entity\User), 'canViewModerato...', Array) #3 src/XF/Template/Templater.php(825): XF\Template\Templater->{closure}(Object(SV\LazyImageLoader\XF\Template\Templater), Array, NULL) #4 internal_data/code_cache/templates/l1/s39/public/PAGE_CONTAINER.php(1451): XF\Template\Templater->callMacro('andrew_moderato...', 'andrew_moderato...', Array, Array) #5 src/XF/Template/Templater.php(1652): XF\Template\Templater->{closure}(Object(SV\LazyImageLoader\XF\Template\Templater), Array, NULL) #6 src/XF/Pub/App.php(565): XF\Template\Templater->renderTemplate('PAGE_CONTAINER', Array) #7 src/XF/App.php(2281): XF\Pub\App->renderPageHtml(' ...', Array, Object(XF\Mvc\Reply\View), Object(XF\Mvc\Renderer\Html)) #8 src/XF/Mvc/Dispatcher.php(404): XF\App->renderPage(' ...', Object(XF\Mvc\Reply\View), Object(XF\Mvc\Renderer\Html)) #9 src/XF/Mvc/Dispatcher.php(60): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html') #10 src/XF/App.php(2483): XF\Mvc\Dispatcher->run() #11 src/XF.php(524): XF\App->run() #12 index.php(20): XF::runApp('XF\\Pub\\App') #13 {main} [HEADING=2]Request state[/HEADING] array(4) { ["url"] => string(35) "/community/whats-new/posts/6955255/" ["referrer"] => string(57) "https://vi-control.net/community/whats-new/posts/6955242/" ["_GET"] => array(0) { } ["_POST"] => array(0) { } }
 
Could the option be added so that a super moderator can edit the user's email and password from the panel when editing a user without having to access the admin.php?
 
I woulld want to implement additional security measures before adding something like this.
There is no addon that allows you to do what I request, right? I've been looking for it for hours, but I didn't find anything.

More than anything, to save you complications, if there is already something that does that function

Thank you for your great work and dedication Andrew ;)
 
There is no addon that allows you to do what I request, right? I've been looking for it for hours, but I didn't find anything.

More than anything, to save you complications, if there is already something that does that function

Thank you for your great work and dedication Andrew ;)
I haven't seen an add-on that gives mods those types of controls. A few users have requested I add it to mine.
 
ShareX_59g1FZn0DX.webp

site/moderatorpanel/
Takes 6 seconds to load. why its slow? is there any way to fix or improve the load times. (it makes moderation panel unusable and pain to use honestly) I have 2m members in my xf_user table.
 
Top Bottom