Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 02-08-2009, 12:22 PM
JoeBOBBillyTed JoeBOBBillyTed is offline
 
Join Date: Feb 2005
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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.
Reply With Quote
  #2  
Old 02-08-2009, 02:54 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #3  
Old 02-08-2009, 10:18 PM
JoeBOBBillyTed JoeBOBBillyTed is offline
 
Join Date: Feb 2005
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

lynne do you know of a good one to look at? I searched but without knowing one that does this, it is difficult.
Reply With Quote
  #4  
Old 02-08-2009, 11:11 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #5  
Old 02-09-2009, 12:08 AM
JoeBOBBillyTed JoeBOBBillyTed is offline
 
Join Date: Feb 2005
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #6  
Old 02-10-2009, 01:28 PM
JoeBOBBillyTed JoeBOBBillyTed is offline
 
Join Date: Feb 2005
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Any suggestions on this? It would be greatly appreciated.
Reply With Quote
  #7  
Old 02-10-2009, 02:28 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #8  
Old 02-10-2009, 08:53 PM
JoeBOBBillyTed JoeBOBBillyTed is offline
 
Join Date: Feb 2005
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #9  
Old 02-10-2009, 10:09 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:41 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.04078 seconds
  • Memory Usage 2,246KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_code
  • (2)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete