currentItem = &$data["item"];
$this->currentItem->body = NP_MySpaceLink::MySpaceLink( $this->currentItem->body );
$this->currentItem->more = NP_MySpaceLink::MySpaceLink( $this->currentItem->more );
}
function MySpaceLink( $text ) {
$links = preg_match_all( "/({{.+?}})/", $text, $myspace, PREG_SET_ORDER );
for( $i=0; $i<$links; $i++ ) {
$link = preg_match( "/^{{(.+?)}}$/", $myspace[$i][0], $item );
$split = explode( "|", $item[1] );
if ( count($split) == 2 ) {
$linkage = "$split[1]";
} else {
$linkage = "$split[0]";
}
$text = str_replace( $item[0], $linkage, $text );
}
return($text);
}
}
?>