[Andrew] Moderator Panel

[Andrew] Moderator Panel 1.9.4

No permission to download
Thank you for helping to identify my issue. It wasn't your fault.

My ipstack key, although it showed as valid/active, was actually not. I had to reset on their site, generate a NEW key, and now it works.

It didn't understand the bad api response, throwing the error.

Love your work!
 
@AndrewSimm can you check this error?
Code:
ErrorException: Template error: [E_USER_WARNING] Method canViewModeratorPanel is not callable on the given object (SV\SearchImprovements\XF\Entity\User) src/XF/Template/Templater.php:1189

[HEADING=2]Stack trace[/HEADING]
#0 [internal function]: XF\Template\Templater->handleTemplateError(512, '[E_USER_WARNING...', '/home/vicontr/p...', 1189)
#1 src/XF/Template/Templater.php(1189): trigger_error('Method canViewM...', 512)
#2 internal_data/code_cache/templates/l1/s39/public/andrew_moderatorpanel_macros.php(238): XF\Template\Templater->method(Object(SV\SearchImprovements\XF\Entity\User), 'canViewModerato...', Array)
#3 src/XF/Template/Templater.php(827): 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(1654): 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(2285): 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(2487): 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(11) "/community/"
  ["referrer"] => bool(false)
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
 
@AndrewSimm can you check this error?
Code:
ErrorException: Template error: [E_USER_WARNING] Method canViewModeratorPanel is not callable on the given object (SV\SearchImprovements\XF\Entity\User) src/XF/Template/Templater.php:1189

[HEADING=2]Stack trace[/HEADING]
#0 [internal function]: XF\Template\Templater->handleTemplateError(512, '[E_USER_WARNING...', '/home/vicontr/p...', 1189)
#1 src/XF/Template/Templater.php(1189): trigger_error('Method canViewM...', 512)
#2 internal_data/code_cache/templates/l1/s39/public/andrew_moderatorpanel_macros.php(238): XF\Template\Templater->method(Object(SV\SearchImprovements\XF\Entity\User), 'canViewModerato...', Array)
#3 src/XF/Template/Templater.php(827): 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(1654): 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(2285): 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(2487): 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(11) "/community/"
  ["referrer"] => bool(false)
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
I am not sure why this error occur but it only happens when the an upgrade to my add-on is being ran. You won't see this appear during normal operation.
 
I wanted to delete the edit date on a user note I added today, since I only changed a comma.

So I've opened the database and I see there are a bunch of last_edit_date entries which actually doesn't match with note edits, since none of them have been edited at all.

I can't remember if you released an update fixing this, a long time ago, but I was wondering if we should clear these entries out by replacing the Unix timestamp with a 0, just like the more recent ones.

Here are the entries I'm referring to:

1700486949379.webp
 
I wanted to delete the edit date on a user note I added today, since I only changed a comma.

So I've opened the database and I see there are a bunch of last_edit_date entries which actually doesn't match with note edits, since none of them have been edited at all.

I can't remember if you released an update fixing this, a long time ago, but I was wondering if we should clear these entries out by replacing the Unix timestamp with a 0, just like the more recent ones.

Here are the entries I'm referring to:

Resaving an user note is going to put an edit timestamp on the user note. If an user note has been edited then it will have this timestamp.

If you want to clear out the history of the edit then set the timestamp to 0 and edit_user_id to null.
 
Would it be possible to add a list of users that have created an account but have not validated their email address yet? Something like this (mockup in Paint, lol):

1706986694080.webp
 
Firstly wonderfully useful plugin! Thank you.

Just thought I'd note here (and since it may solve Saphira's issue to an extent) that one tiny modification we have made is to add the "User State" to the "Recently registered users" (/moderatorpanel/recent-registered/) table in the Moderator Panel. We've found this useful so at a glance we can see which users were just rejected outright (typically by StopForumSpam) since they have not been banned it's not quite clear on the list who are accepted (ie Valid) new users. To this end we've butchered the last column in the table which currently holds the Banned state for the user (ie Yes/No). We've found having this addition saves hopping between the Rejected User Log table and the Recent one.

The tweaks:

In the andrew_moderatorpanel_macros template we've modified the last table cell (~line 450) from:
PHP:
		<td class="dataList-cell">
			<xf:if is="$user.is_banned == 1">
				{{ phrase('yes') }}
				<xf:else/>
				{{ phrase('no') }}
			</xf:if>			
		</td>
to
PHP:
		<td class="dataList-cell" style="text-transform: capitalize;">
			<xf:if is="$user.is_banned == 1">
				{{ phrase('banned') }}
				<xf:else/>
				{{ phrase_dynamic($user.user_state) }}
			</xf:if>			
		</td>
It's worth pointing out that the phrases for the states don't seem to correspond 1:1 to the enum values, so email_confirm would seem to correspond with the phrase awaiting_email_confirmation, so the phrase_dynamic() doesn't actually pull in an existing phrase and just defaults back to the actual enum value. I guess there will probably be a function to convert the enum into its associated phrase, but I don't know if it's easily available in a template so for now and our purposes the above is good enough. We added the CSS transformation just to neaten these raw values up a little. You could of course add your own phrases I should point out!

