<?php
/**
* Copryright by Murphy 2008, All Rights Reserved
*/
$plugins->add_hook("portal_start", "portalbirthday");
function portalbirthday_info()
{
return array(
"name" => "Birthday Portal",
"description" => "Mit diesem Plugin wird eine Box im Portal hinzugefügt. In der Box werden die heutigen Geburtstage angezeigt.",
"website" => "http://mybboard.de/",
"author" => "Murphy",
"authorsite" => "http://mybboard.de/",
"version" => "1.0 Beta",
);
}
// Plugin aktivieren
function portalbirthday_activate()
{
global $db;
require MYBB_ROOT."/inc/adminfunctions_templates.php";
find_replace_templatesets("portal", '#'.preg_quote('{$stats}').'#', "{\$stats}\n{\$portalbirthday}");
$portalbirthday_template = array(
"title" => 'portalbirthday',
"template" => "<table border=\"0\" cellspacing=\"{\$theme[\'borderwidth\']}\" cellpadding=\"{\$theme[\'tablespace\']}\" class=\"tborder\">
<tr>
<td class=\"thead\"><strong>Test</strong></td>
</tr>
<tr>
<td class=\"trow1\">
1
</td>
</tr>
</table><br />",
"sid" => -2,
"version" => 120,
"status" => '',
);
$db->insert_query(TABLE_PREFIX.'templates', $portalbirthday_template);
}
// Plugin deaktivieren
function portalbirthday_deactivate()
{
global $db;
require MYBB_ROOT."/inc/adminfunctions_templates.php";
find_replace_templatesets("portal", "{\$stats}\n{\$portalbirthday}", '#'.preg_quote('{$stats}').'#');
$db->query("DELETE FROM ".TABLE_PREFIX."templates WHERE title='portalbirthday'");
}
?>