MyBB Requests

Completed Adding Extra Section In UCP?

Submitted by DMPS, , Thread ID: 2804

Thread Closed

RE: Adding Extra Section In UCP?

#11
Surprise
Just got it from leefish's reply

Code:
<?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"]);
}
?>
The Plugin For making new page :3
| A | v4hl| Addicted | Senpai | Sui | Sensei | H | fdigl |


RE: Adding Extra Section In UCP?

OP
#12
14-04-2015, 02:52 PM
linkzy Wrote:
Surprise
Just got it from leefish's reply

Code:
<?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"]);
}
?>
The Plugin For making new page :3

There would have to be an easier way, I mean how would you edit the page?
[Image: Lorj6YP.png]

RE: Adding Extra Section In UCP?

#13
Give up if you don't know php. Copy-pasting codes will just get you a bad plugin.
Do not let your difficulties fill you with anxiety, after all it is only in the darkest nights that stars shine more brightly. - Ali(a.s)

Developer( PHP, Python, C++, HTML+CSS, JS I am available for Hire. Message Me for details.

RE: Adding Extra Section In UCP?

#14
What do you need the page for?

RE: Adding Extra Section In UCP?

OP
#15
14-04-2015, 04:05 PM
Kewl Wrote:
What do you need the page for?

Was gonna put all the premium features on it. But I am gonna go learn PHP first :D
[Image: Lorj6YP.png]

RE: Adding Extra Section In UCP?

#16
14-04-2015, 08:20 PM
Cyan Wrote:
14-04-2015, 04:05 PM
Kewl Wrote:
What do you need the page for?

Was gonna put all the premium features on it. But I am gonna go learn PHP first :D

This is pretty easy to do. But if I'm gonna make it, i'm not gonna implent the features. Just the action part (usercp.php?action=lol).

RE: Adding Extra Section In UCP?

OP
#17
14-04-2015, 08:30 PM
Kewl Wrote:
14-04-2015, 08:20 PM
Cyan Wrote:
14-04-2015, 04:05 PM
Kewl Wrote:
What do you need the page for?

Was gonna put all the premium features on it. But I am gonna go learn PHP first :D

This is pretty easy to do. But if I'm gonna make it, i'm not gonna implent the features. Just the action part (usercp.php?action=lol).

Can you private message me?
That is fine, I can add the features myself man.
[Image: Lorj6YP.png]

RE: Adding Extra Section In UCP?

This post was last modified: 15-04-2015, 07:07 PM by Akay
#18
http://nulledbb.com/Thread-UserCP-Action
1

Users browsing this thread: 2 Guest(s)