NL-ConvertToPHP, Dynamic Includes & Skinning
If you want the Enthusiast Anti-Spam Addon to work with NL-ConvertToPHP you need to add the following before header.php
[pre lang="php"]
if ($_SERVER['QUERY_STRING'] == “join”)
{
include ‘config.php’;
if (defined(‘ENTH_PATH’))
{
require_once ENTH_PATH .’show_antispam.php’;
} else {
if (!isset($_REQUEST['path']))
{
require_once $path .’show_antispam.php’;
}
}
$antispam_messages = array();
if( isset( $_POST['join'] ) && $_POST['join'] == ‘yes’ )
{
$errorstyle = ‘ style=”font-weight: bold; display: block;” ‘ .
‘class=”show_join_error”‘;
if(function_exists(‘antispamprocedures’))
{
$getantispam = antispamprocedures($errorstyle);
if (is_array($getantispam))
{
if ($getantispam[0] == ‘exit’)
{
if (!defined(‘ANTISPAM’))
{
define(‘ANTISPAM’, 1);
}
if ($getantispam[1] != ”) $antispam_messages = array($getantispam[1]);
$antispam = $getantispam[1] . antispam();
} else {
if (!defined(‘ANTISPAM’))
{
define(‘ANTISPAM’, 1);
}
if ($getantispam[1] != ”) $antispam_messages = array($getantispam[1]);
$antispam = $getantispam[1] . $getantispam[2];
}
}
}
} else {
if(function_exists(‘antispam’))
{
if (!defined(‘ANTISPAM’))
{
define(‘ANTISPAM’, 1);
}
$antispam = antispam();
}
}
}
[/pre]
Use with other dynamic includes scripts would be similar. Send me an e-mail if you cannot get it to work with your particular method of using includes.
Skinning would be similar. Include:
[pre lang="php"]
include 'config.php';
if (defined('ENTH_PATH'))
{
require_once ENTH_PATH .'show_antispam.php';
} else {
if (!isset($_REQUEST['path']))
{
require_once $path .'show_antispam.php';
}
}
$antispam_messages = array();
if( isset( $_POST['join'] ) && $_POST['join'] == 'yes' )
{
$errorstyle = ' style="font-weight: bold; display: block;" ' .
'class="show_join_error"';
if(function_exists('antispamprocedures'))
{
$getantispam = antispamprocedures($errorstyle);
if (is_array($getantispam))
{
if ($getantispam[0] == 'exit')
{
if (!defined('ANTISPAM'))
{
define('ANTISPAM', 1);
}
if ($getantispam[1] != '') $antispam_messages = array($getantispam[1]);
$antispam = $getantispam[1] . antispam();
} else {
if (!defined('ANTISPAM'))
{
define('ANTISPAM', 1);
}
if ($getantispam[1] != '') $antispam_messages = array($getantispam[1]);
$antispam = $getantispam[1] . $getantispam[2];
}
}
}
} else {
if(function_exists('antispam'))
{
if (!defined('ANTISPAM'))
{
define('ANTISPAM', 1);
}
$antispam = antispam();
}
}
?>
[/pre]
before any skinning code or any HTML.
