예제 #1
0
function swbfShowBrowseSemWeb($skintemplate)
{
    if ($skintemplate->data['isarticle']) {
        $browselink = SWBInfolink::newBrowsingLink(wfMsg('swb_browse_semantic_web'), $skintemplate->data['titleprefixeddbkey'], false);
        echo '<li id="t-smwbrowselink">' . $browselink->getHTML() . '</li>';
    }
    return true;
}
	/**
	 * Displays a value, including all relevant links (browse and search by property)
	 *
	 * @param[in] $property SMWPropertyValue  The property this value is linked to the subject with
	 * @param[in] $value SMWDataValue  The actual value
	 * @param[in] $incoming bool  If this is an incoming or outgoing link
	 *
	 * @return string  HTML with the link to the article, browse, and search pages
	 */
	private function displayValue( SMWPropertyValue $property, SMWDataValue $dataValue, $incoming ) {
		$linker = smwfGetLinker();

		$html = $dataValue->getLongHTMLText( $linker );

		// TODO: How to I trigger autoload if extends?
		SMWInfolink::decodeParameters();
		if ( $dataValue->getTypeID() == '_wpg' ) {
			$html .= "&#160;" . SWBInfolink::newBrowsingLink( '+', $dataValue->getLongWikiText() )->getHTML( $linker );
		} elseif ( $incoming && $property->isVisible() ) {
			$html .= "&#160;" . SWBInfolink::newInversePropertySearchLink( '+', $dataValue->getTitle(), $property->getDataItem()->getLabel(), 'smwsearch' )->getHTML( $linker );
		} else {
			$html .= $dataValue->getInfolinkText( SMW_OUTPUT_HTML, $linker );
		}

		return $html;
	}