![]() |
Modifying reportpost_newthread phrase to show moderator User IDs
Hi there,
Is it possible to change the "reportpost_newthread" phrase in a way that will show the assigned moderator's User IDs? Currently, the phrase is: Code:
[url=$reportinfo[reporterlink]]$reportinfo[rusername][/url] has reported a post. Can the Assigned Moderators: $reportinfo[modlist] part be modified to either link to the specific moderators profile, or simply display their User ID? So the reported post would read: Quote:
Any ideas? |
There's no way to simply edit the phrase, you'd need a plugin. If you look at file includes/class_reportitem.php around line 194 you can see how the list is built, and at the same time an array called $mods is built with all the moderator info. So you could write a plugin using hook location report_do_report (which is called just after the array is built) which rebuilds $reportinfo['modlist'] using the info in the $mods array to include the moderator id.
The code could be something like: Code:
if (!empty($mods)) |
Thank you for your response. It's much appreciated, as is the clarity.
I suspected that it wouldn't be as easy as I'd hoped and that it would require some sort of 'under the hood' tweaking. That's fine. Honestly, it's probably a little beyond my current technical skill and understanding, but it does give me a discrete project on which to build and improve those skills, along with some guidance of how the end product might work. That's valuable information for any learner, so thanks again. |
Well, you could just try to add a new plugin using hook location report_do_report and the code from above. I haven't actually tried it but with a little luck it should work.
If you're not familiar with creating a plugin, you can search for "Adding or Editing a Plugin" in the vbulletin manual: https://www.vbulletin.com/docs/html/ (it's really not very difficult). |
It works!
Excellent. Now I just need to understand what the hell I (you) just did. Haha! :D My PHP skills really are abysmal, but you've got to start somewhere. Many, many thanks. :up: |
All times are GMT. The time now is 07:05 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|