+ # Make the list into text...
+ $creds = $wgLang->listToText( $fulllist );
+
+ # "Based on work by ..."
+ return empty( $creds ) ? '' : wfMsg( 'othercontribs', $creds );
+ }
+
+ /**
+ * Get a link to $user_name page
+ * @param $user User object
+ * @return String: html
+ */
+ protected static function link( User $user ) {
+ global $wgUser, $wgAllowRealName;
+ if( $wgAllowRealName )
+ $real = $user->getRealName();
+ else
+ $real = false;
+
+ $skin = $wgUser->getSkin();
+ $page = $user->getUserPage();
+
+ return $skin->link( $page, htmlspecialchars( $real ? $real : $user->getName() ) );
+ }
+
+ /**
+ * Get a link to $user_name page
+ * @param $user_name String: user name
+ * @param $linkText String: optional display
+ * @return String: html
+ */
+ protected static function userLink( User $user ) {
+ global $wgUser, $wgAllowRealName;
+ if( $user->isAnon() ){
+ return wfMsgExt( 'anonymous', array( 'parseinline' ), 1 );
+ } else {
+ $link = self::link( $user );
+ if( $wgAllowRealName && $user->getRealName() )
+ return $link;
+ else
+ return wfMsgExt( 'siteuser', array( 'parseinline', 'replaceafter' ), $link );
+ }
+ }
+
+ /**
+ * Get a link to action=credits of $article page
+ * @param $article Article object
+ * @return String: html
+ */
+ protected static function othersLink( Article $article ) {
+ global $wgUser;
+ $skin = $wgUser->getSkin();
+ return $skin->link( $article->getTitle(), wfMsgHtml( 'others' ), array(), array( 'action' => 'credits' ), array( 'known' ) );
+ }
+}
\ No newline at end of file