2011-06-02, 12:17 AM
Hey, I'm trying to connect my plugin to a CPF and it won't work, here's the code:
I get error on my site around here:
require_once MYBB_ROOT."/inc/adminfunctions_templates.php";
find_replace_templatesets("postbit_author_user", '#inglevel\']}#', 'inglevel\']}<br />Country: <img src="images/{$post['fid5']}">');
Can anyone help me please?
<?php
// Disallow direct access to this file for security reasons
if(!defined("IN_MYBB"))
{
die("Direct initialization of this file is not allowed.<br /><br />Please make sure IN_MYBB is defined.");
}
function show_country_info()
{
return array(
'name' => 'Show Country',
'description' => 'A plugin that shows the country of a user, this effects postbit template.',
'website' => 'http://www.setupwith.us',
'author' => 'Daniel Watts',
'authorsite' => 'http://www.setupwith.us',
'version' => '0.1',
"guid" => "",
"compatibility" => "*"
);
}
function show_country_activate()
{
global $mybb, $templates;
require_once MYBB_ROOT."/inc/adminfunctions_templates.php";
find_replace_templatesets("postbit_author_user", '#inglevel\']}#', 'inglevel\']}<br />Country: <img src="images/{$post['fid5']}">');
rebuild_settings();
}
function show_country_deactivate()
{
global $mybb, $templates;
require "../inc/adminfunctions_templates.php";
find_replace_templatesets("postbit_author_user", '#<br />Country: Country: <img src="images/{$post['fid5']}#', '',0);
rebuild_settings();
}
?>
I get error on my site around here:
require_once MYBB_ROOT."/inc/adminfunctions_templates.php";
find_replace_templatesets("postbit_author_user", '#inglevel\']}#', 'inglevel\']}<br />Country: <img src="images/{$post['fid5']}">');
Can anyone help me please?