Zikula: A Flexible Open Source Content Management System
home | forum | contact us

Dizkus

Bottom
pnHelp mod - display on defined pages
  • Posted: 19.10.2005, 11:08
     
    InvalidResponse
    rank:
    Professional Professional
    registered:
     September 2003
    Status:
    offline
    last visit:
    21.10.07
    Posts:
    2423
    I added an option to the pnRender plugin that allows a user to define which modules the help link is available from.

    example:


    plugin modification:

    Code

    if($params['modules'] != ''){
    $modules = explode(',',$params['modules']);
      if(!in_array(pnModGetName(),$modules)){
        return;
      }
    }

    add it near the top under the first conditional statement:

    Code

    function smarty_function_pnhelp($params, &$smarty)
    {
      if (!pnModAPILoad('pnhelp', 'help'))
      {
        $smarty->trigger_error('pnhelp: could not load pnhelp API');
        return false;
      }
     
     if($params['modules'] != ''){
    $modules = explode(',',$params['modules']);
      if(!in_array(pnModGetName(),$modules)){
        return;
      }
    }
    ..
    ...
    ....



    maybe it's useful to others as well. more info on the pnHelp module is available from http://www.elfisk.dk

    --
    http://www.invalidresponse.com

Extensions Moderation

Main Menu

Extensions Database

Documentation

Development

Login

Donate to Zikula