PsyCrit/archive/skin

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
< PsyCrit‎ | archive
Revision as of 23:01, 14 December 2017 by Woozle (talk | contribs) (Woozle moved page modified skin for PsyCrit to PsyCrit/archive/skin without leaving a redirect: may have useful info, but needs TLC to be readable)
Jump to navigation Jump to search

Navigation

computing: software: MediaWiki: customization: outward-looking: modified skin

Overview

To create the custom skins for PsyCrit, I copied the "monobook" folder and "MonoBook.php" to "psycrit" and "PsyCrit.php" respectively. Then I edited PsyCrit.php, with the final results as follows.

Contents

<php> <?php /**

* MonoBook nouveau
*
* Translated from gwicke's previous TAL template version to remove
* dependency on PHPTAL.
*
* @todo document
* @package MediaWiki
* @subpackage Skins
*/

if( !defined( 'MEDIAWIKI' ) ) die( -1 );

/** */ require_once('includes/SkinTemplate.php');

/**

* Inherit main code from SkinTemplate, set the CSS and template filter.
* @todo document
* @package MediaWiki
* @subpackage Skins
*/

class SkinPsyCrit extends SkinTemplate { /** Using monobook. */ function initPage( &$out ) { SkinTemplate::initPage( $out ); $this->skinname = 'psycrit'; $this->stylename = 'psycrit'; $this->template = 'PsyCritTemplate'; } }

/**

* @todo document
* @package MediaWiki
* @subpackage Skins
*/

class PsyCritTemplate extends QuickTemplate { /** * Template filter callback for MonoBook skin. * Takes an associative array of data set from a SkinTemplate-based * class, and a wrapper for MediaWiki's localization database, and * outputs a formatted page. * * @access private */ function execute() { // Suppress warnings to prevent notices about missing indexes in $this->data wfSuppressWarnings();

?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> text('lang') ?>" lang="text('lang') ?>" dir="text('dir') ?>"> html('headlinks') ?> <?php $this->text('pagetitle') ?> data['printable']) ) { ?>media="print" href="text('stylepath') ?>/common/commonPrint.css" /> data['jsvarurl' ]) { ?> data['pagecss' ]) { ?> data['usercss' ]) { ?> data['userjs' ]) { ?> data['userjsprev']) { ?> data['trackbackhtml']) print $this->data['trackbackhtml']; ?> html('headscripts') ?> data['body_ondblclick']) { ?>ondblclick="text('body_ondblclick') ?>" data['body_onload' ]) { ?>onload="text('body_onload') ?>" class="text('nsclass') ?> text('dir') ?>">

href="data['nav_urls']['mainpage']['href'])?>" title="msg('mainpage') ?>">
msg('views') ?>
    data['content_actions'] as $key => $tab) { # if ($wgUser->isAllowed($key)) { ? > $tabOk = true; if (($key == 'talk') || ($key == 'edit') || ($key == 'delete') || ($key == 'move')) { switch ($key) { case 'talk': $tabOk = true; break; case 'edit': $userGrps = $wgUser->getGroups(); $tabOk = in_array('sysop', $userGrps); # $tabOk = true; # $tabOk = false; break; case 'delete': $tabOk = $wgUser->isAllowed('delete'); # $tabOk = true; break; case 'move': $tabOk = $wgUser->isAllowed('move'); # $tabOk = true; break; } } if ($tabOk) { ?>
  • class="">
  • */ // 2006-07-26 NEW CODE FOR JUST SHOWING JERS TABS // yes, there's a better way to do this which makes it easier to edit the tabs, // but I don't have time to figure it out now. $title = $this->data['title']; $kSelected = ' class="selected"'; switch ($title) { case 'Introduction': $class_Home = $kSelected; break; case 'About PsyCrit': $class_About = $kSelected; break; case 'Articles': $class_Main = $kSelected; break; case 'Instructions to Authors': $class_Auth = $kSelected; break; } ?> >introduction >about PsyCrit >articles >instructions to authors
data['sitenotice']) { ?>
html('sitenotice') ?>

data['displaytitle']!=""?$this->text('title'):$this->html('title') ?>

msg('tagline') ?>

html('subtitle') ?>
data['undelete']) { ?>
html('undelete') ?>
data['newtalk'] ) { ?>
html('newtalk') ?>
data['showjumplinks']) { ?> html('bodytext') ?> data['catlinks']) { ?>
data['poweredbyico']) { ?>
html('poweredbyico') ?>
data['copyrightico']) { ?>
html('copyrightico') ?>
html('reporttime') ?> <?php wfRestoreWarnings(); } // end of execute() method } // end of class ?> </php>