Not logged in. · Lost password · Register
Forum: General Help and Support Development RSS
Patch to make nolink the default for images
Avatar
fridgefreezer #1
Member since May 2016 · 2 posts
Group memberships: Members
Show profile · Link to this post
Subject: Patch to make nolink the default for images
I thought I'd share this as it frustrates the heck out of me that the default action for images is not "nolink" unless explicitly forced.

In wiki/inc/parser/handler.php - line #772:

    //get linking command
    if(preg_match('/nolink/i',$param)){
        $linking = 'nolink';
    }else if(preg_match('/direct/i',$param)){
        $linking = 'direct';
    }else if(preg_match('/linkonly/i',$param)){
        $linking = 'linkonly';
    }else if(preg_match('/details/i',$param)){
        $linking = 'details';
    }else{
        $linking = 'nolink';
    }

I don't have time to work out how to submit this officially etc. so if someone wants to do so that would be great.

If I had more time I'd tie the default action to a setting in the config page but this serves my purpose.

Hope this helps someone.
Avatar
cziehr #2
Member since Jan 2011 · 634 posts · Location: 10119 Berlin
Group memberships: Members
Show profile · Link to this post
As everybody has special needs for the own wiki, I don't think that the default behavior will be changed, because then somebody else is frustrated who likes the setting which is default at the moment.

Be aware that your patch will not survive an upgrade of the wiki and you will have to apply the patch again after that.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2019-12-14, 00:20:07 (UTC +01:00)