Extension talk:WikiSkin

From mediawiki.org
Latest comment: 15 years ago by Oliver cfc in topic Side bar problem

2007[edit]

Demo available?[edit]

Has anyone an more detailed demo or description for setting up the wikiskin?

It's still in beta state, but is working ok, just save the code into a file and include the file from your localsettings.php, but make sure your skin article is created first (the name of the article is set in $wgWikiSkin, the default name for the article is WikiSkin). OrganicDesign and our other wikis use it, OrganicDesign:Default-skin is the $wgWikiSkin article on it. We're just using it to replicate the standard monobook layout currently, but it's been developed for use with Extension:Wiklets which is a desktop-like skin where different articles and forms work like windows on a desktop. --Nad 21:50, 14 May 2007 (UTC)Reply[reply]

Installation problems[edit]

  • I downloaded Wikiskin.php from organic.design homepage saying it was version 0.1.7, 2007-07-20 in the php-Sourcecode.
  • in the Wiki I added a page named default-skin and another one named wikiskin
  • I also addied a MediaWiki:Common.css and a MediaWiki:Wikiskin.css
  • in the local settings php I added
require_once( "extensions/Wikiskin/Wikiskin.php" );

These were actualy the installation requirements I found in various pages on organic design and so on...

When now reloading any page of my wiki after this I get an visibly empty page which html-source-content looks like this

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
				<meta name="keywords" content="Main Page" />
		<link rel="stylesheet" type="text/css" media="screen, projection" href="/m3/extensions/SemanticMediaWiki/skins/SMW_custom.css" />
		<link rel="alternate" type="application/rdf+xml" title="Main Page" href="http://localhost/m3/index.php/Special:ExportRDF/Main_Page?xmlmime=rdf" />
		<link rel="shortcut icon" href="/favicon.ico" />
		<link rel="search" type="application/opensearchdescription+xml" href="/m3/opensearch_desc.php" title="PersonalWiki (English)" />
		<title>Main Page - PersonalWiki</title>

		<meta http-equiv="imagetoolbar" content="no" />
		<script type="text/javascript">var skin = 'wikiskin';var stylepath = '/m3/skins';</script>
		<script type="text/javascript" src="/m3/skins/common/wikibits.js"><!-- wikibits js --></script>
		<script type="text/javascript" src="/m3/index.php?title=-&action=raw&smaxage=0&gen=js"><!-- site js --></script>
		<style type="text/css">/*<![CDATA[*/
@import "/m3/index.php?title=MediaWiki:Common.css&usemsgcache=yes&action=raw&ctype=text/css&smaxage=18000";
@import "/m3/index.php?title=MediaWiki:Wikiskin.css&usemsgcache=yes&action=raw&ctype=text/css&smaxage=18000";
@import "/m3/index.php?title=-&action=raw&gen=css&maxage=18000&smaxage=0";
/*]]>*/</style>
		<!-- Head Scripts -->
				<script type="text/javascript">
			function toggleTreeviewItem(id) {
			var plus   = "/m3/images/Treeview/Plus.gif";
			var minus  = "/m3/images/Treeview/Minus.gif";
			var opened = "/m3/images/Treeview/Folder_opn_sml_blu.gif";
			var closed = "/m3/images/Treeview/Folder_sml_blu.gif";
			var doc    = "/m3/images/Treeview//Doc-icon.gif";
			var item   = document.getElementById(id);
			var next   = document.getElementById(id+1);
			var depth  = 0+item.getAttribute("depth");
			var close  = next.style.display != "none";
			var img    = document.getElementById("tree-img-"+id);
			var fld    = document.getElementById("tree-fld-"+id);
			fld.setAttribute("src",close ? closed : opened);
			img.setAttribute("src",close ? plus : minus);
			while ((item = document.getElementById(++id)) && (0+item.getAttribute("depth") > depth)) {
				if (close) item.style.display = "none";
				else if (depth == item.getAttribute("depth")-1) {
					item.style.display = "";
					if (img = document.getElementById("tree-img-"+id)) img.setAttribute("src",plus);
					if (fld = document.getElementById("tree-fld-"+id))
						if (fld.getAttribute("src") == opened) fld.setAttribute("src",closed);
					}
				}
			}</script>		<script type="text/javascript" src="http://localhost/m3/extensions/Javascript/mootools.js"></script>

		<script type="text/javascript" src="http://localhost/m3/extensions/Javascript/dragiframe.js"></script>
		<script type="text/javascript" src="http://localhost/m3/extensions/Javascript/table.js"></script>
		<script type="text/javascript" src="http://localhost/m3/extensions/Javascript/mktree.js"></script>
		<script type="text/javascript" src="/m3/extensions/SemanticMediaWiki/skins/SMW_tooltip.js"></script>		<script type="text/javascript" id="SMW_sorttable_script_inclusion" src="/m3/extensions/SemanticMediaWiki/skins/SMW_sorttable.js"></script>		<script type="text/javascript" src="/m3/extensions/SemanticMediaWiki/skins/SimileTimeline/timeline-api.js"></script>		<script type="text/javascript" src="/m3/extensions/SemanticMediaWiki/skins/SMW_timeline.js"></script>	</head>

