Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
  #1  
Old 08-24-2009, 01:33 AM
Joey Link Joey Link is offline
 
Join Date: Aug 2008
Posts: 112
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Is there a way to make it appear an infraction came from a central user?

What I'm trying to do is make it so when a moderator issues a warning or infraction it appears as though it comes from one central user, such as "Site Police", instead of the actual moderator that issued it. The reason is because some of my moderators are more active than others and those moderators tend to get a bad reputation among the general membership. I don't want them to have to log into another account whenever they see something that needs to be moderated, and we still need the ability to see who did what for admin purposes.
Reply With Quote
  #2  
Old 08-24-2009, 02:17 AM
s0lidgr0und's Avatar
s0lidgr0und s0lidgr0und is offline
 
Join Date: Dec 2006
Location: Colonie, New York
Posts: 214
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

*checking what I typed in here before I try to help*

I was wrong in what I claimed. I'd probably create an account for the moderators to access and have them send in their infractions from there, unless there's a mod that addresses this.

Good luck.
Reply With Quote
  #3  
Old 08-25-2009, 02:36 AM
Joey Link Joey Link is offline
 
Join Date: Aug 2008
Posts: 112
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks, but I'm really trying to not do it that way.

Anyone?
Reply With Quote
  #4  
Old 08-25-2009, 06:56 AM
tipoboy's Avatar
tipoboy tipoboy is offline
 
Join Date: Dec 2005
Location: scotland
Posts: 693
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Joey Link View Post
Thanks, but I'm really trying to not do it that way.

Anyone?
off hand i dont think there is any other way, but there is a way to make things easier when having a seperate "board police" user.

There is a hack by CYB - log in as user which allows users you have stipulated to log into users account and could be quite useful for this purpose, as this does not log the original user out, more just allows them to log in with two accounts simultaniously(sp).
Reply With Quote
  #5  
Old 08-25-2009, 11:25 AM
James Birkett James Birkett is offline
 
Join Date: Jun 2009
Posts: 633
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The account doesn't log in simultaneously, when you log into user accounts you can't use your own account.
Also, using the Log In To User is effectively (unless modified) giving people permission to access any account on your forum.

Also, this wouldn't work (unless you give them the "Board Police" password) as it asks you to reauthenticate when doing an action.
Reply With Quote
  #6  
Old 08-25-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

This is the line that sets the userif (I think) - line 652 in infraction.php:
PHP Code:
    $infdata->set('whoadded'$vbulletin->userinfo['userid']); 
So, look at the file and see if there is a hook after that, but before the infraction is actually given, and change that variable.

You should also look at the PM processing underneath that line and see about modifying who the PM is from also. These are the two lines for that (around line 747):
PHP Code:
        $pmdm->set('fromuserid'$vbulletin->userinfo['userid']);
        
$pmdm->set('fromusername'$vbulletin->userinfo['username']); 
There is a hook right under those lines for you to use to change them.
Reply With Quote
  #7  
Old 08-25-2009, 06:20 PM
Joey Link Joey Link is offline
 
Join Date: Aug 2008
Posts: 112
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I appreciate your reply Lynne, as usual. This gives me some hope that it's actually possible to do.

So I tried changing the userid on line 652 to 2, which is the userid of the account I want the infractions to appear like they came from. When I tested it, it gave the infraction, but didn't create the infraction thread in the admin area, didn't show up on the users infraction list within his profile, and didn't send the PM.

I've read about hooks but I don't know how to spot one, let alone change it.

I then tried changing the lines around 747 so the userid was 2 and the username was Northwest Firearms. When I tried to issue an infraction it returned a fatal error.

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

Ah I see the $hook below the second set of code now, though I still don't know the proper way to modify it.
Reply With Quote
  #8  
Old 08-25-2009, 06:46 PM
James Birkett James Birkett is offline
 
Join Date: Jun 2009
Posts: 633
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Admin CP -> Plugins & Products -> Add New Plugin
That allows you to mess with hooks.
Product: vBulletin
Hook: Whatever you found
Title: Specify
PHP Code: Code you want to use.
Reply With Quote
  #9  
Old 08-25-2009, 06:58 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It's very hard to tell what you did wrong when you don't post your actual code changes/additions nor the exact error message.
Reply With Quote
Reply

Thread Tools
Display Modes

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 12:42 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.09387 seconds
  • Memory Usage 2,240KB
  • 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
  • (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