getText(); $img = new Image( $nt ); $imgName = $img->getName(); $found = $img->getURL(); if (!is_null($alt) && ( $alt == 'RTENOTITLE' )) { //2223 $alt = ''; } if ($found) { //trick to get real Url for image: $originalLink = strip_tags(Linker::makeImageLinkObj($nt, $label, $alt, $align , $params , $framed , $thumb , $manual_thumb , $valign ), ""); $srcPart = substr($originalLink, strpos($originalLink, "src=")+ 5); $url = strtok($srcPart, '"'); } $ret = "getText(); $img = new Image( $nt ); $imgName = $img->getName(); $found = $img->getURL(); if (!empty($frameParams['alt']) && $frameParams['alt'] == 'RTENOTITLE' ){ //2223 $frameParams['alt'] = ''; } if ($found) { $linker = new Linker(); $originalLink = $linker->makeImageLink2( $nt, $file, $frameParams, $handlerParams); if (false !== strpos($originalLink, "src=\"")) { $srcPart = substr($originalLink, strpos($originalLink, "src=")+ 5); $url = strtok($srcPart, '"'); } $srcPart = substr($originalLink, strpos($originalLink, "src=")+ 5); $url = strtok($srcPart, '"'); } // Shortcuts $fp =& $frameParams; $hp =& $handlerParams; if (!isset($fp['align'])) { $fp['align'] = ''; } $ret = "isExternal() ) { $args = ''; $u = $nt->getFullURL(); $link = $nt->getPrefixedURL(); if ( '' == $text ) { $text = $nt->getPrefixedText(); } $style = $this->getInterwikiLinkAttributes( $link, $text, 'extiw' ); $inside = ''; if ( '' != $trail ) { $m = array(); if ( preg_match( '/^([a-z]+)(.*)$$/sD', $trail, $m ) ) { $inside = $m[1]; $trail = $m[2]; } } if( $text == 'RTENOTITLE' ) { //2223 $text = $u = $link; $args .= '_fcknotitle="true" '; } $t = "{$text}{$inside}"; wfProfileOut( __METHOD__ ); return $t; } return Linker::makeLinkObj($nt, $text, $query, $trail, $prefix); } function makeColouredLinkObj( $nt, $colour, $text = '', $query = '', $trail = '', $prefix = '' ) { if($colour != ''){ $style = $this->getInternalLinkAttributesObj( $nt, $text, $colour ); } else $style = ''; return $this->makeKnownLinkObj( $nt, $text, $query, $trail, $prefix, '', $style ); } function makeKnownLinkObj( $nt, $text = '', $query = '', $trail = '', $prefix = '' , $aprops = '', $style = '' ) { $fname = 'FCKeditorSkin::makeKnownLinkObj'; wfProfileIn( $fname ); $args = ''; if ( !is_object( $nt ) ) { wfProfileOut( $fname ); return $text; } //$u = $nt->escapeLocalURL( $query ); $u = $nt->getFullText(); //#Updating links tables -> #Updating_links_tables $u = str_replace("#".$nt->getFragment(), $nt->getFragmentForURL(), $u); if ( $nt->getFragment() != '' ) { if( $nt->getPrefixedDbkey() == '' ) { $u = ''; if ( '' == $text ) { $text = htmlspecialchars( $nt->getFragment() ); } } /* * See tickets 1386 and 1690 before changing anything */ if( $nt->getPartialUrl() == '' ) { $u .= $nt->getFragmentForURL(); } } if ( $text == '' ) { $text = htmlspecialchars( $nt->getPrefixedText() ); } if ($nt->getNamespace() == NS_CATEGORY) { $u = ':' . $u; } list( $inside, $trail ) = Linker::splitTrail( $trail ); $title = "{$prefix}{$text}{$inside}"; $u = preg_replace("/^RTECOLON/", ":", $u); //change 'RTECOLON' => ':' if( substr($text, 0, 10) == 'RTENOTITLE' ){ //starts with RTENOTITLE $args .= '_fcknotitle="true" '; $title = $u; $trail = substr($text, 10).$trail; } $r = "{$title}{$trail}"; wfProfileOut( $fname ); return $r; } function makeBrokenLinkObj( $nt, $text = '', $query = '', $trail = '', $prefix = '' ) { # Fail gracefully if ( ! isset($nt) ) { # throw new MWException(); return "{$prefix}{$text}{$trail}"; } $args = ''; $fname = 'FCKeditorSkin::makeBrokenLinkObj'; wfProfileIn( $fname ); $u = $nt->getFullText(); //#Updating links tables -> #Updating_links_tables $u = str_replace("#".$nt->getFragment(), $nt->getFragmentForURL(), $u); if ( '' == $text ) { $text = htmlspecialchars( $nt->getPrefixedText() ); } if ($nt->getNamespace() == NS_CATEGORY) { $u = ':' . $u; } list( $inside, $trail ) = Linker::splitTrail( $trail ); $title = "{$prefix}{$text}{$inside}"; $u = preg_replace("/^RTECOLON/", ":", $u); //change 'RTECOLON' => ':' if( substr($text, 0, 10) == 'RTENOTITLE' ){ //starts with RTENOTITLE $args .= '_fcknotitle="true" '; $title = $u; $trail = substr($text, 10).$trail; } $s = "{$title}{$trail}"; wfProfileOut( $fname ); return $s; } function makeSelfLinkObj( $nt, $text = '', $query = '', $trail = '', $prefix = '' ) { $args = ''; if ( '' == $text ) { $text = $nt->mDbkeyform; } list( $inside, $trail ) = Linker::splitTrail( $trail ); $title = "{$prefix}{$text}"; if( $text == 'RTENOTITLE' ){ //2223 $args .= '_fcknotitle="true" '; $title = $nt->mDbkeyform; } return "mDbkeyform."\" class=\"selflink\">{$title}{$inside}{$trail}"; } /** * Create a direct link to a given uploaded file. * * @param $title Title object. * @param $text String: pre-sanitized HTML * @return string HTML * * @public * @todo Handle invalid or missing images better. */ function makeMediaLinkObj( $title, $text = '' ) { if( is_null( $title ) ) { ### HOTFIX. Instead of breaking, return empty string. return $text; } else { $args = ''; $orginal = $title->getPartialURL(); // Mediawiki 1.11 if ( function_exists('wfFindFile') ) { $img = wfFindFile( $title ); if( $img ) { $url = $img->getURL(); $class = 'internal'; } else { $upload = SpecialPage::getTitleFor( 'Upload' ); $url = $upload->getLocalUrl( 'wpDestFile=' . urlencode( $title->getDbKey() ) ); $class = 'new'; } } // Mediawiki 1.10 else { $img = new Image( $title ); if( $img->exists() ) { $url = $img->getURL(); $class = 'internal'; } else { $upload = SpecialPage::getTitleFor( 'Upload' ); $url = $upload->getLocalUrl( 'wpDestFile=' . urlencode( $img->getName() ) ); $class = 'new'; } } $alt = htmlspecialchars( $title->getText() ); if( $text == '' ) { $text = $alt; } $orginal = preg_replace("/^RTECOLON/", ":", $orginal); //change 'RTECOLON' => ':' if( $text == 'RTENOTITLE' ){ //2223 $args .= '_fcknotitle="true" '; $text = $orginal; $alt = $orginal; } return "{$text}"; } } function makeExternalLink( $url, $text, $escape = true, $linktype = '', $ns = null ) { $url = htmlspecialchars( $url ); if( $escape ) { $text = htmlspecialchars( $text ); } $url = preg_replace("/^RTECOLON/", ":", $url); //change 'RTECOLON' => ':' if ($linktype == 'autonumber') { return '[n]'; } $args = ''; if( $text == 'RTENOTITLE' ){ //2223 $args .= '_fcknotitle="true" '; $text = $url; } return ''.$text.''; } function __call( $m, $a) { return call_user_func_array( array( $this->skin, $m ), $a ); } function __construct( &$skin ) { $this->skin = $skin; } }