Page 1 of 1

Theme/Style options

Posted: Fri Apr 21, 2006 6:44 pm
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!

Re: Theme/Style options

Posted: Fri Apr 21, 2006 8:21 pm
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

Posted: Fri Apr 21, 2006 8:25 pm
by davecjr
Thanks for the fast reply. I'll update tonight.

Posted: Fri Apr 21, 2006 9:42 pm
by davecjr
I just updated with today's snapshot and still get the same thing. Any other ideas?! Everything else seems to be fine.

Posted: Sat Apr 22, 2006 2:21 am
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 :( ]

Posted: Sat Apr 22, 2006 4:47 am
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.

Posted: Sat Apr 22, 2006 8:20 pm
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

Posted: Sat Apr 22, 2006 8:28 pm
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

Posted: Sat Apr 22, 2006 8:56 pm
by garvinhicking
Hi!

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

Regards,
Garvin

Posted: Sat Apr 22, 2006 11:03 pm
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.

Posted: Sun Apr 23, 2006 1:41 am
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

Posted: Sun Apr 23, 2006 2:07 am
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

Posted: Sun Apr 23, 2006 2:09 am
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

Posted: Sun Apr 23, 2006 7:25 pm
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

Posted: Mon Apr 24, 2006 7:20 pm
by davecjr
Thanks Garvin, everything seems to be fine now.