akismet should now work: it was using a bad mixture of old/new commands

This commit is contained in:
real_nowhereman 2008-02-19 19:55:27 +00:00
parent 69f4510433
commit 2a9f3dbafb
3 changed files with 16 additions and 16 deletions

View File

@ -14,7 +14,7 @@ Module: style.css
/* ===== COLUMN ===== */ /* ===== COLUMN ===== */
#column { .column {
float: right; float: right;
width: 195px !important; width: 195px !important;
width: 180px; width: 180px;
@ -26,25 +26,25 @@ Module: style.css
border-left: solid 1px #ccc border-left: solid 1px #ccc
} }
#column h4 { .column h4 {
/* Titles of the sections */ /* Titles of the sections */
margin-bottom: .5em; 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 === */ /* === List === */
#column ul li table { font-size: 100% } .column ul li table { font-size: 100% }
#column ul { .column ul {
list-style-type: none; list-style-type: none;
margin-right: 10px; margin-right: 10px;
margin-bottom: .5em; margin-bottom: .5em;
padding-left: 1em 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% }

View File

@ -1,20 +1,22 @@
<div id="column">
<div id="col-right" class="column">
{widgets pos=right} {widgets pos=right}
<div id="{$id}"> <div id="{$id}">
<h4>{$subject}</h4> <h4>{$subject}</h4>
{$content} {$content}
</div> </div>
{/widgets} {/widgets}
</div> <!-- end of #col-right -->
<div id="col-left" class="column">
{widgets pos=left} {widgets pos=left}
<div id="{$id}"> <div id="{$id}">
<h4>{$subject}</h4> <h4>{$subject}</h4>
{$content} {$content}
</div> </div>
{/widgets} {/widgets}
</div> <!-- end of #col-left -->
</div>

View File

@ -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); define('AKISMET_TIMEOUT', 10);
require plugin_getdir('akismet') . '/inc/Akismet.class.php'; require plugin_getdir('akismet') . '/inc/Akismet.class.php';
@ -30,18 +28,18 @@ function plugin_akismet_validate(&$bool, $contents) {
if (!$bool) return false; 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->setAuthor($contents['name']);
$akismet->setAuthorEmail(isset($contents['email'])? $contents['email'] : ''); $akismet->setAuthorEmail(isset($contents['email'])? $contents['email'] : '');
$akismet->setAuthorURL(isset($contents['url'])? $contents['url'] : ''); $akismet->setAuthorURL(isset($contents['url'])? $contents['url'] : '');
$akismet->setContent($contents['content']); $akismet->setContent($contents['content']);
if ($v= $akismet->isSpam()){ if ($v= $akismet->isSpam()){
global $_FP_SMARTY; global $smarty;
$_FP_SMARTY->assign('error', array('ERROR: Comment is invalid')); $smarty->assign('error', array('ERROR: Comment is invalid'));
return false; return false;
} }
return true; return true;