ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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 59 of file class.ilMWParserAdapter.php.

Member Function Documentation

◆ addExternalLink()

ilMWFakery::addExternalLink ( )

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

96  {
97  }

◆ getNamespace()

ilMWFakery::getNamespace ( )

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

100  {
101  return null;
102  }

◆ getSkin()

ilMWFakery::getSkin ( )

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

62  {
63  return $this;
64  }

◆ makeExternalLink()

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

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

References $text, $url, and array.

68  {
69  //$style = $this->getExternalLinkAttributes( $url, $text, 'external ' . $linktype );
70  //global $wgNoFollowLinks, $wgNoFollowNsExceptions;
71  //if( $wgNoFollowLinks && !(isset($ns) && in_array($ns, $wgNoFollowNsExceptions)) ) {
72  // $style .= ' rel="nofollow"';
73  //}
74  $url = htmlspecialchars($url);
75  if ($escape) {
76  $text = htmlspecialchars($text);
77  }
78 
79  // handle images
80  $urlpath = parse_url($url, PHP_URL_PATH);
81  $pi = pathinfo($urlpath);
82  if (in_array(strtolower($pi["extension"]), array("jpg", "jpeg", "gif", "png"))) {
83  return '<img src="' . $url . '" border="0" />';
84  } else {
85  return '<a href="' . $url . '" target="_blank" rel="noopener">' . $text . '</a>';
86  }
87  //return '<a href="'.$url.'"'.$style.'>'.$text.'</a>';
88  }
$text
Definition: errorreport.php:18
Create styles array
The data for the language used.
$url

◆ markNoConversion()

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

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

References $text.

91  {
92  return $text;
93  }
$text
Definition: errorreport.php:18

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