MyBB Requests

Completed Adding Extra Section In UCP?

Submitted by DMPS, , Thread ID: 2804

Thread Closed

RE: Adding Extra Section In UCP?

linkzy
No pressure, no diamonds
Level:
0
Reputation:
181
Posts:
5.34K
Likes:
341
Credits:
54
14-04-2015, 02:52 PM
#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?

DMPS
Just Chillen
Level:
2
Reputation:
41
Posts:
618
Likes:
45
Credits:
514
OP
14-04-2015, 03:00 PM
#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?

Sozin
Nan Ihier Gelair Mordor
Divine
Level:
0
Reputation:
91
Posts:
2.33K
Likes:
375
Credits:
11K
14-04-2015, 04:01 PM
#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?

Akay
We are!
Level:
0
Reputation:
28
Posts:
946
Likes:
109
Credits:
2.05K
14-04-2015, 04:05 PM
#14
What do you need the page for?

RE: Adding Extra Section In UCP?

DMPS
Just Chillen
Level:
2
Reputation:
41
Posts:
618
Likes:
45
Credits:
514
OP
14-04-2015, 08:20 PM
#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?

Akay
We are!
Level:
0
Reputation:
28
Posts:
946
Likes:
109
Credits:
2.05K
14-04-2015, 08:30 PM
#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?

DMPS
Just Chillen
Level:
2
Reputation:
41
Posts:
618
Likes:
45
Credits:
514
OP
15-04-2015, 03:14 AM
#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]

Users browsing this thread: 1 Guest(s)