|
how to add a menu to the user cp
|
|
08-21-2008, 09:27 AM
Post: #1
|
|||
|
|||
|
how to add a menu to the user cp
ok i a new to make plugins to mybb but i am tring to work out to add a new text like to the user cp eg on Miscellaneous
as i need a link to show for the rest of my plug-ins as it need to got to a new page for my plugin to work i not even do this part yet as there is not point in doing so unless the basics have been done cheers thank you for your help need help choosing an webhost or just want to chat about hosting Webhosting Reviews Saw game |
|||
|
08-21-2008, 06:14 PM
Post: #2
|
|||
|
|||
|
RE: how to add a menu to the user cp
Just edit the template "usercp_nav_misc." Just copy/paste a line, then edit it to your likings.
-Doug 1scream Founder Former MyBB Developer & SQA Member My Twitter |
|||
|
08-21-2008, 09:35 PM
Post: #3
|
|||
|
|||
|
RE: how to add a menu to the user cp
ok thank you i only want the link to show when my plugin is active so do i use usercp_nav_misc as a hook? and just added the html code link i want to show.
need help choosing an webhost or just want to chat about hosting Webhosting Reviews Saw game |
|||
|
08-21-2008, 09:55 PM
Post: #4
|
|||
|
|||
|
RE: how to add a menu to the user cp
You insert your HTML modifications when in your plugin's activate function. When you deactivate the plugin, you remove the HTML modifications to the template. See the find_replace_templatesets function in inc/adminfunctions_templates.php
Dennis Tsang :: MyBB Developer Follow me on Twitter: @dennistt |
|||
|
08-25-2008, 11:43 AM
(This post was last modified: 08-25-2008 11:56 AM by Tazfan.)
Post: #5
|
|||
|
|||
|
RE: how to add a menu to the user cp
is this right cos i dont seem to be working
PHP Code: <?phpcos for some reason i get Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in /home/user/public_html/site/forums/inc/plugins/MemberRefer.php on line 11 need help choosing an webhost or just want to chat about hosting Webhosting Reviews Saw game |
|||
|
08-25-2008, 12:32 PM
Post: #6
|
|||
|
|||
|
RE: how to add a menu to the user cp
That is not correct. "add_hook" always goes before any of the functions in your plugin. Plus, you must use the find_replace_templatesets function to add things into templates.
Also, are you using MemberRefer_activate as your run function? If so, that doesn't work. The _activate and _deactivate are for when you activate and deactivate the plugin in your ACP. I suggest browsing through some plugins (perhaps Ryan's, since he explains most of what goes on in his plugins). -Doug 1scream Founder Former MyBB Developer & SQA Member My Twitter |
|||
|
08-25-2008, 12:55 PM
(This post was last modified: 08-25-2008 04:49 PM by Tazfan.)
Post: #7
|
|||
|
|||
|
RE: how to add a menu to the user cp
a i i see what i have been doing wrong and yes Ryans plugins are great to learn from i miss this when i program with people do not comment
![]() thank you Ryan for making your plugins easy to fellow and RenegadeFan cheers for the heads up ![]() ok sorry guys i need more help would this be right to get the link added to the menu when the user has the plugin activate PHP Code: function memberrefer_activate()if not what would i do
need help choosing an webhost or just want to chat about hosting Webhosting Reviews Saw game |
|||
|
08-25-2008, 08:56 PM
Post: #8
|
|||
|
|||
|
RE: how to add a menu to the user cp
It needs to be like this:
PHP Code: function memberrefer_activate()-Doug 1scream Founder Former MyBB Developer & SQA Member My Twitter |
|||
|
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)
Search
Member List
Calendar
Help


as i need a link to show for the rest of my plug-ins as it need to got to a new page for my plugin to work i not even do this part yet as there is not point in doing so unless the basics have been done 



