2010-10-28, 12:10 PM
Im adding a mycode via a plugin. When i activate the plugin inserts the mycode as i want , my problem is i need to select the mycode in ACP and click "Save MyCode" for the mycode to become effective.
Heres how im inserting the mycode (Just an example):
Ive tried using different parse orders , but for soem reason it wont active the actull mycode untill i click save mycode.
Any ideas on how i can activate the plugin apon activating the plugin ?
Heres how im inserting the mycode (Just an example):
$mycode_test = array_map(array($db, 'escape_string'), array(
"title" => "Test",
"description" => "",
"regex" => "Reg expression here",
"replacement" => "Replacement here",
"active" => "1",
"parseorder" => "1",
));
$db->insert_query("mycode", $mycode_test);
$cid = $db->insert_id();
Ive tried using different parse orders , but for soem reason it wont active the actull mycode untill i click save mycode.
Any ideas on how i can activate the plugin apon activating the plugin ?