that is typical as user names can change. Are you looking to export data from within Xenforo or a query to export the results? If the answer is a query then I can provide a query that has the necessary join to add the user names.I'd really like to be able to export data.. For example export a table of user notes. I can do that from the SQL database but unhelpfully only shows user ids not usernames.
Yes please that would be very useful.If the answer is a query then I can provide a query that has the necessary join to add the user names.
GET
; data should never be mutated via GET
POST
\Andrew\ModeratorPanel\Entity\UserNote::canDelete()
any only call that from the controller.Have a few suggestions from you now. I plan to implement after this semester ends.Feature Request / Security Issue
Right now user notes can be deleted without any confirmation.
This is quite error-prone and especially problematic as there is no soft-delete so deleted notes can't be easily stored.
There is also no protection for CSRF as the action is done viaGET
; data should never be mutated viaGET
I therfore suggest do implement a delete confirmation and only delete viaPOST
Last but not least the controller seems to be doing too much for perissions checks; I'd move the whole logic to\Andrew\ModeratorPanel\Entity\UserNote::canDelete()
any only call that from the controller.
Here you goYes please that would be very useful.
select
b.username as given_to
,a.username as given_by
,a.message
,from_unixtime(a.create_date) as note_created
from xf_andrew_mp_user_note a
left join xf_user b on a.note_user_id = b.user_id
Where are you seeing that stat?Would anyone be able to tell me how the "active user" number is defined? Where does it fetch or calculate that stat? Thnx
It’s how many users visited. This stat is taken directly from the admin panel.
School ended so working on updates now.Improvement Sugestion
Templateandrew_moderatorpanel_macros
Code:<li class="noteUser"> <xf:if is="$showTargetUser AND $user_note.user_id != $user_note.note_user_id"> <xf:username user="$user_note.User" rich="true" defaultname="{$user_note.User.username}" aria-hidden="true" /> <xf:fa icon="{{ $xf.isRtl ? 'fa-caret-left' : 'fa-caret-right' }} u-muted" /> <xf:username user="$user_note.User" rich="true" defaultname="{{ phrase('unknown') }}" aria-hidden="true" /> <xf:else /> <xf:username user="$user_note.User" rich="true" defaultname="{$user_note.username}" /> </xf:if> </li> <li> {{ phrase('andrew_moderatorpanel_entered_note_on') }} </li> <li class="noteUser"> <xf:username user="$user_note.NoteUser" rich="true" defaultname="{$user_note.NoteUser.username}" aria-hidden="true" /> </li> <li> <xf:date time="$user_note.create_date" /> </li>
In the output this looks like a sentence:
View attachment 312341
As the sentence is build from various parts in the HTML, the structure is pretty much hardcoded - thats makes it difficult to properly translate this into other languages which might need a somewhat different sentence structure.
Could this be changed so the whole sentence is a phrase?
This would make translations a lot easier![]()
This has been updated in the next version. The IP address will be hidden if the user does not have standard XF view ip permission.Recent logins shows the IP Address even the moderator does not have permission to view IP adresses.
My thought is adding an option to the custom field to make it searchable would be a suitable solution. I could see situations where mods should be able to search by custom field that isn't on profile and situations where they shouldn't. I don't use custom fields so I am open to other suggestions if the one I suggested doesn't work.Bug / Feature Wish
If a moderator has permission Search custom fields they can search any custom field - including those that are not visible on message info, not visible on member profile and not editable by moderators.
IMHO this is not ideal as there might be fields that moderators should not be able to see / search.
So such fields should either be excluded entirely or searching them should be guarded by a permission.
When did you get this error and how often?@AndrewSimm Hello, I'm getting an error, can you help me?
Server Errog Log
ErrorException: Template error: [E_USER_WARNING] Method isMember0f is not callable on the given object (Andrew\ModeratorPanel\XF\Entity\User) src/XF/Template/Templater.php:1278
Tarafından: NİRVANA 10 Aralık 2024 22:23'de
Stack Wiew
#0 [internal function]: XF\Template\Templater->handleTemplateError(512, '[E_USER_WARNING...', '/home/u38560513...', 1278)
#1 src/XF/Template/Templater.php(1278): trigger_error('Method isMember...', 512)
#2 internal_data/code_cache/widgets/_48_Podcast_Herkese_Aciik_Widget.php(7): XF\Template\Templater->method(Object(Andrew\ModeratorPanel\XF\Entity\User), 'isMember0f', Array)
#3 src/XF/Template/Templater.php(8164): XF\SubContainer\Widget->{closure}(Object(SV\LazyImageLoader\XF\Template\Templater), Array, Array)
#4 src/XF/SubContainer/Widget.php(176): XF\Template\Templater->renderWidgetClosure(Object(Closure), Array)
#5 src/XF/Template/Templater.php(2137): XF\SubContainer\Widget->getCompiledWidget(Array, Array)
#6 internal_data/code_cache/templates/l3/s7/public/forum_list.php(228): XF\Template\Templater->widgetPosition('forum_list_abov...', Array)
#7 src/XF/Template/Templater.php(1792): XF\Template\Templater->{closure}(Object(SV\LazyImageLoader\XF\Template\Templater), Array, NULL)
#8 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('forum_list', Array)
#9 src/XF/Mvc/Renderer/Html.php(50): XF\Template\Template->render()
#10 src/XF/Mvc/Dispatcher.php(471): XF\Mvc\Renderer\Html->renderView('XF:Forum\\Listin...', 'public:forum_li...', Array)
#11 src/XF/Mvc/Dispatcher.php(453): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#12 src/XF/Mvc/Dispatcher.php(412): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#13 src/XF/Mvc/Dispatcher.php(66): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#14 src/XF/App.php(2826): XF\Mvc\Dispatcher->run()
#15 src/XF.php(806): XF\App->run()
#16 index.php(23): XF::runApp('XF\\Pub\\App')
#17 {main}
array(4) {
["url"] => string(1) "/"
["referrer"] => string(24) "https://mydomain.com/"
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}
}
It keeps coming. So I deleted the server error log. 10 minutes later 30 pages of the same error report appearedWhen and how often did you get this error?
Just at a guess, someone working on your forums messed up some code in a widget. Specifically a widget named like "Podcast_Herkese_Aciik" based on the stack trace. It looks like there's a method "isMember0f" called in there, and that looks to be a typo, a zero "0" instead of an "O".@AndrewSimm Hello, I'm getting an error, can you help me?
Server Errog Log
ErrorException: Template error: [E_USER_WARNING] Method isMember0f is not callable on the given object (Andrew\ModeratorPanel\XF\Entity\User) src/XF/Template/Templater.php:1278
Tarafından: NİRVANA 10 Aralık 2024 22:23'de
Stack Wiew
#0 [internal function]: XF\Template\Templater->handleTemplateError(512, '[E_USER_WARNING...', '/home/u38560513...', 1278)
#1 src/XF/Template/Templater.php(1278): trigger_error('Method isMember...', 512)
#2 internal_data/code_cache/widgets/_48_Podcast_Herkese_Aciik_Widget.php(7): XF\Template\Templater->method(Object(Andrew\ModeratorPanel\XF\Entity\User), 'isMember0f', Array)
#3 src/XF/Template/Templater.php(8164): XF\SubContainer\Widget->{closure}(Object(SV\LazyImageLoader\XF\Template\Templater), Array, Array)
#4 src/XF/SubContainer/Widget.php(176): XF\Template\Templater->renderWidgetClosure(Object(Closure), Array)
#5 src/XF/Template/Templater.php(2137): XF\SubContainer\Widget->getCompiledWidget(Array, Array)
#6 internal_data/code_cache/templates/l3/s7/public/forum_list.php(228): XF\Template\Templater->widgetPosition('forum_list_abov...', Array)
#7 src/XF/Template/Templater.php(1792): XF\Template\Templater->{closure}(Object(SV\LazyImageLoader\XF\Template\Templater), Array, NULL)
#8 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('forum_list', Array)
#9 src/XF/Mvc/Renderer/Html.php(50): XF\Template\Template->render()
#10 src/XF/Mvc/Dispatcher.php(471): XF\Mvc\Renderer\Html->renderView('XF:Forum\\Listin...', 'public:forum_li...', Array)
#11 src/XF/Mvc/Dispatcher.php(453): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#12 src/XF/Mvc/Dispatcher.php(412): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#13 src/XF/Mvc/Dispatcher.php(66): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#14 src/XF/App.php(2826): XF\Mvc\Dispatcher->run()
#15 src/XF.php(806): XF\App->run()
#16 index.php(23): XF::runApp('XF\\Pub\\App')
#17 {main}
array(4) {
["url"] => string(1) "/"
["referrer"] => string(24) "https://mydomain.com/"
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}
}
It keeps coming. So I deleted the server error log. 10 minutes later 30 pages of the same error report appearedGelmeye devam ediyor. Bu yüzden sunucu hata günlüğünü sildim. 10 dakika sonra aynı hata raporunun 30 sayfası belirdi
Thank you very muchIt keeps coming. So I deleted the server error log. 10 minutes later 30 pages of the same error report appeared
I have fixed this in the next release.Feature Request / Security Issue
Right now user notes can be deleted without any confirmation.
This is quite error-prone and especially problematic as there is no soft-delete so deleted notes can't be easily restored.
There is also no protection for CSRF as the action is done viaGET
; data should never be mutated viaGET
I therefore suggest do implement a delete confirmation and only delete viaPOST
Last but not least the controller seems to be doing too much for permission checks; I'd move the whole logic to\Andrew\ModeratorPanel\Entity\UserNote::canDelete()
any only call that from the controller.
We use essential cookies to make this site work, and optional cookies to enhance your experience.