Log in

View Full Version : How to add custom field to the user control panel menu on the left?


Demo16
10-21-2009, 01:12 PM
Hi guys,
how can I add some fields to the user control panel menu on the left?
There's also a way to show that manu on another php page?

for example my forum is here www.mydomain.com/forum and I wnat to have a page like this www.mydomain.com/cp.php with inside the forum control panel

tnx in advance

Alek

Lynne
10-21-2009, 02:14 PM
Have you looked through the articles forums? I am pretty sure I've seen an article or two on how to add pages to the ACP and navigation also.

Demo16
10-22-2009, 09:09 AM
not the admin control panel but the user's one. Found nothing about this

--------------- Added 1256222891 at 1256222891 ---------------

I've found something in the postbit section but I'm not sure how to edit it

Lynne
10-22-2009, 02:10 PM
There are template_hooks in the USER_CP template, so you can use those to add to the menu. Or just edit the template if you want them somewhere else.

Demo16
10-22-2009, 02:19 PM
what's template_hooks? It doesn't seems to be the user control panel menu on the left.

And what file I have to include in another page to have this User CP outside the forum?

thanks for the help

Lynne
10-22-2009, 02:27 PM
You would have to make your own page if you wish to have your CP link go to another page. A template_hook is just a way to insert html without modifying the actual template. You would write a plugin which inserts html at the location of the template_hook. There are articles on this in the articles forum.

If you have to write your own page, you can read one of these articles - How to create your own vBulletin-powered page! (uses vB templates) (https://vborg.vbsupport.ru/showthread.php?t=62164) or [How-To] vBulletin API Basics: Creating Custom Pages & Misc. (https://vborg.vbsupport.ru/showthread.php?t=98009)

Demo16
10-22-2009, 04:21 PM
You would have to make your own page if you wish to have your CP link go to another page.
I have already new pages but what I want to do is to use PHP include system to include on my pages the user control panel menu, is this possible? I can't see a php file for the U CP Menu.


A template_hook is just a way to insert html without modifying the actual template. You would write a plugin which inserts html at the location of the template_hook. There are articles on this in the articles forum.

I'll try to find an article about this. I thought it was simpler to add links in the CP User Menu. Like editing the template file or something similar.

Lynne
10-22-2009, 04:48 PM
You may just edit the template instead if you find that easier. Not everyone likes to do that, but it is easy to do it that way.

Demo16
10-22-2009, 04:50 PM
And the template page is? :D
What about including the U CP Menu in another php file? I can do it? Which php file I have to include?

tnx

Lynne
10-22-2009, 05:01 PM
USER_CP I thought I mentioned that already.

You can always find the template by doing this - vboptions > General Settings > Add Template Name in HTML Comments > set to Yes . Then go back to your page and view the source code and you will see the name of the template called around your part of the code. Sometimes the template is the one mentioned at the very top of the page source.

As for the whole menu, have you looked at the usercp.php page? Have you thought of just using a hook in the usercp.php page for your page and adding it all by plugin - adding a new do=whatever?

Demo16
10-22-2009, 05:06 PM
USER_CP I thought I mentioned that already.

You can always find the template by doing this - vboptions > General Settings > Add Template Name in HTML Comments > set to Yes . Then go back to your page and view the source code and you will see the name of the template called around your part of the code. Sometimes the template is the one mentioned at the very top of the page source.

As for the whole menu, have you looked at the usercp.php page? Have you thought of just using a hook in the usercp.php page for your page and adding it all by plugin - adding a new do=whatever?

Great tomorrow I'll try and let you know.
tnx for your help

ragtek
10-22-2009, 05:13 PM
maybe you could use the google translator to translate http://www.vbulletin-germany.org/showthread.php?t=4799&highlight=usercp

here i've wrote a article/tutorial

Demo16
10-22-2009, 06:28 PM
maybe you could use the google translator to translate http://www.vbulletin-germany.org/showthread.php?t=4799&highlight=usercp

here i've wrote a article/tutorial

I'll check it tnx. You've made a plugin to add fields to the user CP Menu?

ragtek
10-23-2009, 05:00 AM
NO, thats a tutorial, but you need here also a plugin, because all the menuitems are in an array, because of the color(activ item have another color then the others)

Demo16
10-29-2009, 08:08 AM
Sorry but I can't see the code. I'm registered to the forum but no code showing inside the boxes.