The underlying values for user_state are enum('valid','email_confirm','email_confirm_edit','moderated','email_bounce','rejected','disabled').

In the andrew_moderatorpanel_recentregistered_view template we modified the last table header from:
PHP:
							<th class="dataList-cell">{{ phrase('banned') }}</th>
to
PHP:
							<th class="dataList-cell">{{ phrase('user_state') }}</th>

Hope someone might find it useful, or maybe a more polished version would be worth adding to the plugin?
 
I will look at making this better for the next release.


Thanks, it is very helpful.

Can you also check about adding this feature?
This is an amazing product.

Can you also add another feature?
Besides the Ignored by , I think there should also be another tab: Ignoring (that is Who is user X ignoring)?
There should also be a similar side nav-menu entry for this feature, perhaps something like: "Most ignoring user" or similar :)
 
Last edited:
Andrew, I've been thinking about a feature of sort to help follow-up on registrations that we are unsure of, who hide for a few months with 0 posts, and then suddenly explode with spam.

If there was a way to "bookmark" or "watch" or "follow" these registrations to "keep an eye on this one" and as soon as they post something we get an email notification? The bookmark feature would be part of the admin screen when viewing these registrations.

Is that even possible within Xenforo?

Thanks!
 
If there was a way to "bookmark" or "watch"
We just pop our suspect registrations that make it through into a couple of groups... The groups mods can use are defined in the 'Andrew Mod Panel - options' area, see - 'Assignable secondary user groups'. Then mods can spot a new registration that looks suspect, then from the 'Moderator Tools' menu select 'Update user group'.

One group is just to flag the account and the other actually massively restricts what they can do on the board and displays a warning note to them along the lines of "Account restricted - If you think your account shouldn't be restricted please get in touch". We figure those that don't get in touch are obviously not really using the account and so are probably just bots. If we've caught a legitimate user they'll get in touch and we can make a decision.

Once you have them in a group they are easy enough to locate or do other things with.
 
Andrew, I've been thinking about a feature of sort to help follow-up on registrations that we are unsure of, who hide for a few months with 0 posts, and then suddenly explode with spam.

If there was a way to "bookmark" or "watch" or "follow" these registrations to "keep an eye on this one" and as soon as they post something we get an email notification? The bookmark feature would be part of the admin screen when viewing these registrations.

Is that even possible within Xenforo?

Thanks!
I have a Bookmark Users add-on but nothing tied to this add-on. There is probably a lot we could do if we were able to flag users. I have to think about what all we would want to include in that.

 
Firstly wonderfully useful plugin! Thank you.

Just thought I'd note here (and since it may solve Saphira's issue to an extent) that one tiny modification we have made is to add the "User State" to the "Recently registered users" (/moderatorpanel/recent-registered/) table in the Moderator Panel. We've found this useful so at a glance we can see which users were just rejected outright (typically by StopForumSpam) since they have not been banned it's not quite clear on the list who are accepted (ie Valid) new users. To this end we've butchered the last column in the table which currently holds the Banned state for the user (ie Yes/No). We've found having this addition saves hopping between the Rejected User Log table and the Recent one.

The tweaks:

In the andrew_moderatorpanel_macros template we've modified the last table cell (~line 450) from:
PHP:
        <td class="dataList-cell">
            <xf:if is="$user.is_banned == 1">
                {{ phrase('yes') }}
                <xf:else/>
                {{ phrase('no') }}
            </xf:if>           
        </td>
to
PHP:
        <td class="dataList-cell" style="text-transform: capitalize;">
            <xf:if is="$user.is_banned == 1">
                {{ phrase('banned') }}
                <xf:else/>
                {{ phrase_dynamic($user.user_state) }}
            </xf:if>           
        </td>
It's worth pointing out that the phrases for the states don't seem to correspond 1:1 to the enum values, so email_confirm would seem to correspond with the phrase awaiting_email_confirmation, so the phrase_dynamic() doesn't actually pull in an existing phrase and just defaults back to the actual enum value. I guess there will probably be a function to convert the enum into its associated phrase, but I don't know if it's easily available in a template so for now and our purposes the above is good enough. We added the CSS transformation just to neaten these raw values up a little. You could of course add your own phrases I should point out!

The underlying values for user_state are enum('valid','email_confirm','email_confirm_edit','moderated','email_bounce','rejected','disabled').

In the andrew_moderatorpanel_recentregistered_view template we modified the last table header from:
PHP:
                            <th class="dataList-cell">{{ phrase('banned') }}</th>
to
PHP:
                            <th class="dataList-cell">{{ phrase('user_state') }}</th>

Hope someone might find it useful, or maybe a more polished version would be worth adding to the plugin?
I've added a variation of this into the next version.
1708743821823.webp
 
Top Bottom