Softened Cell and Sunset themes released

Skinning and designing Serendipity (CSS, HTML, Smarty)
Guest

Softened Cell and Sunset themes released

Post by Guest »

Hi all,

I have released the softened cell and sunset themes for review. These themes are complete, but my experience so far has been that other users often request minor alterations which may affect the way the final version is packaged. Please go ahead and download them, fiddle around, let me know what you think.

Anyone who has been waiting for these and has read my other post should be aware that these theme do not yet use the javascript for creating the corners around the sidebar boxes. View the themes my themes site, and download from my regular site

Cheers
Carl
carl_galloway
Regular
Posts: 1331
Joined: Sun Dec 04, 2005 5:43 pm
Location: Andalucia, Spain
Contact:

connection timed out

Post by carl_galloway »

Sorry everyone, my connection timed out. This thread was started by me.

Carl
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: connection timed out

Post by garvinhicking »

Is it just me, or are both themes actually the same,only with reversed sidebars and a very minor difference in quote colors?

If that's thecase, can't the theme be made to use the serendipity sidebar left/right position evaluation? Basically just like mozilla-modern does, which emits different CSS/HTML based on how many sidebars you've configured?

Apart from that,I'dliketo publish/put that theme(s) into our repository. Great ports, you are one genius. :-)

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
carl_galloway
Regular
Posts: 1331
Joined: Sun Dec 04, 2005 5:43 pm
Location: Andalucia, Spain
Contact:

Post by carl_galloway »

Garvin,

You have completely lost me. What you're saying sounds cool, but how to make it happen? I know you're trying to push us into developing better themes, with better smarty integration, but come on give me a break :lol:

I'll have to go and research this, but is it possible to also use the same code to change a banner and the link colors etc, or use a separate stylesheet, that would be excellent because then I could drop one of the themes and simply keep all the difference in a separate css file

Carl
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi Carl!
You have completely lost me. What you're saying sounds cool, but how to make it happen? I know you're trying to push us into developing better themes, with better smarty integration, but come on give me a break :lol:
Oops :-)
I'll have to go and research this, but is it possible to also use the same code to change a banner and the link colors etc, or use a separate stylesheet, that would be excellent because then I could drop one of the themes and simply keep all the difference in a separate css file
I guess it would be possible to do something like the following (which is completely untested). It does require manual interaction, but hey...no hands, no cookies. ;-)

First you create a "config.inc.php" file in your template directory. There you set something like:

Code: Select all

<?php
// Here you can define the used colorsets. Available: "turqoise", "green", "blue"
$serendipity['smarty']->assign('colorset', 'green');
?>
This will lead to a new smarty variable being available in all (!) your templates.

In your index.tpl file you could then do:

Code: Select all

{if $colorset == 'green'}
<link href=".../green.css">
{else}
<link href=".../turqoise.css">
{/if}
or of course something like:

Code: Select all

<link href=".../{$colorset}/style.css">
Now people just need to edit their config.inc.php template and insert the appropriate colorsets.

We could create a plugin (or core functionality) to support those colorsets in the future with a menu to toggle the state. But I will need to think this out very clear, so that it's forward compatible. Like you may not only want to define a colorset for a template, but also assign a custom header image, tell if you want the sidebar on the left or right and whatever more...

All those variables could be passed on to the template files, where you could query those.

HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
carl_galloway
Regular
Posts: 1331
Joined: Sun Dec 04, 2005 5:43 pm
Location: Andalucia, Spain
Contact:

Post by carl_galloway »

oooh, you are seriously taking this thing to a whole new level, and this is why WP et al are going to start losing users.

I'm going to have a play with this, I would love to do this with my 'carl' themes and also the new softened cell/sunset themes. Problem at the monent is I make a change in one of the themes, then I have to do the same thing in the other and if I forget, then they start to look different, act different etc.

Quick question though, if I do what you suggest, can I have two stylesheets per colorset, a default stylesheet that is for every colorset, and then a much smaller stylesheet that contains only the differences?

Carl
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!
carl_galloway wrote:oooh, you are seriously taking this thing to a whole new level, and this is why WP et al are going to start losing users.
Thanks, that makes me feel proud. :-)
Quick question though, if I do what you suggest, can I have two stylesheets per colorset, a default stylesheet that is for every colorset, and then a much smaller stylesheet that contains only the differences?
Yes, you could do that. You have full control over the index.tpl file!

I would suggest to put all the colorset-unspecific things into your default style.css file.

Then just add another stylesheet call in your index.tpl which includes the CSS of the colorset. :-)

Once we have a few templates using the config.inc.php->smarty template transition, I can work on a system where one can configure that easier than by editing a file. For now it would be great to see some templates using that mechanism; we can then later integrate the interface more seamlessly.

Thinking about it, you might want to use a different format for your config.inc.php, like:

Code: Select all

<?php
$customization = array(
'colorset' => 'green',
'sidebars' => 'left',
'head_image' => '/img/myheader.jpg'
);

$serendipity['smarty']->assign('customization', $customization);
This way, we can later include this config.inc.php in the config panel I'm phantasizing about. It will be able to parse this array. And in your smarty file, you can use {$customization.colorset} etc. for accessing the arrays.

