ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
ilMWFakery Class Reference
+ Collaboration diagram for ilMWFakery:

Public Member Functions

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

Detailed Description

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

Member Function Documentation

◆ addExternalLink()

ilMWFakery::addExternalLink ( )

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

110{}

◆ getNamespace()

ilMWFakery::getNamespace ( )

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

112{ return null;}

◆ getSkin()

ilMWFakery::getSkin ( )

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

79{ return $this;}

◆ makeExternalLink()

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

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

83 {
84 //$style = $this->getExternalLinkAttributes( $url, $text, 'external ' . $linktype );
85 //global $wgNoFollowLinks, $wgNoFollowNsExceptions;
86 //if( $wgNoFollowLinks && !(isset($ns) && in_array($ns, $wgNoFollowNsExceptions)) ) {
87 // $style .= ' rel="nofollow"';
88 //}
89 $url = htmlspecialchars( $url );
90 if( $escape ) {
91 $text = htmlspecialchars( $text );
92 }
93
94 // handle images
95 $urlpath = parse_url($url, PHP_URL_PATH);
96 $pi = pathinfo($urlpath);
97 if (in_array(strtolower($pi["extension"]), array("jpg", "jpeg", "gif", "png")))
98 {
99 return '<img src="'.$url.'" border="0" />';
100 }
101 else
102 {
103 return '<a href="'.$url.'" target="_blank" rel="noopener">'.$text.'</a>';
104 }
105 //return '<a href="'.$url.'"'.$style.'>'.$text.'</a>';
106 }
$text
$url
Definition: shib_logout.php:72

References $text, and $url.

◆ markNoConversion()

ilMWFakery::markNoConversion (   $text,
  $noParse = false 
)

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

108{return $text;}

References $text.


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