2014-12-13, 09:08 AM
Hello, I want that my plugin create two or more global templates but I don't know how to do it! The code for make a template is the following:
But what if I want to make two or more templates?
P.S. I don't understand very well what is "sid", could anyone explain me what is that?
function plugin_activate() {
global $mybb, $db;
$templatearray = array(
"tid" => "NULL",
"title" => 'template_name',
"template" => $db->escape_string('
<p>hello</p>'),
"sid" => "-1",
);
$db->insert_query("templates", $templatearray);
//other plugin code
}
But what if I want to make two or more templates?
P.S. I don't understand very well what is "sid", could anyone explain me what is that?