Comparing revisions for MySkin

Additions:
{{lastedit}}
<<Give it a [[TestSkin try]]! (v.1.0)<<
::c::
$this->SetPersistentCookie("wikiskin", $postedskin);
Add the following code in ##./wikka.php## immediately after the ##""//COOKIES""## section
$skin = $_SESSION['skin'];
if ($_COOKIE['skin'])
$skin = $_COOKIE['skin'];
$_SESSION['skin'] = $skin;
$this->SetPersistentCookie("skin", $skin);
function WriteSkin($file, $content){
$css_file = fopen("css/".$file, "w+");
fwrite($css_file, $content);
fclose($css_file);

function ReadSkin($file){
$source = fopen("css/".$file, "r");
$css_content = fread($source, filesize("css/".$file));
fclose($source);
return $css_content;
~-##default_stylesheet## --- Defines the system stylesheet;
Deletions:
<<===Theme support available in 1.2!===
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.
<<::c::
// begin change by AlexRust - May 28 2009
//$this->SetPersistentCookie("wikiskin", $postedskin);
$this->SetSkin($postedskin);
// end change by AlexRust - May 28 2009
Add the following code in ##./wikka.php## immediately after the ##""//COOKIES""## section.
**Note:** This section has moved to ./libs/Wakka.class.php, and the following can be placed after the ""GetCookie($name)"" function.
**Updated 5/5/2009 by PezHore:** Corrected the reference of cookie 'skin' to 'wikiskin', and changed the cookie retrieval from $skin = $_COOKIE['wikiskin] to use ""GetCookie"" function. Also removed the duplicate functions
$skin = $_SESSION['wikiskin'];
if ($_COOKIE['wikiskin'])
$skin = $this->GetCookie('wikiskin');
$_SESSION['wikiskin'] = $skin;
$this->SetPersistentCookie('wikiskin', $skin);
~-##stylesheet## --- Defines the system stylesheet;
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki