vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Customised ModCP page? (https://vborg.vbsupport.ru/showthread.php?t=160131)

rudgej 10-13-2007 12:19 PM

Customised ModCP page?
 
I've been looking unsuccessfully for an idiot's guide to adding a custom menu option to the modCP, so can anybody point in the right direction please? :)

I have managed to create a custom option in the AdminCP, and had assumed that the steps taken would be similar for the ModCP. Can it be done, or is the ModCP limited on purpose?

Opserty 10-13-2007 04:10 PM

Look at the source code. :p

You need to create a Plugin with the hook location mod_index_navigation then use something like this, (I took it from the index.php file in the ModCP:
PHP Code:

construct_nav_option($vbphrase['post_new_announcement'], 'announcement.php?do=add');
construct_nav_option($vbphrase['forum_manager'], 'forum.php?do=modify');
construct_nav_group($vbphrase['announcements']);
construct_nav_spacer(); 

I think the names of the functions are pretty self explanatory although they don't seem to be documented in API documents though :mad:.

(If you haven't worked out ...nav_option its: construct_nav_option( 'text', 'url');)

rudgej 10-13-2007 04:18 PM

Thanks Opserty. I'll give this a try. :)

I had previously tried the exact same stuff that I had done to customise AdminCP, but as it didn't work, I began to wonder whether there was some restrictions that I wasn't aware of.

Dismounted 10-17-2007 06:54 AM

At the moment, the Mod CP isn't as "extendible" as the Admin CP.

rudgej 10-17-2007 04:55 PM

Quote:

Originally Posted by Dismounted (Post 1362134)
At the moment, the Mod CP isn't as "extendible" as the Admin CP.

Thanks Dismounted. Does that mean that I'll have problems, or that I will be able to do something? :)

Paul M 10-17-2007 05:12 PM

It means you cannot alter the mcp using the same system as the acp, but you can use the method posted above.

rudgej 10-17-2007 06:34 PM

Thanks Paul. That would certainly explain why I got nowhere when trying the same thing that I did with the AdminCP.

Charlie-brm 12-21-2007 03:37 PM

I would like to have the members' e-mail field removed from view for Moderators. I can't see where to get started locating that code in Modcp/index.php

Any help, big thanks.


All times are GMT. The time now is 08:04 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01036 seconds
  • Memory Usage 1,726KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete