Public Member Functions

ilMWFakery Class Reference

Public Member Functions

 getSkin ()
 makeExternalLink ($url, $text, $escape=true, $linktype= '', $ns=null)
 markNoConversion ($text, $noParse=false)
 addExternalLink ()
 getNamespace ()

Detailed Description

Definition at line 74 of file class.ilMWParserAdapter.php.


Member Function Documentation

ilMWFakery::addExternalLink (  ) 

Definition at line 107 of file class.ilMWParserAdapter.php.

{}

ilMWFakery::getNamespace (  ) 

Definition at line 109 of file class.ilMWParserAdapter.php.

{ return null;}

ilMWFakery::getSkin (  ) 

Definition at line 76 of file class.ilMWParserAdapter.php.

{ return $this;}

ilMWFakery::makeExternalLink ( url,
text,
escape = true,
linktype = '',
ns = null 
)

Definition at line 79 of file class.ilMWParserAdapter.php.

        {
                //$style = $this->getExternalLinkAttributes( $url, $text, 'external ' . $linktype );
                //global $wgNoFollowLinks, $wgNoFollowNsExceptions;
                //if( $wgNoFollowLinks && !(isset($ns) && in_array($ns, $wgNoFollowNsExceptions)) ) {
                //      $style .= ' rel="nofollow"';
                //}
                $url = htmlspecialchars( $url );
                if( $escape ) {
                        $text = htmlspecialchars( $text );
                }
                
                // handle images
                $urlpath = parse_url($url, PHP_URL_PATH);
                $pi = pathinfo($urlpath);
                if (in_array(strtolower($pi["extension"]), array("jpg", "jpeg", "gif", "png")))
                {
                        return '<img src="'.$url.'" border="0" />';
                }
                else
                {
                        return '<a href="'.$url.'" target="_blank">'.$text.'</a>';
                }
                //return '<a href="'.$url.'"'.$style.'>'.$text.'</a>';
        }

ilMWFakery::markNoConversion ( text,
noParse = false 
)

Definition at line 105 of file class.ilMWParserAdapter.php.

{return $text;}


The documentation for this class was generated from the following file: