Difference between revisions of "Extension talk:Wikiskin.php"

From Organic Design wiki
m
m (Setup Questions)
 
(17 intermediate revisions by 5 users not shown)
Line 14: Line 14:
 
*Regexp
 
*Regexp
  
==Installation problems==
+
see [[MW:Extension talk:WikiSkin]]
  
* I downloaded Wikiskin.php from organic.design homepage saying it was version 0.1.7, 2007-07-20 in the php-Sourcecode.
+
== Edit icons ==
* 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 LocalSettings.php I added
 
<pre>require_once( "extensions/Wikiskin/Wikiskin.php" );</pre>
 
  
These were actualy the installation requirements I found in various pages on organic design and so on...
+
I like this extension becasue it enables the use Treeviews and I have a complex nested subject taxonomy, 
  
When now reloading any page of my wiki after this I get an visibly empty page which html-source-content looks like this
+
===Suggestions===
 +
It would be very nice to see the edit icons when editing a pages.
 +
 
 +
===FCKeditor===
 +
I am also trying to get [http://mediawiki.fckeditor.net/index.php/FCKeditor_integration_guide Mediawiki FCKeditor extension] to work on my site.
 +
Next step would be have Wikiskins, Treeveiws and FCKeditor working together
 +
 
 +
==Talk continues==
 +
Made a new article called [[Blog-skin]], and trying to activate it with [http://www.organicdesign.co.nz/News?skin=Blog-skin this URL]. Checking out the [[Extension:Wikiskin.php|extention code]], seems this line is defaulting to WikiSkin as the skin article.
 
<pre>
 
<pre>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
$wgWikiSkinArticle = isset($_REQUEST['skin']) ? $_REQUEST['skin'] : 'WikiSkin';
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
+
</pre>
<head>
+
But this article does not exist. Is $wgWikiSkinArticle set in LocalSettings?
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+
--[[User:Rob|Rob]] 22:48, 16 September 2007 (NZST)
<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" />
+
== Setup Questions ==
<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=-&amp;action=raw&amp;smaxage=0&amp;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>
+
Hello and thank you for such an interesting extension. I am trying to get this running on my wiki, but I am having some issues.
<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">
+
I've loaded the extension, activated it in localsettings, and added the recommended Mediawiki:WikiSkin article. However, when I view pages, they all look like the classic skin layout instead of the Monobook layout. I noticed in the WikiSkin article that it references the division IDs of "column-content", "content", "bodyContent", and "column-one". On my wiki, these are defined in /skins/monobook/main.css, and it is this definition that makes the columns appear where they do in Monobook. However, I can't see where your extension is loading /skins/monobook/main.css and I can't see where else it might be loading these division specifications to show a skin which behaves like monobook.
<a name="top" id="top"></a>
 
<script type="text/javascript"> if (window.runOnloadHook) runOnloadHook();</script>
 
<!-- Served by localhost in 0.715 secs. --></body></html>
 
  
 +
Also, is it possible to have this extension only activate if a user has a certain skin selected in their preferences? I'd like to test this without affecting all of my users. It seems to me that this might be doable with a small change in the function wfApplyWikiSkin and a dummy WikiSkin skin created to make WikiSkin show as an option in preferences.
  
</pre>
+
Thank you!
  
 +
- [[User:Tdoyle|Tdoyle]] 07:28, 4 November 2007 (NZDT)
  
Whe commenting out the aboven mention line in LocalSettings.php everything look "normal" again besides wikiskin obviously is not running then.
+
P.S. I think I figured it out - the solution appears to be to copy the contents of /skins/monobook/main.css as well as any content at Mediawiki:Monobook.css to Mediawiki:WikiSkin.css.
 +
:Have a look at [[Freelance]] for an example. --[[User:Rob|Rob]] 09:51, 4 November 2007 (NZDT)
 +
::Yes, the purpose of wikiskin is to allow all skin features (content and CSS) to be defined in-wiki. I'll eventually add the ability to turn wikiskin on or off from preferences, but for now you could add a hack into the ''wfSetupWikiSkin'' function which bails if the user isn't you,
 +
<php>
 +
global $wgUser;
 +
if ($wgUser->getName() != 'You') return;
 +
</php>
  
Any suggestions welcome.
+
== Example broken ==
regards emwede
+
Looks like the [{{fullurl:Freelance/Demo|skin=Freelance}} example here] has stopped working. Seems to be ignoring the ''skin'' key. --[[User:Rob|Rob]] 09:56, 4 November 2007 (NZDT)
 +
:Fixed - it was when LocalSettings was re-organised the skin setting got put after the wikiskin extension include, but should be before. --[[User:Nad|Nad]] 10:38, 4 November 2007 (NZDT)

Latest revision as of 21:45, 3 November 2007

Where can I see a page that uses this extension? --Rob 14:58, 6 Apr 2007 (NZST)

I'm testing it on WikiFS: --Nad 15:01, 6 Apr 2007 (NZST)

Has anyone an more detailed demo or description for setting up the wikiskin? --User:nope 14.5.2007

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 MW: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)

Brilliant! Question: Why did you decide to put the skin variables like {{ACTIONS}} into the global MediaWiki variable namespace instead of using wikiskin-specific tags along the lines of @@ACTIONS@@? Ehartwell 00:07, 11 July 2007 (NZST)

I want them to be expanded by the wiki-parser as usual, so they need to be either mediawiki variables or parser-functions. --Nad 09:41, 11 July 2007 (NZST)

Private wiki & Public www

See Maintaining websites with a wiki

Propsed variables to add

  • Anonymous
  • Regexp

see MW:Extension talk:WikiSkin

Edit icons

I like this extension becasue it enables the use Treeviews and I have a complex nested subject taxonomy,

Suggestions

It would be very nice to see the edit icons when editing a pages.

FCKeditor

I am also trying to get Mediawiki FCKeditor extension to work on my site. Next step would be have Wikiskins, Treeveiws and FCKeditor working together

Talk continues

Made a new article called Blog-skin, and trying to activate it with this URL. Checking out the extention code, seems this line is defaulting to WikiSkin as the skin article.

$wgWikiSkinArticle = isset($_REQUEST['skin']) ? $_REQUEST['skin'] : 'WikiSkin';

But this article does not exist. Is $wgWikiSkinArticle set in LocalSettings? --Rob 22:48, 16 September 2007 (NZST)

Setup Questions

Hello and thank you for such an interesting extension. I am trying to get this running on my wiki, but I am having some issues.

I've loaded the extension, activated it in localsettings, and added the recommended Mediawiki:WikiSkin article. However, when I view pages, they all look like the classic skin layout instead of the Monobook layout. I noticed in the WikiSkin article that it references the division IDs of "column-content", "content", "bodyContent", and "column-one". On my wiki, these are defined in /skins/monobook/main.css, and it is this definition that makes the columns appear where they do in Monobook. However, I can't see where your extension is loading /skins/monobook/main.css and I can't see where else it might be loading these division specifications to show a skin which behaves like monobook.

Also, is it possible to have this extension only activate if a user has a certain skin selected in their preferences? I'd like to test this without affecting all of my users. It seems to me that this might be doable with a small change in the function wfApplyWikiSkin and a dummy WikiSkin skin created to make WikiSkin show as an option in preferences.

Thank you!

- Tdoyle 07:28, 4 November 2007 (NZDT)

P.S. I think I figured it out - the solution appears to be to copy the contents of /skins/monobook/main.css as well as any content at Mediawiki:Monobook.css to Mediawiki:WikiSkin.css.

Have a look at Freelance for an example. --Rob 09:51, 4 November 2007 (NZDT)
Yes, the purpose of wikiskin is to allow all skin features (content and CSS) to be defined in-wiki. I'll eventually add the ability to turn wikiskin on or off from preferences, but for now you could add a hack into the wfSetupWikiSkin function which bails if the user isn't you,

<php> global $wgUser; if ($wgUser->getName() != 'You') return; </php>

Example broken

Looks like the example here has stopped working. Seems to be ignoring the skin key. --Rob 09:56, 4 November 2007 (NZDT)

Fixed - it was when LocalSettings was re-organised the skin setting got put after the wikiskin extension include, but should be before. --Nad 10:38, 4 November 2007 (NZDT)