View Single Post
  #87  
Old 06-22-2006, 11:49 AM
jdh jdh is offline
 
Join Date: Mar 2005
Location: Toronto
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great plug-in, and we've just recently installed and began using it on our system. Still tweaking the rule-set, but so far it's been great.

I have run into the admincp/modcp issue as well, since as far as I can tell the postdata_presave hook is also called when moderating posts. I haven't been getting any errors, but the admincp/modcp page doesn't refresh at all after validating posts (I get a blank page), and the whole process basically just fails.

In my case, I had to add the following snippet, modified from an earlier post in this thread:

Code:
if (function_exists('sbhits') == true) {
		$GLOBALS['sbhits'] = sb_test($this);
	}
The $GLOBALS['sbhits'] = array() portion in the else construct didn't actually work, so I trimmed it down to what you see above, and that appears to have restored modcp/admincp functionality for me.

I've also made a small addition in my system that I thought I'd share... Generally, spammers on our forum get banned pretty quickly, but obvioiusly I don't want that to be an automated process until an Admin or Senior Moderator has had a chance to review the situation. So what I did was a template modification to add a link to the banning portion of the modcp. Basically, a "Click Here to Ban or Suspend This User" link.

The following specific modifications were made in SpamBuster Libraries under the global_start plug-in hook:

In variable definitions:
Code:
   // added 21 Jun 06 by JDH to fetch userid for banning link
    $spam_userid = $post->registry->userinfo['userid'];
In body of message section:
Code:
[URL=http://forums.ilounge.com/modcp/banning.php?do=banuser&u=${spam_userid}]Click here to Ban or Suspend this user[/URL]
The only other issue that I've run into is the way that posts are dropped into the moderation queue after an edit of an existing post when it's the first post in the thread.

Normally, if a user posts a new thread which is tagged as spam, the entire thread is set to require moderation. However, if the user posts a valid thread, and then goes back and edits their first post, then only the post is sent to the moderation queue.

This creates a situation where normal users see a dangling thread header with no posts. Further, the in-line moderation tools don't work for approving the post, because they're looking to approve the thread. I think the post can still be approved from the ModCP, but ultimately it creates an odd situation.

Granted, this shouldn't occur too often, but it would be nice to add a check to the code following an edit to determine if the post being edited is the first in it's thread, in which case the thread should probably be set to "moderated."

I'm going to poke a bit at the code myself to see if I can't make this work, although it's not a huge priority. If I do solve it, however, I'll post my results here.

Thanks again for a great mod otherwise, though.
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01168 seconds
  • Memory Usage 1,769KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • 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
  • showpost_complete