Currently it would be set within your template, but later a core/plugin mechanism will be able to override the $customization array with data stored in our serendipity_config database table.

Yay. This will be great, flexible and will integrate with nearly no work at all. Only maybe 10 lines of code to add to the configuration screen and 5 lines of code to overwrite the customization array. :-)

Once we have your template(s) using this system, I would like to add it to spartacus, and then I'll add the interface to Serendipity. :)

But this has time, so don't hurry. :-)

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
carl_galloway
Regular
Posts: 1331
Joined: Sun Dec 04, 2005 5:43 pm
Location: Andalucia, Spain
Contact:

Post by carl_galloway »

Garvin, I think I speak for any theme designer in saying that would be a welcome change, perhaps all those MT themes could also be converted over.

Carl
carl_galloway
Regular
Posts: 1331
Joined: Sun Dec 04, 2005 5:43 pm
Location: Andalucia, Spain
Contact:

Post by carl_galloway »

Garvin,

I've been working on the colorset solution you provided above, and for the softened cell/sunset theme it works perfectly. I've repackaged the zipfile for you to test offline. Download colorset. If your happy, then go ahead and put it into spartacus, but I feel it might be too soon if you want to be forward compatible and allow other themes to also make colorsets.

I had to change the index.tpl to bring in the different stylesheets, and also had to change the paths in the stylesheets to bring in the images. It works, but I have a funny feeling I haven't done it right. Could you check and give me any feedback?

Also, I started to do the same thing with my carl themes, but couldn't get the array to work yet, I'm having trouble using the images in the theme because some of them aren't in the stylesheet like the arrows on hte calendar. Might need another explanation of how to use the array.

Cheers
Carl
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi Carl!

the URL doesn't work for me?

And could you describe morein depth about your problem with the images? The calendarimages are, AFAIK, storedwithin theplugin_calendar.tpl file?!

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Guest

Post by Guest »

Garvin,

I'd really prefer something like the plugin system, where the theme developer could provide a propbag of variable names and selections. When you go to "Manage Styles" (or maybe "Appearance"), these options would be presented and stored just like plugin properties. When the template was called, those properties would be in the customization array.

Easy, extensible... I could specify, for instance, whether I wanted rounded corners or not.
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

Guest? Guest? I was logged in, I know it!

Yeah, that was me. Now I'm Serendipity's official Good Idea Fairy, also known as the Feature Creep.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Judebert, that was basically how I thought it to be. However I would've done itwith some array options only, not a class-based system. Mostly because of performance reasons and for it being easier to understand fortemplate authors...

Bestregards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
carl_galloway
Regular
Posts: 1331
Joined: Sun Dec 04, 2005 5:43 pm
Location: Andalucia, Spain
Contact:

Post by carl_galloway »

You guys really like the one-upmanship game don't you? :D

Garvin, my apologies, when I copied the url over it missed one of the w's in www, the correct url is this one

Images, some of the images I put into themes aren't specified in the stylesheet. For example in the carl themes, the arrows in the calendar are coded in the calendar.tpl, (I change them to gifs so IE can use them without doubling their size), and in the carl themes I changed the colors. I hated the boring grey and wanted either blue or green.

So I've managed to change colorsets when everything is in the stylesheet, but when it isn't in the stylesheet, the array that you suggested above, sorry, I just don't understand it. I'm assuming that what you want to do is create a series variables that get used if the colorset is green, and then if its blue you want to use a different set of variables, if I'm right then this would be ubercool, and I can easily put what you suggested into the config.inc.php, but then accessing it in the index.tpl, I'm missing that step.

Hope that helps,
Carl
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

I'm sticking with Garvin's idea (I think).

Essentially, in your config.inc.php (or somewhere of Garvin's choosing), you'd define an array something like this:

Code: Select all

$theme_options = array(
   'colorset' => array(
      'name'  => 'Color Scheme',
      'type'    => 'select',
      'values' => array('green', 'blue')),
   'sidebars' => array(
      'name'  => 'Sidebar Position',
      'type'    => 'select',
      'values' => array('left', 'right', 'menu')),
   'head_image' => array(
      'name'  => 'Header Image',
      'type'    => 'text')
);
We may wind up using some kind of parallel array, or object properties, or function calls, or whatever... point is, you get to define what can be changed in your template, and what values are legal. (And it's reasonably simple for you to do so.)

Serendipity will display those values for the user in the admin section. In this case, he'll get a dropdown labeled 'Color Scheme' with options 'blue' and 'green', another dropdown labeled 'sidebars' with options 'left', 'right', and 'menu', and a text box labeled 'Header Image'.

Say he wants green with sidebars on the left, and chooses img/myheader.jpg for his header image.

When Smarty runs, it'll get an extra variable called 'customization'. You would be able to access all your stuff, and find values you liked.

Code: Select all

  {if $customization.colorset == 'green'}
    <link href=".../green.css">
  {else}
    <link href=".../turqoise.css">
  {/if}
And similarly for $customization.sidebars and $customization.header_image.

You like?
Post Reply