X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=skins%2FCologneBlue.php;h=3b534687a87e0ebd9a8b6ad18a81bb70601d496d;hb=fd3ac84a6b10145fe79a8479bd0e9afc84e3a763;hp=a7c62b317dccf6697bdb4099374e5b765f4dbbfa;hpb=a5b5f90fb956605601bd14aed695c8c962b0d064;p=lhc%2Fweb%2Fwiklou.git
diff --git a/skins/CologneBlue.php b/skins/CologneBlue.php
index a7c62b317d..3b534687a8 100644
--- a/skins/CologneBlue.php
+++ b/skins/CologneBlue.php
@@ -36,7 +36,7 @@ class SkinCologneBlue extends SkinTemplate {
var $useHeadElement = true;
/**
- * @param $out OutputPage
+ * @param OutputPage $out
*/
function setupSkinUserCss( OutputPage $out ) {
parent::setupSkinUserCss( $out );
@@ -47,6 +47,8 @@ class SkinCologneBlue extends SkinTemplate {
/**
* Override langlink formatting behavior not to uppercase the language names.
* See otherLanguages() in CologneBlueTemplate.
+ * @param string $name
+ * @return string
*/
function formatLanguageName( $name ) {
return $name;
@@ -90,21 +92,37 @@ class CologneBlueTemplate extends BaseTemplate {
return "";
}
+ $html = '';
+
// We override SkinTemplate->formatLanguageName() in SkinCologneBlue
// not to capitalize the language names.
$language_urls = $this->data['language_urls'];
- if ( empty( $language_urls ) ) {
- return "";
- }
+ if ( !empty( $language_urls ) ) {
+ $s = array();
+ foreach ( $language_urls as $key => $data ) {
+ $s[] = $this->makeListItem( $key, $data, array( 'tag' => 'span' ) );
+ }
- $s = array();
- foreach ( $language_urls as $key => $data ) {
- $s[] = $this->makeListItem( $key, $data, array( 'tag' => 'span' ) );
+ $html = wfMessage( 'otherlanguages' )->text()
+ . wfMessage( 'colon-separator' )->text()
+ . $this->getSkin()->getLanguage()->pipeList( $s );
}
- return wfMessage( 'otherlanguages' )->text()
- . wfMessage( 'colon-separator' )->text()
- . $this->getSkin()->getLanguage()->pipeList( $s );
+ $html .= $this->renderAfterPortlet( 'lang' );
+
+ return $html;
+ }
+
+ /**
+ * @param string $name
+ */
+ protected function renderAfterPortlet( $name ) {
+ $content = '';
+ wfRunHooks( 'BaseTemplateAfterPortlet', array( $this, $name, &$content ) );
+
+ $html = $content !== '' ? "
$content
" : '';
+
+ return $html;
}
function pageTitleLinks() {
@@ -121,9 +139,9 @@ class CologneBlueTemplate extends BaseTemplate {
/**
* Used in bottomLinks() to eliminate repetitive code.
*
- * @param $key string Key to be passed to makeListItem()
- * @param $navlink array Navlink suitable for processNavlinkForDocument()
- * @param $message string Key of the message to use in place of standard text
+ * @param string $key Key to be passed to makeListItem()
+ * @param array $navlink Navlink suitable for processNavlinkForDocument()
+ * @param string $message Key of the message to use in place of standard text
*
* @return string
*/
@@ -241,8 +259,8 @@ class CologneBlueTemplate extends BaseTemplate {
* and removes the accesskeys. This is necessary to be able to use the same navlink twice,
* e.g. in sidebar and in footer.
*
- * @param $navlink array Navigational link generated by SkinTemplate
- * @param $idPrefix mixed Prefix to add to id of this navlink. If false, id is removed entirely. Default is 'cb-'.
+ * @param array $navlink Navigational link generated by SkinTemplate
+ * @param mixed $idPrefix Prefix to add to id of this navlink. If false, id is removed entirely. Default is 'cb-'.
*/
function processNavlinkForDocument( $navlink, $idPrefix = 'cb-' ) {
if ( $navlink['id'] ) {
@@ -367,9 +385,10 @@ class CologneBlueTemplate extends BaseTemplate {
Title::newFromText( wfMessage( 'aboutpage' )->inContentLanguage()->text() ),
wfMessage( 'about' )->text()
),
- Linker::linkKnown(
- Title::newFromText( wfMessage( 'helppage' )->inContentLanguage()->text() ),
- wfMessage( 'help' )->text()
+ Linker::makeExternalLink(
+ Skin::makeInternalOrExternalUrl( wfMessage( 'helppage' )->inContentLanguage()->text() ),
+ wfMessage( 'help' )->text(),
+ false
),
Linker::linkKnown(
Title::newFromText( wfMessage( 'faqpage' )->inContentLanguage()->text() ),
@@ -390,8 +409,8 @@ class CologneBlueTemplate extends BaseTemplate {
/**
* Adds CologneBlue-specific items to the sidebar: qbedit, qbpageoptions and qbmyoptions menus.
*
- * @param $bar sidebar data
- * @return array modified sidebar data
+ * @param array $bar Sidebar data
+ * @return array Modified sidebar data
*/
function sidebarAdditions( $bar ) {
// "This page" and "Edit" menus
@@ -517,6 +536,8 @@ class CologneBlueTemplate extends BaseTemplate {
$role = ( $heading == 'search' ) ? 'search' : 'navigation';
$s .= "\n$headingHTML\n$listHTML\n
\n";
}
+
+ $s .= $this->renderAfterPortlet( $heading );
}
$s .= "\n";
@@ -524,7 +545,7 @@ class CologneBlueTemplate extends BaseTemplate {
}
/**
- * @param $label string
+ * @param string $label
* @return string
*/
function searchForm( $which ) {