4 thoughts on “Mediawiki Acronyms

  1. Pingback: Openpedia.org

  2. Pingback: rodrigoeiras.eti.br

  3. TESSIER

    Hi,

    I use the terminology plug-in but i have an issue that i can’t resolve.

    In the terminology i need to declare some word which bigin with no ascii letter i.e. “éèâï” etc…

    Terminology can’t find them in my pages.

    for exemple :

    ;échalotte:blablabla

    don’t match

    I try to make some change and add a compare test after the following line like above, with utf8_encode/decode or ucfirst but this never match.

    function terminologyParseThisNode($doc, $node, $term, $definition) {
    $changed = false;
    if ($node->nodeType == XML_TEXT_NODE) {
    $texts = preg_split(‘/\b(‘.preg_quote($term).’s?)\b/ui’, $node->textContent, -1, PREG_SPLIT_DELIM_CAPTURE);

    //here the test i add
    if (strstr($node->textContent,utf8_maj_fr($term)) && empty($texts[1]) === true) {
    $texts[0] = “”;
    $texts[1] = $term;
    $texts[2] = “”;
    }
    //end of the test

    if (count($texts) > 1) {
    $container = $doc->createElement(‘span’);
    ….

    function utf8_maj_fr($mot) {
    $mot = utf8_decode($mot);
    $mot = trim($mot);
    return $mot;
    }

    If you have some tips for my issue.

    Thanks a lot!

Leave a Reply

Your email address will not be published. Required fields are marked *