Help - Search - Members - Calendar
Full Version: Stylesheet chooser?
Movable Type Community Forum > Using Movable Type > Default Stylesheets
tm™
Hi there,

I've been wondering how to make a selector that would allow the user to pick a different stylesheet. Kind of like this.

Could someone please explain it to me please, as my PHP knowledge is somewhat inexsistent. wink.gif

Thanks alot. smile.gif
maddy
ALA: PHP Switcher. smile.gif
tm™
QUOTE (maddy @ Feb 20 2005, 03:56 AM)

I'll try that out.

Thanks alot! smile.gif

edit //
I just tried to do that, but I've got a problem when it comes up to the part for adding in the css code
CODE
<link rel="stylesheet" type="text/css"
    media="screen" title="User
Defined Style" href="<?php echo
(!$sitestyle)?'defaultstyle':$sitestyle ?>.css" />


Now, if I replace that with the code that is already there, then I rebuild the template, my blog ends up having no stylesheet.

What's the code I have to input there?

Thanks again. smile.gif

edit again //
Ah, forgot to add the {?php and ?} tags. But now I get an error on my blog...
QUOTE
Parse error: parse error, unexpected '<' in /home/matt/public_html/blog/index.php on line 10


line 10 is ***'ed
CODE
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<$MTPublishCharset$>" />
<meta name="generator" content="http://www.movabletype.org/" />

***<title><$MTBlogName encode_html="1"$></title>
<?php
<link rel="stylesheet" type="text/css"
    media="screen" title="User
Defined Style" href="<?php echo
(!$sitestyle)?'defaultstyle':$sitestyle ?>.css" />
?>
...


final edit //
Oh. I just realised I had .com in the switcher.php instead of .net...

Hah, Thanks for your help, maddy. 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-2010 Invision Power Services, Inc.