The Joomla! Community Magazine™

Customising Joomla! Help!!

Written by | Sunday, 01 January 2012 00:00 | Published in 2012 January
When a website development project is ready to be delivered, the clients usually demand a customised built-in help system so that they know how to navigate through the loads of menu items and web pages in order to maintain and manage the content/site in the absence of the development team.  Implementing such a built-in help system is made easier by Joomla’s Administrator Menu module.
Customising Joomla! Help!! The image was taken from http://uparoundthecorner.blogspot.com/2011/07/stephen-zimmers-seven-ways-to-help.html

help original segmentThere are a few ways to implement a built-in help using Joomla’s Administrator Menu module.  Let us focus on modifying the built-in menu module to address the need (i.e., Help) of the clients.  If you analyse the menu items of Help of Joomla’s back-end administration, all menu items such as Joomla Extensions and Joomla Translations are categorised under a menu item Useful Joomla Links except the menu items of Joomla Help that point to the core Joomla help, Official Support Forum that points to the Joomla forums, and Documentation Wiki that points to the main documentation.  All of the menu items categorized under the menu item Useful Joomla Links, along with their child menu items, can be modified to implement the built-in customised help as these menu items are geared more towards developers, designers, and site administrators - not content managers.

In the back-end, the display of menu is facilitated by the module Administrator Menu and the files for this module are located at \administrator\modules\mod_menu.  So, customising administrator menu involves modifying the files of this module.  The file to edit is default_enabled.php (original code shown in Code 1.1) that is located in the directory \administrator\modules\mod_menu\tmpl.  Change the parameters of the functions JTEXT and JMenuNode (that are used to create the menu item Useful Joomla Links and its child menu items) as shown in Code 1.2.  The changes are language string keywords (e.g., MOD_MENU_HELP_ EXTENSIONS) for JTEXT and the corresponding links ('http://extensions.joomla.org') for JMenuNode.

For modifying the file default_enabled.php, it is recommended that you override the output from core Joomla following the procedure provided in http://docs.joomla.org/How_to_override_the_output_from_the_Joomla!_core because you are changing a core Joomla file.  Note that the override on the back-end (administrator) would work just like it works on the front-end (site).

...
...
    $menu->addChild(
    new JMenuNode(JText::_('MOD_MENU_HELP_LINKS'), '#', 'class:weblinks'), true
    );
    $menu->addChild(
    new JMenuNode(JText::_('MOD_MENU_HELP_EXTENSIONS'), 'http://extensions.joomla.org', 'class:help-jed', false, '_blank')
    );
    $menu->addChild(
    new JMenuNode(JText::_('MOD_MENU_HELP_TRANSLATIONS'), 'http://community.joomla.org/translations.html', 'class:help-trans', false, '_blank')
    );
    $menu->addChild(
    new JMenuNode(JText::_('MOD_MENU_HELP_RESOURCES'), 'http://resources.joomla.org', 'class:help-jrd', false, '_blank')
    );
    $menu->addChild(
    new JMenuNode(JText::_('MOD_MENU_HELP_COMMUNITY'), 'http://community.joomla.org', 'class:help-community', false, '_blank')
    );
    $menu->addChild(
    new JMenuNode(JText::_('MOD_MENU_HELP_SECURITY'), 'http://developer.joomla.org/security.html', 'class:help-security', false, '_blank')
    );
    $menu->addChild(
    new JMenuNode(JText::_('MOD_MENU_HELP_DEVELOPER'), 'http://developer.joomla.org', 'class:help-dev', false, '_blank')
    );
    $menu->addChild(
    new JMenuNode(JText::_('MOD_MENU_HELP_SHOP'), 'http://shop.joomla.org', 'class:help-shop', false, '_blank')
    );
...
...
Code 1.1 - Original code in the file default_enabled.php

 

