The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
[How-To] Create Admin Help Topics For Your Product
[How-To] Create Admin Help Topics For Your Product Adding admin help topics to your products admin pages is easy and results in a cleaner and more professional interface. It takes a little work as there is no setup for this in product install/uninstall. If you would like to see this included in the default vbulletin then you can voice that in this thread. The first thing you want to do is put your site (hopefully a dev site) in debug mode. Once in debug mode, click on vBulletin Options in your ACP. There you will see a link to the "Admin Help Manager" or (AHM). This is not available unless debug mode is on. Clicking on that link will open the AHM of course. Once in the AHM, click on the "add new topic" link at the top of the screen. This must be repeated for each help topic you wish to add. Now, let's cover the input options. Script: Here you will put the name of the script used for the admin page you want the help item to appear on. Script name minus the extension. So if your script is myproduct_admin.php, you will put myproduct_admin as the script. Action: Here is where you need to make choices. 1. You can leave it blank and it will just be a general topic available when the help icon in the title bar is clicked. A general help will display on the overall page that lists all helps for that area of the admin page. 2. You can list one or more actions that will be associated with this help item. If you want it to appear on the section that loads when $_POST['do'] == 'insertsomething', then you would put insertsomething as the value here. If the same help item can be used in another section of the script such as "editsomething", and the verbiage of the help would be the same, then you can take care of both with the same item. To do this you would put insertsomething,editsomething as the value. Product: Make sure you choose the name of the product you are working on and want this help topic to be included with. Option: This refers to the individual element on the page. You can determine this by hovering over the input elements. The option name will appear in the tool tip that appears as name="XXXXXX". Where XXXXXX is the input item's name. So, if you want the help item next to a text input for user id, you would hover over that input box and the option name will pop up (while in debug). This is what you type in here, for the user id example it would most likely be userid. Display Order: Choose what order you want it displayed when viewing the overall page with all help topics for that section. Title:The title of the help item. I would recommend it being the same as the title of the input or section you are creating it for. To avoid confusion. Text: The text of the help you wish to add. Html is allowed, phrases don't seem to work here. vBulletin Default: Click yes. Click save and then view the admin section you created it for. You should see a help icon in the header as well as next to the item you created it for. Continue this for all items you wish to create a help topic for. When you create a help topic, vBulletin does several things. 1. It creates a new phrase for that item title. The title of this phrase will be a merger of the script name, the actions chosen, the option, and the word title all separated by a _ . So the example above would create myproduct_admin_insertsomething_editsomething_userid_title as the title phrase. 2. It also creates a new phrase for the text of the help item. Which for the above example would be myproduct_admin_insertsomething_editsomething_userid_text. 3. vBulletin also inserts a new row in the adminhelp table. This consists of columns for script name, action (comma delineated), option, display order, volatile (should = 1), and the product name. Creating the install/uninstall for the product. Once you have entered all the help items for your product the phrases will be available when you export your product xml. This is the easy part. Just add that phrase group to your product xml and the phrases will install/uninstall as all phrases do with a product. In the install section of your product. EDIT:The database entries in adminhelp can be done using Andreas' code below in post #7. In the uninstall section you would put. PHP Code:
|
#12
|
||||
|
||||
On UN*X-type systems, \n is used for newline, while windows uses \r\n for newline.
The XML exporter always uses \n for newline. => unix2dos "fixes" that, or use a decent editor |
#13
|
||||
|
||||
It's only the vb product exporter that does that. The help exporter is fine. It's a bug.
The editor has nothing to do with it. |
#14
|
||||
|
||||
It's always the same code that is being used when XMLs are exported.
Can you send me a copy of a "broken" product XML, and some instructions on how to reproduce the problem? |
#15
|
||||
|
||||
How would I be sending that to you?
|
#16
|
||||
|
||||
andreas (at) vbulletin.com
|
#17
|
|||
|
|||
Nice tutorial, added to the Tutorial List
|
#18
|
||||
|
||||
Important
vBulletin 3.6+ does not require any PHP code (see post #7): Admin help is automatically included in product XML and imported on the destination installation. |
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|