Adding a type of glossary

It is possible to add links to external glossaries from SPIP using the [?nom] shortcut. By default, the links are made to wikipedia. To create a new glossary link, there is the [?nom#typeNN] syntax available. -* type is a word for the glossary -* NN is an optional numeric identifier. A simple function called glossaire_type() is used to return a particular URL. 2 parameters are passed: the text and the identifier. {{Example:}} A link to the trac source files for SPIP 2.1:
@define('_URL_BROWSER_TRAC', '');
 * A link pointing to trac files
 * [?ecrire/inc_version.php#core]
 * [?ecrire/inc_version.php#coreNNN] // NNN = line number
function glossaire_trac($texte, $id=0) {
	return _URL_BROWSER_TRAC . $texte . ($id ? '#L'.$id : '');

Author Mark Baber Published : Updated : 12/05/17

Translations : English, français, Nederlands