akismet should now work: it was using a bad mixture of old/new commands
This commit is contained in:
parent
69f4510433
commit
2a9f3dbafb
@ -14,7 +14,7 @@ Module: style.css
|
||||
|
||||
|
||||
/* ===== COLUMN ===== */
|
||||
#column {
|
||||
.column {
|
||||
float: right;
|
||||
width: 195px !important;
|
||||
width: 180px;
|
||||
@ -26,25 +26,25 @@ Module: style.css
|
||||
border-left: solid 1px #ccc
|
||||
}
|
||||
|
||||
#column h4 {
|
||||
.column h4 {
|
||||
/* Titles of the sections */
|
||||
margin-bottom: .5em;
|
||||
}
|
||||
|
||||
#column p, #column div { margin: 10px 5px }
|
||||
.column p, .column div { margin: 10px 5px }
|
||||
|
||||
#column a:link, #column a:visited { color: gray }
|
||||
.column a:link, .column a:visited { color: gray }
|
||||
|
||||
/* === List === */
|
||||
#column ul li table { font-size: 100% }
|
||||
.column ul li table { font-size: 100% }
|
||||
|
||||
#column ul {
|
||||
.column ul {
|
||||
list-style-type: none;
|
||||
margin-right: 10px;
|
||||
margin-bottom: .5em;
|
||||
padding-left: 1em
|
||||
}
|
||||
|
||||
#column fieldset { margin: 0 5px 0 5px }
|
||||
.column fieldset { margin: 0 5px 0 5px }
|
||||
|
||||
#column legend { font-size: 100% }
|
||||
.column legend { font-size: 100% }
|
||||
|
@ -1,20 +1,22 @@
|
||||
|
||||
<div id="column">
|
||||
|
||||
<div id="col-right" class="column">
|
||||
{widgets pos=right}
|
||||
<div id="{$id}">
|
||||
<h4>{$subject}</h4>
|
||||
{$content}
|
||||
</div>
|
||||
{/widgets}
|
||||
</div> <!-- end of #col-right -->
|
||||
|
||||
<div id="col-left" class="column">
|
||||
{widgets pos=left}
|
||||
<div id="{$id}">
|
||||
<h4>{$subject}</h4>
|
||||
{$content}
|
||||
</div>
|
||||
{/widgets}
|
||||
</div> <!-- end of #col-left -->
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
@ -9,8 +9,6 @@ Author URI: http://flatpress.sf.net
|
||||
*/
|
||||
|
||||
|
||||
// change 0 into your API key
|
||||
//define('AKISMET_API_KEY', '0');
|
||||
define('AKISMET_TIMEOUT', 10);
|
||||
|
||||
require plugin_getdir('akismet') . '/inc/Akismet.class.php';
|
||||
@ -30,18 +28,18 @@ function plugin_akismet_validate(&$bool, $contents) {
|
||||
|
||||
if (!$bool) return false;
|
||||
|
||||
global $blog_config;
|
||||
global $fp_config;
|
||||
|
||||
|
||||
$akismet = new Akismet($blog_config['WWW'], AKISMET_API_KEY);
|
||||
$akismet = new Akismet($fp_config['general']['www'], $fp_config['plugins']['akismet']['apikey']);
|
||||
$akismet->setAuthor($contents['name']);
|
||||
$akismet->setAuthorEmail(isset($contents['email'])? $contents['email'] : '');
|
||||
$akismet->setAuthorURL(isset($contents['url'])? $contents['url'] : '');
|
||||
$akismet->setContent($contents['content']);
|
||||
|
||||
if ($v= $akismet->isSpam()){
|
||||
global $_FP_SMARTY;
|
||||
$_FP_SMARTY->assign('error', array('ERROR: Comment is invalid'));
|
||||
global $smarty;
|
||||
$smarty->assign('error', array('ERROR: Comment is invalid'));
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user