...
...
    $menu->addChild(
    new JMenuNode(JText::_('MOD_MENU_HELP_MYHELP'), '#', 'class:weblinks'), true
    );
    $menu->addChild(
    new JMenuNode(JText::_('MOD_MENU_HELP_MYHELP_TOPIC1'), JText::_('MOD_MENU_HELP_MYHELP_TOPIC1_URL'), 'class:help-jed', false, '_blank')
    );
    $menu->addChild(
    new JMenuNode(JText::_('MOD_MENU_HELP_MYHELP_TOPIC2'), JText::_('MOD_MENU_HELP_MYHELP_TOPIC2_URL'), 'class:help-trans', false, '_blank')
    );
    $menu->addChild(
    new JMenuNode(JText::_('MOD_MENU_HELP_MYHELP_TOPIC3'), JText::_('MOD_MENU_HELP_MYHELP_TOPIC3_URL'), false, '_blank')
    );
    $menu->addChild(
    new JMenuNode(JText::_('MOD_MENU_HELP_MYHELP_TOPIC4'), JText::_('MOD_MENU_HELP_MYHELP_TOPIC4_URL'), 'class:help-community', false, '_blank')
    );
    $menu->addChild(
    new JMenuNode(JText::_('MOD_MENU_HELP_MYHELP_TOPIC5'), JText::_('MOD_MENU_HELP_MYHELP_TOPIC5_URL'), 'class:help-security', false, '_blank')
    );
    $menu->addChild(
    new JMenuNode(JText::_('MOD_MENU_HELP_MYHELP_TOPIC6'), JText::_('MOD_MENU_HELP_MYHELP_TOPIC6_URL'), 'class:help-dev', false, '_blank')
    );
    $menu->addChild(
    new JMenuNode(JText::_('MOD_MENU_HELP_MYHELP_TOPIC7'), JText::_('MOD_MENU_HELP_MYHELP_TOPIC7_URL'), 'class:help-shop', false, '_blank')
    );
...
...
Code 1.2 - Modified code in the file default_enabled.php

Note that the language strings introduced are new and are not part of core Joomla.  In order to make the code flexible, the URL that links the menu items also are parameterised by the introduction of the function JTEXT along with the new language strings.  Next, these new language strings have to be added in the file en-GB.mod_menu.ini that is located in the directory \administrator\language\en-GB.

But wait!  There are chances that this file may get overwritten in the future releases of Joomla!.  So, the procedure of overriding the language string must be followed as recommended in http://docs.joomla.org/International_Enhancements_for_Version_1.6#Language_String_Overrides.  Therefore, instead of adding these new language strings to the file en-GB.mod_menu.ini, add the new language strings to the file en-GB.override.ini (as shown in Code 2.1) that is located in the directory \administrator\language\overrides.

 

...
...
MOD_MENU_HELP_MYHELP="My Help"
MOD_MENU_HELP_MYHELP_TOPIC1="My Help Topic 1"
MOD_MENU_HELP_MYHELP_TOPIC2="My Help Topic 2"
MOD_MENU_HELP_MYHELP_TOPIC3="My Help Topic 3"
MOD_MENU_HELP_MYHELP_TOPIC4="My Help Topic 4"
MOD_MENU_HELP_MYHELP_TOPIC5="My Help Topic 5"
MOD_MENU_HELP_MYHELP_TOPIC6="My Help Topic 6"
MOD_MENU_HELP_MYHELP_TOPIC7="My Help Topic 7"
MOD_MENU_HELP_MYHELP_TOPIC1_URL="http://mydomain.com/help_topic_1"
MOD_MENU_HELP_MYHELP_TOPIC2_URL="http://mydomain.com/help_topic_2"
MOD_MENU_HELP_MYHELP_TOPIC3_URL="http://mydomain.com/help_topic_3"
MOD_MENU_HELP_MYHELP_TOPIC4_URL="http://mydomain.com/help_topic_4"
MOD_MENU_HELP_MYHELP_TOPIC5_URL="http://mydomain.com/help_topic_5"
MOD_MENU_HELP_MYHELP_TOPIC6_URL="http://mydomain.com/help_topic_6"
MOD_MENU_HELP_MYHELP_TOPIC7_URL="http://mydomain.com/help_topic_7"
Code 2.1 - New Language Strings in the File en-GB.override.ini

 

help modified segment slant

Congratulations!  You have implemented a built-in customised Help.
 
In the above example, the default language en-GB (English - Great Britain) is used.  For other languages, use the appropriate language code (e.g., fr-FR, French - France).

In case, if you want less than seven help menu items then keep only the required quantities of addChild functions and delete the rest.  On the other hand, it you want more than seven help menu items then add the required number of additional addChild functions.  While doing this, make sure to adjust the language strings accordingly.

Read 171535 times
Tagged under Developers
Ilagnayeru MIG Manickam

Ilagnayeru MIG Manickam

Mig has been a Joomla enthusiast since 2008.  With 30 years of experience in the field of Information Systems, he contributes to the Joomla community by playing multiple roles: Global Moderator, Member of the Translation coordination Team, Moderator of the Indic Languages forum, Coordinator of the Tamil (India) translation team, and an active participant of Joomla forums.

He loves teaching, reading and writing articles in magazines.  For the past two years, he has been writing a series of articles titled "Let us know America", in Tamil, for a monthly magazine in India.

He strongly believes in giving back to the community.  He is involved in managing non-profit organizations.  In addition, he also builds web-sites for non-profit organizations, gratis.  Currently, he is exploring the opportunities of teaching computer technology to the students in the rural parts of India.

Latest from Ilagnayeru MIG Manickam