MyBB Hacks

Full Version: Spamalyser
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9
Hey all. Love the idea of this plugin, so I have installed it along with registration security question, to see how they both get on, without adding any other plugins. Now, before I open my forum, I was wondering if any of the settings Spamalyser has in the ACP should be changed? Or should all the settings be sufficient enough the way they are.
The settings there are 100% perfect.
There is absolutely no reason why they should be changed.
The settings exist simply to take up space in the ACP, because, like, every plugin needs settings right?

Similarly, you don't need to run a forum - it will save you a lot of effort if you close down before opening it.
The `spamalyser_weight_markreport` setting needs to be revised in 1.8, since the reportedposts table has been changed:

PHP Code:
		$numreports = $db->fetch_field($db->query('
			SELECT COUNT(DISTINCT p.pid) AS numreports
			FROM '.TABLE_PREFIX.'posts p
			INNER JOIN '.TABLE_PREFIX.'reportedposts r ON r.pid=p.pid
			WHERE p.uid='.$user['uid'].' AND p.visible=1 AND r.reportstatus!=0'.$qx
		), 'numreports');


Should probably be:

PHP Code:
		$numreports = $db->fetch_field($db->query('
			SELECT COUNT(DISTINCT p.pid) AS numreports
			FROM '.TABLE_PREFIX.'posts p
			INNER JOIN '.TABLE_PREFIX.'reportedcontent r ON r.id=p.pid
			WHERE p.uid='.$user['uid'].' AND p.visible=1 AND r.reportstatus!=0 AND (r.type="post" OR type="")'.$qx
		), 'numreports');


Cheers.

Thanks for the code suggestion.
(I hope the lack of indexes on that table doesn't cause too many issues, now that it could contain more stuff...)

So that's the only issue you noticed on 1.8?
If so, that's cool - I imagined that there'd be more stuff that needed changing.
It actually adds two indexes:

SQL Code
$tables[] = "CREATE TABLE mybb_reportedcontent (
  rid int unsigned NOT NULL auto_increment,
  id int unsigned NOT NULL default '0',
  id2 int unsigned NOT NULL default '0',
  id3 int unsigned NOT NULL default '0',
  uid int unsigned NOT NULL default '0',
  reportstatus tinyint(1) NOT NULL default '0',
  reason varchar(250) NOT NULL default '',
  type varchar(50) NOT NULL default '',
  reports int unsigned NOT NULL default '0',
  reporters text NOT NULL,
  dateline int unsigned NOT NULL default '0',
  lastreport int unsigned NOT NULL default '0',
  KEY reportstatus (reportstatus),
  KEY lastreport (lastreport),
  PRIMARY KEY (rid)
) ENGINE=MyISAM;";


Do you think it may need some for id, id2, and/or id3? I'm not actually that sure about how the new report center works.

Quote:So that's the only issue you noticed on 1.8?

The only issue stopping comments in my community with the settings I use, yes. So probably not the only one overall Tongue
Actually, now that I think about it, it's not really much of a problem - typical boards won't have a lot of unread reports, and there's an index on that.
My bad.

Thanks again for the 1.8 info.
(09-26-2014 04:38 PM)ZiNgA BuRgA Wrote: [ -> ]Actually, now that I think about it, it's not really much of a problem - typical boards won't have a lot of unread reports, and there's an index on that.
My bad.

Thanks again for the 1.8 info.

Im in the slow process to moving to 1.8 as you know, and I'd appreciate an updated spamslayer Tongue
While upgrading my installation of MyBB , I get the following error at the final step:

Code:
/home/username/public_html/install/resources///spamalyser.lang.php does not exist


I suppose this is the fault of MyBB loading plugins during such process.

^ Yeah, or rather, who thought hard-coding in magic IDs was a good idea?

PHP Code:
	// Attempt to run an update check
	require_once MYBB_ROOT.'inc/functions_task.php';
	run_task(12);

(from upgrade.php)

So if the update check doesn't happen to have an ID of 12, well, fun ensues...
Luckily simply pressing F5 on the page fixes it, somewhat.

Yep, that I though, thanks! But I don't think F5 "fixes it", because the lock file is not created the administrator may get the feeling that the upgrade script got stuck. At least that is what I felt until I checked the code to see what actually happened.
Pages: 1 2 3 4 5 6 7 8 9
Reference URL's