Help - Search - Members - Calendar
Full Version: Skinning the CGI output pages
Movable Type Community Forum > Additional Resources > Tips and Tricks
TxFx.net
I followed Domesticat's excellent skinning tutorial and am very happy with the result. But the problem I am having (and others too, I'd assume) is that the output of CGI scripts like mt-search.cgi and mt-comments.cgi can't be skinned using PHP because the output of CGI isn't sent on to the PHP parser. I'd like to use JavaScript to read the cookies baked with Domesticat's cookiecheck.php file:
QUOTE

$total_skins = 14;
$default_skin = 1;

  if (isset($_REQUEST['newskin'])) {
    $newskin=(int)$_REQUEST['newskin'];
    if ( ($newskin<1) OR ($newskin>$total_skins) ) $newskin=$default_skin;
  } elseif (isset($_REQUEST['skin'])) {
    $newskin=(int)$skin;
    if ( ($skin<1) OR ($skin>$total_skins) ) $newskin=$default_skin;
  } else $newskin=$default_skin;

  $skin=$newskin;
  setcookie ('skin', "", time() - 3600);
  setcookie('skin',$newskin,time()+(86400*365),'/');
  setcookie('skin',$newskin,time()+(86400*365),'/','.domesticat.net');
  $skin=$newskin;


    $headervar = "/path/to/your/site/html/nav/header";
    $footervar = "/path/to/your/site/html/nav/footer";
    $extension = ".php";
?>


Anyone have any idea what that would look like in Javascript?
ginakra
I just skinned my comments pop ups and stuff yesterday. Head on over to this site and follow the directions. It's pretty easy, if you need help let me know. I think you could skin pretty much any mt cgi output with this, though I'm a newbie.

Hope that helps.
TxFx.net
Awesome! I am muchly in your debt. It works perfectly, with one small bit of modification to match my css naming system (each skin's CSS has its own directory)
ginakra
Glad to be of help smile.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.