Theme/Style options

Found a bug? Tell us!!
Post Reply
davecjr
Regular
Posts: 167
Joined: Fri Oct 29, 2004 3:09 pm
Contact:

Theme/Style options

Post by davecjr »

I updated my blog with a cvs snapshot from a couple of days ago and after changing my style (or template), I now get 'Theme/Style options' on the screen when I click on 'Manage Styles' and now choices to change templates. I can't change my style now!
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Theme/Style options

Post by garvinhicking »

Hi!

Please fetch an updated nightly snapshot; a few days ago there was a bug that prevented templates with a config.inc.php to work properly!

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/
davecjr
Regular
Posts: 167
Joined: Fri Oct 29, 2004 3:09 pm
Contact:

Post by davecjr »

Thanks for the fast reply. I'll update tonight.
davecjr
Regular
Posts: 167
Joined: Fri Oct 29, 2004 3:09 pm
Contact:

Post by davecjr »

I just updated with today's snapshot and still get the same thing. Any other ideas?! Everything else seems to be fine.
thunderlove
Posts: 2
Joined: Wed Apr 19, 2006 11:54 am

Post by thunderlove »

Might the template in question be 'plain-vanilla'?

There is a problem with that template, and it's on my list of 'problems to tackle to help me learn the inner workings of Serendipity'

In the meantime, if you delete or rename your template's subdirectory (e.g. /templates/plain-vanilla) you can then go back and change your template to one that works.

[EDIT: garvin -- sourceforge is still timing out, that's why updating didn't work for them :( ]
davecjr
Regular
Posts: 167
Joined: Fri Oct 29, 2004 3:09 pm
Contact:

Post by davecjr »

I believe it was 'Sunset' that I changed to and first saw the 'Theme/Style Options' problem. I couldn't change templates after that except for going into the db and forcing it to change.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Do any of those styles have a config.inc.php file?

If you look in your docs/NEWS file of the installation, what version number to you see on top of that 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/
davecjr
Regular
Posts: 167
Joined: Fri Oct 29, 2004 3:09 pm
Contact:

Post by davecjr »

The sunset template does have a config.inc.php file.

The version number at the top of my NEWS file says:

Version 1.1-alpha4()

but when I log into s9y I see:

Powered by Serendipity 1.1-alpha5 and PHP 4.3.11
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Where do you have that sunset template from? What does the config.inc.php file look like?

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/
davecjr
Regular
Posts: 167
Joined: Fri Oct 29, 2004 3:09 pm
Contact:

Post by davecjr »

The Sunset template was from Spartacus and I had used it before and it didn't do that. I have my site set to Andreas08 now which I changed in the database and still can't switch templates.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Can you please edit your include/admin/templates.inc.php file and look for this:

Code: Select all

echo '<h3>' . STYLE_OPTIONS . '</h3>';
@include $serendipity['serendipityPath'] . $serendipity['templatePath'] . $serendipity['template'] . '/config.inc.php';
change that to

Code: Select all

echo '<h3>' . STYLE_OPTIONS . '</h3>';
serendipity_smarty_init();
include_once $serendipity['serendipityPath'] . $serendipity['templatePath'] . $serendipity['template'] . '/config.inc.php';
And then tell me if it works?

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/
davecjr
Regular
Posts: 167
Joined: Fri Oct 29, 2004 3:09 pm
Contact:

Post by davecjr »

That worked. I now see this at the top and the normal list of templates to choose from.
-----
Theme/Style options

This theme/style has no specific options. To see how your template can specify options, read the Technical Documentation on www.s9y.org about "Configuration of Theme options".

Select the template you wish to use for your blog
davecjr
Regular
Posts: 167
Joined: Fri Oct 29, 2004 3:09 pm
Contact:

Post by davecjr »

Maybe I spoke too soon! Now I get this.
-----
Warning: main(/hsphere/local/home/dcockrel/thecockrells.com/blog/templates/carl_contest/config.inc.php): failed to open stream: No such file or directory in /hsphere/local/home/dcockrel/thecockrells.com/blog/include/admin/templates.inc.php on line 65

Warning: main(): Failed opening '/hsphere/local/home/dcockrel/thecockrells.com/blog/templates/carl_contest/config.inc.php' for inclusion (include_path='.:/usr/local/lib/php:/hsphere/local/home/dcockrel/thecockrells.com/blog/:/hsphere/local/home/dcockrel/thecockrells.com/blog/bundled-libs/') in /hsphere/local/home/dcockrel/thecockrells.com/blog/include/admin/templates.inc.php on line 65

This theme/style has no specific options. To see how your template can specify options, read the Technical Documentation on www.s9y.org about "Configuration of Theme options".
Select the template you wish to use for your blog
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Thanks for reporting this! Actually you can ignore that message, but the now proper fix is this code:

Code: Select all

if (file_exists($serendipity['serendipityPath'] . $serendipity['templatePath'] . $serendipity['template'] . '/config.inc.php')) {
    serendipity_smarty_init();
    include_once $serendipity['serendipityPath'] . $serendipity['templatePath'] . $serendipity['template'] . '/config.inc.php';
}
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/
davecjr
Regular
Posts: 167
Joined: Fri Oct 29, 2004 3:09 pm
Contact:

Post by davecjr »

Thanks Garvin, everything seems to be fine now.
Post Reply