Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Hidden-Funktion im Mediawiki

Empfohlene Antworten

Veröffentlicht

Hallo alle zusammen, haben da ein kleines Problemchen, ob dies nun in diesen Thread passt, darüber lässt sich streiten. :rolleyes:

Folgendes Problem besteht, im MediaWiki: Seiten die für unbefugte nicht zugänglich sein sollen werden nach Installation eines einfachen Patches (hiddenwiki, nicht die Tor-Variante!) auf eine spezielle Wiki-Seite umgeleitet, wo eine dort erstellte Nachricht angezeit wird. Was uns Kopfzerbrechen bereitet ist sowohl die Grafik, als auch alle Formatierungen am Text werd ausschließlich als Quellcode ausgegeben wird und nicht so wie es soll, bzw. wie in der Vorschau dieser Seite (als Admin). Kennt jemand vielleicht eine Möglichkeit die Grafik richtig ausgeben zu lassen? (Wieso PHP? Weil die Ausgabe dieser Seite über eine PHP-Datei gesteuert wird, die nach Installation des Patches in dem Ordner "\xampp\htdocs\includes" abgelegt wird und sich "OutputPage.php" nennt)

Danke im voraus!

/**

* Produce the stock "please login to use the wiki" page

*/

public function loginToUse() {

global $wgUser, $wgTitle, $wgContLang;

if( $wgUser->isLoggedIn() ) {

$this->permissionRequired( 'read' );

return;

}

$skin = $wgUser->getSkin();

if($wgTitle->getNamespace() >= 100){

$usersNamespaces = $wgUser->getAllowedRNSes();

$usersNamespacesArray = explode("\n", $usersNamespaces);

$currentNamespace = Namespace::getCanonicalName($wgTitle->getNamespace());

if (!in_array($currentNamespace, $usersNamespacesArray)) {

$this->setPageTitle( wfMsg( 'noaccesstitle' ) );

$this->setHtmlTitle( wfMsg( 'errorpagetitle' ) );

$this->setRobotPolicy( 'noindex,nofollow' );

$this->setArticleFlag( false );

$this->addHTML( wfMsgHtml( 'noaccesstext') );

} else {

// Should never reach here.

}

} else {

$this->setPageTitle( wfMsg( 'loginreqtitle' ) );

$this->setHtmlTitle( wfMsg( 'errorpagetitle' ) );

$this->setRobotPolicy( 'noindex,nofollow' );

$this->setArticleFlag( false );

$loginTitle = Title::makeTitle( NS_SPECIAL, 'Userlogin' );

$loginLink = $skin->makeKnownLinkObj( $loginTitle, wfMsgHtml( 'loginreqlink' ), 'returnto=' . $wgTitle->getPrefixedUrl() );

$this->addHtml( wfMsgWikiHtml( 'loginreqpagetext', $loginLink ) );

$this->addHtml( "\n<!--" . $wgTitle->getPrefixedUrl() . "-->" );

# Don't return to the main page if the user can't read it

# otherwise we'll end up in a pointless loop

$mainPage = Title::newFromText( wfMsgForContent( 'mainpage' ) );

if( $mainPage->userCanRead() )

$this->returnToMain( true, $mainPage );

}

}

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.