[dokuwiki] Re: general NoLink on images

  • From: "Maciej Łebkowski" <m.lebkowski@xxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Tue, 24 Jun 2008 16:14:27 +0200

On Tue, Jun 24, 2008 at 15:45, Gerry Weißbach
<gerry.w@xxxxxxxxxxxxxxxxxx> wrote:
> do you know if there is a way that every image rendered by DW comes
> without a link, as the nolink option does - so to say to revers the
> current behavior? If there is currently no option - how about
> introducing one or can that be solved by an action plugin that does more
> than hard-replace the outputed xhtml ?

Quick fix that changes the default rendering:

./inc/parser/handler.php, line 694
        $linking = 'details';

Changes into:
        $linking = 'nolink';


A little slower fix:

    } else {
        $linking = 'details';
    }

Turns into:

    } else if(preg_match('/details/i', $param)) {
        $linking = 'details';
    } else if (isset($conf['default_linking'])) {
        $linking = $conf['default_linking'];     // new config
variable will be used
    } else {
        $linking = 'nolink';   // if not set, use this global, hardcoded default
    }


Needs a "global $conf" instruction at the begining of function body for
the config variable to work.

-- 
Maciej Łebkowski, http://lebkowski.info/kontakt.php
?.Z)"?¨Ľ?x%?Ëf˘ˇ˘?úśm§˙đ?HŹŚX­nś˘??ŕ˙¤?f˘?)ŕ?+-

Other related posts: