14-04-2015, 02:52 PMlinkzy Wrote: Surprise
Just got it from leefish's reply
The Plugin For making new page :3Code:<?php
// 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.");
}
if(!in_array(THIS_SCRIPT, array("usercp.php")) && !defined("IN_ADMINCP"))
{
// We don't want this plugin
return false;
}
$plugins->add_hook("usercp_start", "xxx_start");
$plugins->add_hook("usercp_menu", "xxx_usercp_menu");
function leegraphs_info()
{
return array(
"name"=> "xxx",
"description"=> "A plugin for something",
"website"=> "http://leefish.nl",
"author"=> "Leesester",
"authorsite"=> "http://leefish.nl",
"version"=> "1.0",
"guid" => "",
"compatibility" => "16*"
);
}
function xxx_start()
{
global $db, $footer, $header, $navigation, $headerinclude, $themes, $mybb, $templates, $usercpnav;
if($mybb->input['action'] != "myxxx")
{
return false;
}
// This is where you need to do the queries.
eval("\$output = \"".$templates->get("xxx")."\";");
output_page($output);
}
function xxx_usercp_menu()
{
global $lang, $templates;
if(!isset($lang->xxx_usercpmenu_bit))
{
$lang->xxx_usercpmenu_bit = "xxx";
}
$template = "\n\t<tr><td class=\"trow1 smalltext\"><a href=\"usercp.php?action=download_stats\" class=\"usercp_nav_item usercp_nav_usergroups\">{$lang->xxx_usercpmenu_bit}</a></td></tr>";
$templates->cache["usercp_nav_misc"] = str_replace("<tbody style=\"{\$collapsed['usercpmisc_e']}\" id=\"usercpmisc_e\">", "<tbody style=\"{\$collapsed['usercpmisc_e']}\" id=\"usercpmisc_e\">{$template}", $templates->cache["usercp_nav_misc"]);
}
?>
Loading Info...