2011-10-31, 09:03 AM
Hello. I have a request, I learn to write plugins for MyBB and I wonder what's wrong here?
<?php
f(!defined("IN_MYBB"))
{
die("Direct initialization of this file is not allowed.<br /><br />Please make sure IN_MYBB is defined.");
}
// add hooks
$plugins->add_hook('index_start', 'mytest_function', 10, '');
// Stanard MyBB function with informations about plugin
function mytest_info()
{
return array(
"name" => "Nagłówek do PS-Games",
"description" => "Dodaje aktywne zakładki jak w IPB",
"website" => "[email protected]",
"author" => "Inaro",
"authorsite" => "[email protected]",
"version" => "1.0",
"guid" => "",
"compatibility" => "16*"
);
}
if($current_page2=="index" || $current_page2=="portal" || $current_page2=="games" || $current_page2=="game" || $current_page2=="search" || $current_page2=="services" || $current_page2=="announcements" && $mybb->input['aid']==1)
{
$currentitem[$current_page2]="current-item";
}
else
{
$currentitem["index"]="current-item";
}
?>