<body  class="ns-0 ltr">
<a name="top" id="top"></a>
<script type="text/javascript"> if (window.runOnloadHook) runOnloadHook();</script>
<!-- Served by localhost in 0.715 secs. --></body></html>

Whe commenting out the aboven mention line in LocalSettings.php everything look "normal" again besides wikiskin obviously is not running then.

Any suggestions welcome. regards emwede

You haven't defined an article for your skin such as the monobook example in the instructions. By default the skin article should be called "WikiSkin", but you can change this article name by setting $wgWikiSkinArticle --Nad 22:43, 23 July 2007 (UTC)Reply[reply]
Thanks Nad I'm awfully sorry, but it was just an information overflow I had, there were so many names mentioned for those variable in the documentation (including $xwWiksing, $wgWikiskin, that I obviously missed the $wgWikiSkinArticle.

Toolbox[edit]

Another question arises from the Default-skin you provided on Organig Design, which I took myself for an example and where you removed the "editing-Toolbar-Buttons". Actualy my users would expect me to give them better more than less of those. Could you probably state/give an example if there is a "MAG_" to reinstall them?

regards emwede

That's a good point, I'll add magic words for those soon. Meanwhile, you can add most of the toolbox functionality into the skin like the following example from organicdesign. --Nad 23:02, 24 July 2007 (UTC)Reply[reply]
<div class="portlet" id="p-tb"><h5>toolbox</h5><div class="pBody">
*[{{SERVER}}/Special:EmailArticle/{{FULLPAGENAMEE}} Send to email]
*[{{SERVER}}/wiki/index.php?title=Special:Whatlinkshere&target={{FULLPAGENAMEE}} What links here]
</div></div>

The surrounding div stuff makes the list into the proper monobook toolbox style

Sorry Nad for beeing vague again. For what I mean, the resulting HTML-Sourcecode must look somewhat more like this part from monobook (Your above code doesn't give me this - at least not in my env):
<div id='toolbar'>
<script type='text/javascript'>
/*<![CDATA[*/
addButton('/skins-1.5/common/images/button_bold.png','Bold text','\'\'\'','\'\'\'','Bold text','mw-editbutton-bold');
addButton('/skins-1.5/common/images/button_italic.png','Italic text','\'\'','\'\'','Italic text','mw-editbutton-italic');
addButton('/skins-1.5/common/images/button_link.png','Internal link','[[',']]','Link title','mw-editbutton-link');
addButton('/skins-1.5/common/images/button_extlink.png','External link (remember http:// prefix)','[',']','http://www.example.com link title','mw-editbutton-extlink');
addButton('/skins-1.5/common/images/button_headline.png','Level 2 headline','\n== ',' ==\n','Headline text','mw-editbutton-headline');
addButton('/skins-1.5/common/images/button_image.png','Embedded image','[[Image:',']]','Example.jpg','mw-editbutton-image');
addButton('/skins-1.5/common/images/button_media.png','Media file link','[[Media:',']]','Example.ogg','mw-editbutton-media');
addButton('/skins-1.5/common/images/button_math.png','Mathematical formula (LaTeX)','<math>','<\/math>','Insert formula here','mw-editbutton-math');
addButton('/skins-1.5/common/images/button_nowiki.png','Ignore wiki formatting','<nowiki>','<\/nowiki>','Insert non-formatted text here','mw-editbutton-nowiki');
addButton('/skins-1.5/common/images/button_sig.png','Your signature with timestamp','--~~~~','','','mw-editbutton-signature');
addButton('/skins-1.5/common/images/button_hr.png','Horizontal line (use sparingly)','\n----\n','','','mw-editbutton-hr');
/*]]>*/
</script>
</div>

Any suggestions welcome emwede

Aw right, the editing buttons aren't showing up for some other reason because those are defined in the JS not in the skin... I'll try and look into that soon as well. --Nad 05:53, 30 July 2007 (UTC)Reply[reply]

2008[edit]

Side bar problem[edit]

I followed the guide on installing this but the contents of my Navigation article don't get displayed properly in the left hand column.

For example, if my Navigation article looks like this:

one
* two
three
* four
five

the side column will actually show:

* two
* four

but the bullet points will be folder icons (thats not really a problem).

What's really weird is that the Navigation article does render correctly if I preview it and also if I view the MediaWiki:MySkin article

Any idea whats going on and why only bulleted items show up?

Oliver cfc 18:58, 28 February 2008 (UTC)Reply[reply]

What versions, URL etc? --Nad 20:00, 28 February 2008 (UTC)Reply[reply]
  • MediaWiki: 1.11.1
  • PHP: 5.2.5-p20080206-pl3-gentoo (apache2handler)
  • MySQL: 5.0.54-log
  • Extensions
    • ParserFunctions
    • Treeview4 (version 4.0.9, 2007-12-29)
    • WikiSkin (version 0.1.12, 2007-10-16)

The wiki is on an intranet.

I've got it now - originally, I played around with an article called MediaWiki:WikiSkin but then changed to MediaWiki:MySkin but it looks like I defined the new skin incorrectly in LocalSettings.php as it was like a weird merge of WikiSkin and MySkin. Looks good now though (using WikiSkin) --Oliver cfc 21:19, 28 February 2008 (UTC)Reply[reply]