MyBB Community Forums

Full Version: Error
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
What i've done:
- Deactivated
- Reverted templates
- Checked, and yep it's gone
- Activated
- Checked, yep it's back
- Deactivated
- Checked, nothing happened.. Sad..
i hope that'd work too lol..
maybe you can check, here is my code i currently have
<?php

//$plugins->add_hook("usercp_start", "fastrefer");
// 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 fastrefer_info()
{
	return array(
		"name"        => "Fast Refer",
		"description" => "Display referral information in the UserCP",
		"website"     => "http://talkforstuff.com",
		"author"      => "TalkForStuff - Shadows.",
		"authorsite"  => "http://talkforstuff.com",
		"version"     => "0.5 Pre-Alpha",
		"guid"        => "",
        "compatibility" => "14*"
		);
}


function fastrefer_activate()
{
// BEGIN INSTALL TEMPLATE REPLACEMENTS
global $db, $mybb;
 // add referral information into templates
	require MYBB_ROOT.'/inc/adminfunctions_templates.php';
find_replace_templatesets("usercp", '#'.preg_quote('{$latest_warnings}').'#', '{$latest_warnings}<!-- begin FastRefer By TalkForStuff.COM - Shadows --><br /><table border="0" cellspacing="1" cellpadding="5" class="tborder"><td class="thead" colspan="2"><strong>Referral Information</strong></td><tr><td width="50%" class="trow1"><strong>Referral URL:</strong></td><td width="50%" class="trow2"><a href="{$mybb->settings[\'bburl\']}/index.php?referrer={$mybb->user[\'uid\']}">{$mybb->settings[\'bburl\']}/index.php?referrer={$mybb->user[\'uid\']}</a></td></tr></table><!-- end -->'); 
}

function fastrefer_deactivate()
{
//Remove template replacements	
//include global the $db
global $db, $mybb;
//edit templates
//remove referral info from templates
	require MYBB_ROOT."/inc/adminfunctions_templates.php";
find_replace_templatesets("usercp", '#'.preg_quote('{$latest_warnings}<!-- begin FastRefer By TalkForStuff.COM - Shadows --><br /><table border="0" cellspacing="1" cellpadding="5" class="tborder"><td class="thead" colspan="2"><strong>Referral Information</strong></td><tr><td width="50%" class="trow1"><strong>Referral URL:</strong></td><td width="50%" class="trow2"><a href="{$mybb->settings[\'bburl\']}/index.php?referrer={$mybb->user[\'uid\']}">{$mybb->settings[\'bburl\']}/index.php?referrer={$mybb->user[\'uid\']}</a></td></tr></table><!-- end -->').'#', '{$latest_warnings}', 0); 
}

?>

Thanks Smile.
- Shadows.
the issue that was posted here is solved.
But the post above this is NOT solved ( Sad )
Pages: 1 2