The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
New User CP page
Hi,
Is it possible to add a custom page to the User CP? For exemple, in the "Settings & Options" tab, I want to add a "Edit Localisation" link. And in the Edit Localisation section, I want to use my own php script wich display a google map instead of simple fields. Do you know how to do this? Thanks |
#2
|
||||
|
||||
You may create your own vb page (see this article - [How-To] vBulletin API Basics: Creating Custom Pages & Misc.) and then add a link in the UserCP to connect to it.
|
#3
|
|||
|
|||
Thanks for your answer.
So I don't know neither how to add a link in the UserCP nor how to add the sided panel "Control Panel" to a custom page :/ |
#4
|
||||
|
||||
I think the control panel is just a 'shell' (USERCP_SHELL template) and so all you need to do is create the stuff to go into the right side column. You would eval that first and then spit out the shell. You should take a look at the code to do some of the other links in there. I think the links are also in the USERCP_SHELL.
|
#5
|
|||
|
|||
Great! That's right!
In the USERCP_SHELL template each link is managed by the code (here is the Customize link example) : HTML Code:
<if condition="$show['customizelink']"> <tr><td class="$navclass[customize]" nowrap="nowrap"><a class="smallfont" href="profile.php?$session[sessionurl]do=customize">$vbphrase[customize_profile]</a></td></tr> </if> It's no important but do you know how to use the $show variable? Now I'll try to create my custom page |
#6
|
|||
|
|||
let us know how you get on, i would also love to show peoples location on USERCP page via a google map
|
#7
|
|||
|
|||
Hi Jacko,
I try to convert my Map page to use it in vBulletin. If possible I'll try to make a module, but I don't know if I'll succeed. Actually, I use it in a SMF forum : http://www.zbrush.fr/ZBPortail/index...r_Map/User_Map . In order to make a module, or a product (I don't know the difference), I had to generalize the code. Many parameters like personalized Markers or categories (freelance, pro, student etc) are specifics to ZBrush and are fixed in the code. |
#8
|
||||
|
||||
$show['whatever'] is simply a variable defined in the php code. They do the condition in the php and then set $show['whatever'] to true is the condition is met. So, instead of checking if the person is allowed to see the link by doing some condition on their permissions in the template, they do it in the php code and then set the $show variable based on that. So, if you think you may want to use it later, just put $show['yourvariablename'] equal to true in your php code and then use the conditional around your link in the USERCP_SHELL.
|
#9
|
|||
|
|||
Thanks
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|