ILIAS  Release_4_1_x_branch Revision 61804
 All Data Structures Namespaces Files Functions Variables Groups Pages
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

ilMWFakery::addExternalLink ( )

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

{}
ilMWFakery::getNamespace ( )

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

{ return null;}
ilMWFakery::getSkin ( )

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

{ return $this;}
ilMWFakery::makeExternalLink (   $url,
  $text,
  $escape = true,
  $linktype = '',
  $ns = null 
)

Definition at line 82 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 108 of file class.ilMWParserAdapter.php.

{return $text;}

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