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]] ==
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 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]] ==
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:
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:
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());
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:
<<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());
Additions:
This action allows you to select a [[Docs:WikkaSkins skin]] for [[HomePage WikkaWiki]], among those present in the ##css/## folder.
Deletions:
Additions:
<<This action is obsolete and has been replaced by the MySkin action. Want to test it? Give it a [[TestSkin try]]<<
Deletions:
Want to test it? Give it a [[TestSkin try]]<<
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
{{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:
{{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
Additions:
CategoryUserContributions CategoryLayout
Deletions:
Additions:
<<This action has been replaced by the MySkin action.
Want to test it? Give it a [[TestSkin try]]<<
Want to test it? Give it a [[TestSkin try]]<<
Deletions:
Check also the WikkaSkinEditor, which extends the WikkaSkinSelector giving Wikka Administrators the possibility to **edit skins**<<
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**<<
---
---
Check also the WikkaSkinEditor, which extends the WikkaSkinSelector giving Wikka Administrators the possibility to **edit skins**<<
---
---
Deletions:
Additions:
$selected = ($file == $currentskin)? " selected=\"selected\"" : "";
Deletions:
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:
Additions:
{{lastedit show="2"}}
''Minor update 2004-11-25''
''Minor update 2004-11-25''
Deletions:
''Minor update 2004-11-22''
Additions:
{{lastedit show="3"}}
Deletions:
Additions:
{{lastedit}}
$noskinmask = '^(xml.css|print.css|\.(.*))$';
$noskinmask = '^(xml.css|print.css|\.(.*))$';
Deletions:
$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''
''Minor update 2004-11-22''
Deletions:
''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>';
}
if (!preg_match('/'.$noskinmask.'/', $file)) {
$selected = ($file == $currentskin)? " selected" : "";
print '<option value="'.$file.'"'.$selected.'>'.$file.'</option>';
}
Deletions:
$selected = ($file == $currentskin)? " selected" : "";
print '<option value="'.$file.'"'.$selected.'>'.$file.'</option>';
}
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>';
}
<<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:
$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:
Additions:
if (ereg("(.*)\.css", $file)) {
Deletions:
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:
Additions:
CategoryDevelopment CategoryLayout
Deletions:
Revision [2294]
Edited on 2004-11-18 09:38:22 by DarTar [New action proposal (replaces the old skin handler)]Additions:
CategoryDevelopment
Deletions:
Revision [2293]
Edited on 2004-11-18 09:37:58 by DarTar [New action proposal (replaces the old skin handler)]Additions:
-- DarTar
----
WikkaDevelopment
----
WikkaDevelopment
Deletions:
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:
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:
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.
Many skins can be downloaded and shared from the unofficial WikkaSkinsRepository.
Deletions:
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]] ==
== 1. Add your custom [[WikkaSkins skins]] ==
Deletions:
== 1. Add your custom [[WikkaSkin skins]] ==