Extending the online help

The on-line help script is capable of combining several data sources and presenting them in a unified manner in the window which has two frames that always appears when you click on one of the question mark icons that are visible in the site’s private zone.

  • New in : SPIP 2.1

Principles

The help_server global variable is no longer the single URL of a help directory, but is now a table of such URLs (backwards compatibility has been retained, nonetheless). When help is requested in language "L", SPIP will retrieve all the pages that are named "L-aide.html" that exist at the URLs specified by this global variable and then combine those data together. By default, this global table has a single element, http://www.spip.net/aide, which makes it possible to fall back on normal behaviour, but which can now also be supplemented by other elements.

We will therefore make a declaration in our mes_options.php [1] file for the URL(s) pointing to these new help files.

Example

The objective here is to add a personal help section to the chapter on "Typographic short-cuts" in the on-line help.

In the squelettes/ directory, create the en-aide.html file [2] all written as:

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
<link rel='stylesheet' href='http://www.spip.net/prive/spip_admin.css' type='text/css' />
</head>
<body>
<h2>raccourcis/The typographical short-cuts</h2>
<!-- add customised help -->
<h3 class="spip">My personal short-cuts</h3>
<p style="color:red;">
This is a customised help paragraph about typographical short-cuts.
</p>
<p style="color:navy;">
This is another customised help paragraph.
</p>
<!-- end adding customised help -->
</body>
</html>

-  In the mes_options.php file, declare the URL pointing to the directory that contains this file:// extra URL for where to find the on-line help $GLOBALS['help_server'][] = url_de_base(1) . 'squelettes/';

-  Now, in the normal help screen, clicking on "The typographical short-cuts" in the left-hand menu will display the on-line help text that is the default for spip.net, supplemented (at the end) by the customised text [3].

Entry points in the help menu

In order to be able to hook in extra help, your customised help page will need to be marked up by using one of the sections in the form: <h2>key/menu_title</h2> available on spip.net.

Here is the complete list:

SPIP installation

  • install0/Setting up permissions
  • install1/Your mySQL connection
  • install2/Choosing your database
  • install5/Personal information
  • ftp_auth/Authentication by FTP
  • erreur_mysql/A template problem?

Articles

  • raccourcis/Typographical shortcuts
  • arttitre/Title, top title, subtitle
  • artrub/Selecting the section
  • artdesc/Brief description
  • artchap/Deck
  • artvirt/Redirection of an article
  • arttexte/Text
  • artdate/Date
  • artdate_redac/Date of earlier publishing
  • artauteurs/Authors
  • logoart/Article’s logo
  • artstatut/Article status
  • artprop/Submitting an article

Sections

  • rubhier/Hierarchical structure of the sections
  • rubrub/Selecting a section
  • rublogo/Section’s logo

News items

  • breves/News items
  • brevesrub/Selecting a section
  • breveslien/Hypertext link
  • brevesstatut/News item’s status
  • breveslogo/New’s item’s logo

Images and documents

  • ins_img/Inserting images
  • ins_doc/Attaching documents
  • ins_upload/Installing files via FTP or SSH

Keywords

  • mots/The keywords principle
  • artmots/Keywords
  • motsgroupes/Keyword groups

Referenced sites

  • reference/Referencing a site
  • rubsyn/Syndicated sites
  • artsyn/Syndicated articles
  • confhttpproxy/Using a proxy

Internal messaging

  • messut/Messages between users
  • messpense/Memos
  • messcalen/The calendar
  • messconf/Messaging customisation

Forums follow-up

  • suiviforum/Forums follow-up

The site configuration

  • confnom/Name and URL of your site
  • confart/Articles content
  • confdates/Post-dated articles
  • confforums/Operating the forums
  • confbreves/The news system
  • confmessagerie/Internal messaging
  • confstat/Visits statistics
  • confmails/Automated emailing
  • confmoteur/Integrated search engine [4]

Personal interface customisation

  • intersimple/Simplified / complete interface [5]
  • cookie/The administration cookie
  • deconnect/Disconnect

Advanced uses

  • artmodif/Articles being modified
  • suivimodif/Tracking versions
  • corrortho/Spell checking [6]
  • previsu/Previewing
  • latex/Mathematical formulae
  • confurl/URL address types

SPIP - a free software

  • licence/Licence and conditions of use

Adding an additional block into the left-hand menu

You might also want to add an additional block into the left-hand menu (the block with the title displayed on a green/grey background).
To do so, just add an <h1> </h1> element into our L-aide.html file:

<body>
<h1>Special customised help</h1>
<h2>block_custom1/Help on this element</h2>
<h3 class="spip">How to use this element</h3>
<p>
Insert an explanatory customised paragraph here.
</p>
<p>
Add another customised help paragraph here.
</p>
<h2>block_custom2/Help about another element</h2>
<h3 class="spip">Usage of the second element</h3>
<p>
Another customised help explanation.
</p>
</body>

Filing and organising your help files

If your prefer to organise your additional help files in a particular sub-directory ("my_helpfiles/" for example), you will need to make a declaration in your "mes_options.php" file:
$GLOBALS[’help_server’][] = url_de_base(1) . ’squelettes/my_helpfiles/’;

Please also refer to the #AIDER article.

Footnotes

[1In the context of a plugin (e.g. "myplugin"), we would declare this URL in the myplugin_options.php file. For example:
$GLOBALS[’help_server’][] = url_de_base(1) . str_replace("../", "", _DIR_PLUGIN_MYPLUGIN);
or if you prefer to store your help files in a particular subdirectory:
$GLOBALS[’help_server’][] = url_de_base(1) . str_replace("../", "", _DIR_PLUGIN_MYPLUGIN) . "my_helpfiles/";

[2For multilingual usage, just use the correct corresponding language code: ar-aide.html, en-aide.html, es-aide.html, ...

[3Don’t forget that to see the applied modifications, it is recommended to empty the cache (in order to delete the tmp/cache/aide/ file)

[4abandoned in spip2

[5abandoned in spip2

[6abandoned in spip2

Author Mark Published : Updated : 19/04/23

Translations : عربي, català, English, français, Nederlands, українська