1 gcasanova May 10, 2012 16:20
3 gcasanova May 10, 2012 21:53
Thanks sam2kb, that solved it though now spammers can comment freely on the blog...
I upgraded to latest b2 version as you suggested. Upon doing it tags that were accented (Spanish) got corrupted (look at the tags in this post: http://www.literanova.net/blog5.php/el-fracaso-de-pastor-maldonado) Do you know how to correct this?
4 sam2kb May 10, 2012 22:02
First see if you get spam comments within a couple of days. If you will then install reCaptcha plugin and disable AJAX forms on Blog Settings > Advanced
http://forums.b2evolution.net/viewtopic.php?t=22963
As of tags encoding, convert your b2evolution DB to UTF-8 with this script. Save it as convert-db.php in b2evolution base directory (same where admin.php file is) and run with
http://yourwebsite.tld/convert-db.php
<?php
/**
* Convert your b2evolution DB to UTF-8.
* Place this script in the folder where "blogs" resides (is a subfolder of)
* and execute it from the command line (or from your browser).
*
* @author http://daniel.hahler.de/
* @license Public Domain
*/
/**
* Change this to 0, if you do not want the DB default charset to be changed.
* This is used for new tables (e.g. from plugins).
*/
define( 'ALSO_CHANGE_DB_DEFAULT', 1 );
error_reporting(E_ALL);
ini_set('display_errors', 1);
require dirname(__FILE__).'/conf/_config.php';
require $inc_path.'_main.inc.php';
$DB->halt_on_error = true;
foreach( $DB->get_col('SHOW TABLES FROM `'.$db_config['name'].'` LIKE "'.$tableprefix.'%"') as $table )
{
echo "Converting $table... ";
$DB->query( '
ALTER TABLE `'.$table.'`
DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci,
CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci' );
echo "OK.\n";
}
if( ALSO_CHANGE_DB_DEFAULT )
{
echo "Changing default charset of DB...";
$DB->query( 'ALTER DATABASE `'.$db_config['name'].'` CHARACTER SET utf8 COLLATE utf8_general_ci' );
echo "OK.\n";
}
?>
Backup your database before you start
Disable Captcha plugin