vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Add Something to the moderator Log (https://vborg.vbsupport.ru/showthread.php?t=204642)

JoeBOBBillyTed 02-08-2009 12:22 PM

Add Something to the moderator Log
 
I have some customized pages. I need to track which mods are doing what with these pages. I want to use the

log_moderator_action() function. However, I am having issues getting ti to work correctly. Does anyone have a tutorial on this? I searched and came up empty.

Lynne 02-08-2009 02:54 PM

I don't know of a tutorial. I've seen it done a couple of different ways - just download a modification that does it and see how they do it. There are two hook locations available though - fetch_modlogactions and fetch_modlogtypes

JoeBOBBillyTed 02-08-2009 10:18 PM

lynne do you know of a good one to look at? I searched but without knowing one that does this, it is difficult.

Lynne 02-08-2009 11:11 PM

A quick look at the products on my test site shows this product name - Change Threads Prefix Inline. Search for that and take a look at what they did.

JoeBOBBillyTed 02-09-2009 12:08 AM

Thanks Lynee

--------------- Added [DATE]1234149678[/DATE] at [TIME]1234149678[/TIME] ---------------

okay, another question regarding this. I got the code working to add it ot the moderator log. However, I want to put some information into Info column. I checked out the code and I am not seeing a way to do this without editing the php code on the forums/admincp/modlog.php page and most likely the includes/functions_log_error.php page. Is there a way of doing this without editing the php code. If not, anyone have a good mod to reference to figure out how to do this?

JoeBOBBillyTed 02-10-2009 01:28 PM

Any suggestions on this? It would be greatly appreciated.

Lynne 02-10-2009 02:28 PM

The info column? What is your call to enter something into the log? Are you putting something in for the $action?

From the API:
Quote:

log_moderator_action (line 275) Logs the moderation actions that are being performed on the forum
void log_moderator_action (array $loginfo, integer $logtype, [string $action = ''])
  • array $loginfo: Array of information indicating on what data the action was performed
  • integer $logtype: This value corresponds to the action that was being performed
  • string $action: Other moderator parameters


JoeBOBBillyTed 02-10-2009 08:53 PM

Lynne,

I am using :

PHP Code:

 log_moderator_action($modlog'changed_trade_status''Changed Trade Status'); 

The Action is showing up, however I am using 3.5 and there is an information column as well. Typically this displays what this action is being applied to. In most cases this is a thread / post and it displays the thread or post and then the forum it is in. I want to add an additional item that can be displayed there. It is for a trade manager that is integrated with one of the feedback systems here. I need to know when a moderator changes the status of a trade. I can currently insert the change, but it is not directly connected to a trade, like a typical log would have an attached thread/post.

Lynne 02-10-2009 10:09 PM

I'm not sure exactly what you mean. Perhaps this will help.

For a mod I wrote, I have this line:
PHP Code:

log_moderator_action($threadinfo'thread_verified_x_reason_y_hold_z', array($vbulletin->GPC['verify_status'], $vbulletin->GPC['verify_reason'], $vbulletin->GPC['verify_hold'])); 

The phrase 'thread_verified_x_reason_y_hold_z' is:
Code:

Thread verified. (verified: {1}; reason: {2}; hold: {3})
So from my statement, it actually translates into this in the log:

Code:

Thread verified. (verified: $vbulletin->GPC['verify_status']; reason: $vbulletin->GPC['verify_reason']; hold: $vbulletin->GPC['verify_hold'])
OR (example)
Code:

Thread verified. (verified: 2; reason: 3; hold: 0)
A verifiy status of 2 means it's a questionable thread, the reason being #3 and the thread is not on hold. (It doesn't really matter exactly except that I and the mods understand that line.) I passed it variables which it entered into the log.

Is that what you are wanting to do?


All times are GMT. The time now is 11:50 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01001 seconds
  • Memory Usage 1,737KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (2)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete