Revision history for WikkaSkinSelector


Revision [23426]

Last edited on 2016-05-20 07:38:48 by DarTar [Replaces old-style internal links with new pipe-split links.]
Additions:
This page refers to beta functionality supported until Wikka 1.1.x. As of [[Docs:WhatsNew12 | version 1.2]] Wikka introduces support for 100%-modular **themes**: check [[Docs:WikkaThemes | this page]] for more information or this [[http://blog.wikkawiki.org/2009/09/11/how-to-design-themes-for-wikkawiki/ | tutorial]] to learn how to design custom themes.
This action allows you to select a [[Docs:WikkaSkins | skin]] for [[HomePage | WikkaWiki]], among those present in the ##css/## folder.
== 1. Add your custom [[WikkaSkins | skins]] ==
Deletions:
This page refers to beta functionality supported until Wikka 1.1.x. As of [[Docs:WhatsNew12 version 1.2]] Wikka introduces support for 100%-modular **themes**: check [[Docs:WikkaThemes this page]] for more information or this [[http://blog.wikkawiki.org/2009/09/11/how-to-design-themes-for-wikkawiki/ tutorial]] to learn how to design custom themes.
This action allows you to select a [[Docs:WikkaSkins skin]] for [[HomePage WikkaWiki]], among those present in the ##css/## folder.
== 1. Add your custom [[WikkaSkins skins]] ==


Revision [20847]

Edited on 2009-09-12 07:36:07 by DarTar [link to blog post]
Additions:
This page refers to beta functionality supported until Wikka 1.1.x. As of [[Docs:WhatsNew12 version 1.2]] Wikka introduces support for 100%-modular **themes**: check [[Docs:WikkaThemes this page]] for more information or this [[http://blog.wikkawiki.org/2009/09/11/how-to-design-themes-for-wikkawiki/ tutorial]] to learn how to design custom themes.
Deletions:
This page refers to beta functionality supported until Wikka 1.1.x. As of [[Docs:WhatsNew12 version 1.2]] Wikka introduces support for 100%-modular **themes**: check [[Docs:WikkaThemes this page]] for more information.


Revision [20846]

Edited on 2009-09-12 07:35:13 by DarTar [[m] fixed version number]
Additions:
This page refers to beta functionality supported until Wikka 1.1.x. As of [[Docs:WhatsNew12 version 1.2]] Wikka introduces support for 100%-modular **themes**: check [[Docs:WikkaThemes this page]] for more information.
Deletions:
This page refers to beta functionality supported until Wikka 1.x. As of [[Docs:WhatsNew12 version 1.2]] Wikka introduces support for 100%-modular **themes**: check [[Docs:WikkaThemes this page]] for more information.


Revision [20814]

Edited on 2009-09-03 05:30:51 by DarTar [->1.2]
Additions:
<<===Theme support available in 1.2!===
This page refers to beta functionality supported until Wikka 1.x. As of [[Docs:WhatsNew12 version 1.2]] Wikka introduces support for 100%-modular **themes**: check [[Docs:WikkaThemes this page]] for more information.
<<::c::
$this->SetPersistentCookie("wikiskin", $_POST["skin"]);
$this->Redirect($this->href());
Deletions:
{{lastedit show="2"}}
<<This action is obsolete and has been replaced by the MySkin action. Want to test it? Give it a [[TestSkin try]]<<
---
---
$this->SetPersistentCookie("wikiskin", $_POST["skin"]);
$this->Redirect($this->href());


Revision [18521]

Edited on 2008-01-28 00:11:42 by DarTar [Modified links pointing to docs server]
Additions:
This action allows you to select a [[Docs:WikkaSkins skin]] for [[HomePage WikkaWiki]], among those present in the ##css/## folder.
Deletions:
This action allows you to select a [[WikkaSkins skin]] for [[HomePage WikkaWiki]], among those present in the ##css/## folder.


Revision [9505]

Edited on 2005-06-23 10:55:13 by DarTar [minor]
Additions:
<<This action is obsolete and has been replaced by the MySkin action. Want to test it? Give it a [[TestSkin try]]<<
Deletions:
<<This action has been replaced by the MySkin action.
Want to test it? Give it a [[TestSkin try]]<<


Revision [8700]

Edited on 2005-05-29 12:48:27 by JavaWoman [move to new category]
Additions:
===== Wikka Skin Selector =====
{{lastedit show="2"}}


<<This action has been replaced by the MySkin action.
Want to test it? Give it a [[TestSkin try]]<<


---
---
This action allows you to select a [[WikkaSkins skin]] for [[HomePage WikkaWiki]], among those present in the ##css/## folder.
__Note__: Your browser must accept cookies in order for the skin selector to work.

Here's the three-step installation:

== 1. Add your custom [[WikkaSkins skins]] ==

Just put all your skins in the ##css/## folder of your Wikka installation.
Many skins can be downloaded and shared from the unofficial WikkaSkinsRepository.

== 2. Create the skin selector action (##actions/selectskin.php##) ==

Save the code below in a new file called ##actions/selectskin.php##:
''Minor update 2004-11-25''

%%(php)
<?php
// Wikka Skin Selector
// Displays a form to switch CSS stylesheet

$currentskin = $this->GetCookie("wikiskin");
echo $this->Format("=== Select a Wikka skin: === --- ");
if ($_POST) {
$this->SetPersistentCookie("wikiskin", $_POST["skin"]);
$this->Redirect($this->href());
}
$handle = opendir('css/');
print $this->FormOpen("","","post");
echo '<select name="skin">';
$noskinmask = '^(xml.css|print.css|\.(.*))$';
while (false !== ($file = readdir($handle))) {
if (!preg_match('/'.$noskinmask.'/', $file)) {
$selected = ($file == $currentskin)? " selected=\"selected\"" : "";
print '<option value="'.$file.'"'.$selected.'>'.$file.'</option>';
}
}
echo '</select>';
echo '<input type="submit" name="Submit" value="Set new skin" />';
print $this->FormClose();
closedir($handle);
?>
%%

== 3. Modify the Wikka Header (##actions/header.php##)==

To allow skin selection a small modification of the header is needed:

**original ##actions/header.php##**
%%(php)
<link rel="stylesheet" type="text/css" href="css/<?php echo $this->GetConfigValue("stylesheet") ?>" />
%%

**modified ##actions/header.php##**
%%(php)
<link rel="stylesheet" type="text/css" href="css/<?php echo ($this->GetCookie("wikiskin"))? $this->GetCookie("wikiskin"): $this->GetConfigValue("stylesheet") ?>" />
%%

=== How to use the skin selector ===

Just insert ##""{{selectskin}}""## in a wikka page and start playing.


-- DarTar

----
CategoryDevelopmentActions CategoryLayout
Deletions:
===== Wikka Skin Selector =====
{{lastedit show="2"}}


<<This action has been replaced by the MySkin action.
Want to test it? Give it a [[TestSkin try]]<<


---
---
This action allows you to select a [[WikkaSkins skin]] for [[HomePage WikkaWiki]], among those present in the ##css/## folder.
__Note__: Your browser must accept cookies in order for the skin selector to work.

Here's the three-step installation:

== 1. Add your custom [[WikkaSkins skins]] ==

Just put all your skins in the ##css/## folder of your Wikka installation.
Many skins can be downloaded and shared from the unofficial WikkaSkinsRepository.

== 2. Create the skin selector action (##actions/selectskin.php##) ==

Save the code below in a new file called ##actions/selectskin.php##:
''Minor update 2004-11-25''

%%(php)
<?php
// Wikka Skin Selector
// Displays a form to switch CSS stylesheet

$currentskin = $this->GetCookie("wikiskin");
echo $this->Format("=== Select a Wikka skin: === --- ");
if ($_POST) {
$this->SetPersistentCookie("wikiskin", $_POST["skin"]);
$this->Redirect($this->href());
}
$handle = opendir('css/');
print $this->FormOpen("","","post");
echo '<select name="skin">';
$noskinmask = '^(xml.css|print.css|\.(.*))$';
while (false !== ($file = readdir($handle))) {
if (!preg_match('/'.$noskinmask.'/', $file)) {
$selected = ($file == $currentskin)? " selected=\"selected\"" : "";
print '<option value="'.$file.'"'.$selected.'>'.$file.'</option>';
}
}
echo '</select>';
echo '<input type="submit" name="Submit" value="Set new skin" />';
print $this->FormClose();
closedir($handle);
?>
%%

== 3. Modify the Wikka Header (##actions/header.php##)==

To allow skin selection a small modification of the header is needed:

**original ##actions/header.php##**
%%(php)
<link rel="stylesheet" type="text/css" href="css/<?php echo $this->GetConfigValue("stylesheet") ?>" />
%%

**modified ##actions/header.php##**
%%(php)
<link rel="stylesheet" type="text/css" href="css/<?php echo ($this->GetCookie("wikiskin"))? $this->GetCookie("wikiskin"): $this->GetConfigValue("stylesheet") ?>" />
%%

=== How to use the skin selector ===

Just insert ##""{{selectskin}}""## in a wikka page and start playing.


-- DarTar

----
CategoryUserContributions CategoryLayout


Revision [4751]

Edited on 2005-01-17 14:44:36 by NilsLindenberg [cat. changed]
Additions:
CategoryUserContributions CategoryLayout
Deletions:
CategoryDevelopment CategoryLayout


Revision [3006]

Edited on 2004-12-09 10:20:45 by DarTar [Adding link]
Additions:
<<This action has been replaced by the MySkin action.
Want to test it? Give it a [[TestSkin try]]<<
Deletions:
<<A //beta version// of the skin selector is available for testing [[TestSkin here]].
Check also the WikkaSkinEditor, which extends the WikkaSkinSelector giving Wikka Administrators the possibility to **edit skins**<<


Revision [2470]

Edited on 2004-11-26 12:07:40 by DarTar [Adding link]
Additions:
<<A //beta version// of the skin selector is available for testing [[TestSkin here]].
Check also the WikkaSkinEditor, which extends the WikkaSkinSelector giving Wikka Administrators the possibility to **edit skins**<<
---
---
Deletions:
<<Check also the WikkaSkinEditor, which extends the WikkaSkinSelector giving Wikka Administrators the possibility to **edit skins**<<::c::


Revision [2465]

Edited on 2004-11-25 21:46:49 by DarTar [Fixing xhtml]
Additions:
$selected = ($file == $currentskin)? " selected=\"selected\"" : "";
Deletions:
$selected = ($file == $currentskin)? " selected" : "";


Revision [2461]

Edited on 2004-11-25 17:53:50 by DarTar [Closing slash for input tag - thanks Nils!]
Additions:
echo '<input type="submit" name="Submit" value="Set new skin" />';
Deletions:
echo '<input type="submit" name="Submit" value="Set new skin">';


Revision [2449]

Edited on 2004-11-25 13:22:47 by DarTar [Minor code modification]
Additions:
{{lastedit show="2"}}
''Minor update 2004-11-25''
Deletions:
{{lastedit show="3"}}
''Minor update 2004-11-22''


Revision [2448]

Edited on 2004-11-25 13:21:46 by DarTar [Minor code modification]
Additions:
{{lastedit show="3"}}
Deletions:
{{lastedit}}


Revision [2447]

Edited on 2004-11-25 13:21:17 by DarTar [Minor code modification]
Additions:
{{lastedit}}
$noskinmask = '^(xml.css|print.css|\.(.*))$';
Deletions:
''Last updated: 2004-11-22''
$noskinmask = '^(xml|print|\.(.*))$';


Revision [2352]

Edited on 2004-11-22 12:34:46 by DarTar [Masking xml.css and print.css - thanks JW for the hint]
Additions:
''Last updated: 2004-11-22''
''Minor update 2004-11-22''
Deletions:
''Last updated: 2004-11-18''
''Minor update 2004-11-18''


Revision [2351]

Edited on 2004-11-22 12:34:13 by DarTar [Masking xml.css and print.css - thanks JW for the hint]
Additions:
$noskinmask = '^(xml|print|\.(.*))$';
if (!preg_match('/'.$noskinmask.'/', $file)) {
$selected = ($file == $currentskin)? " selected" : "";
print '<option value="'.$file.'"'.$selected.'>'.$file.'</option>';
}
Deletions:
if (ereg("(.*)\.css", $file)) {
$selected = ($file == $currentskin)? " selected" : "";
print '<option value="'.$file.'"'.$selected.'>'.$file.'</option>';
}


Revision [2316]

Edited on 2004-11-18 15:55:36 by DarTar [Minor update and link to WikkaSkinEditor]
Additions:
''Last updated: 2004-11-18''
<<Check also the WikkaSkinEditor, which extends the WikkaSkinSelector giving Wikka Administrators the possibility to **edit skins**<<::c::
''Minor update 2004-11-18''
echo $this->Format("=== Select a Wikka skin: === --- ");
$this->SetPersistentCookie("wikiskin", $_POST["skin"]);
$this->Redirect($this->href());
if (ereg("(.*)\.css", $file)) {
$selected = ($file == $currentskin)? " selected" : "";
print '<option value="'.$file.'"'.$selected.'>'.$file.'</option>';
}
Deletions:
echo $this->Format("=== Skin Switcher === --- ");
$this->SetPersistentCookie("wikiskin", $_POST["skin"]);
$this->Redirect($this->href());
echo $this->Format("Current skin: **".$currentskin."** --- --- ");
if (ereg("(.*)\.css", $file)) {
print '<option value="'.$file.'">'.$file.'</option>';
}


Revision [2307]

Edited on 2004-11-18 10:50:14 by DarTar [New action proposal (replaces the old skin handler)]
Additions:
== 2. Create the skin selector action (##actions/selectskin.php##) ==
Deletions:
== 2. Create the skin selector action (##actions/selectskin.php##)==


Revision [2306]

Edited on 2004-11-18 10:48:24 by DarTar [Smal mod]
Additions:
if (ereg("(.*)\.css", $file)) {
Deletions:
if (ereg("[^xml|^print]\.css", $file)) {


Revision [2305]

Edited on 2004-11-18 10:02:14 by DarTar [New action proposal (replaces the old skin handler)]
Additions:
__Note__: Your browser must accept cookies in order for the skin selector to work.
Deletions:
Your browser must accept cookies in order for the skin selector to work.


Revision [2297]

Edited on 2004-11-18 09:52:17 by DarTar [Adding category link]
Additions:
CategoryDevelopment CategoryLayout
Deletions:
CategoryDevelopment


Revision [2294]

Edited on 2004-11-18 09:38:22 by DarTar [New action proposal (replaces the old skin handler)]
Additions:
CategoryDevelopment
Deletions:
WikkaDevelopment


Revision [2293]

Edited on 2004-11-18 09:37:58 by DarTar [New action proposal (replaces the old skin handler)]
Additions:
-- DarTar
----
WikkaDevelopment
Deletions:
-- DarTar


Revision [2292]

Edited on 2004-11-18 09:37:23 by DarTar [New action proposal (replaces the old skin handler)]
Additions:
This action allows you to select a [[WikkaSkins skin]] for [[HomePage WikkaWiki]], among those present in the ##css/## folder.
Deletions:
This action allows to select a [[WikkaSkins skin]] for [[HomePage WikkaWiki]], among those present in the ##css/## folder.


Revision [2291]

Edited on 2004-11-18 09:35:37 by DarTar [New action proposal (replaces the old skin handler)]

No Differences

Revision [2290]

Edited on 2004-11-18 09:35:16 by DarTar [New action proposal (replaces the old skin handler)]
Deletions:
%% (php)


Revision [2288]

Edited on 2004-11-18 09:32:58 by DarTar [New action proposal (replaces the old skin handler)]
Additions:
This action allows to select a [[WikkaSkins skin]] for [[HomePage WikkaWiki]], among those present in the ##css/## folder.
Many skins can be downloaded and shared from the unofficial WikkaSkinsRepository.
Deletions:
This action allows to select a [[WikkaSkins skin]] for WikkaWiki, among those present in the ##css/## folder.
Many skins can be downloaded and shared from the unofficial WikkaSkinRepository.


Revision [2287]

Edited on 2004-11-18 09:32:22 by DarTar [New action proposal (replaces the old skin handler)]
Additions:
This action allows to select a [[WikkaSkins skin]] for WikkaWiki, among those present in the ##css/## folder.
== 1. Add your custom [[WikkaSkins skins]] ==
Deletions:
This action allows to select a [[WikkaSkin skin]] for WikkaWiki, among those present in the ##css/## folder.
== 1. Add your custom [[WikkaSkin skins]] ==


Revision [2286]

The oldest known version of this page was created on 2004-11-18 09:31:54 by DarTar [New action proposal (replaces the old skin handler)]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki