Hi,
I'd like to implement the template chooser/styleswitcher plugin, but want the users to be able to only choose between two styles (one is black on white, the other is white on black). As I have to keep the default template, this one gets also shown in the dropdown menu. Is there a way to limit the templates shown to just two of my choosing?
Cheers,
Dachs
Template Chooser Plugin - choosing which templates possible?
Re: Template Chooser Plugin - choosing which templates possible?
Hm. As far as I remember, there should be an internal URL which "executes" the template switch. You could hide the actual template chooser (after picking the 2 URLs you need) and "rebuild" it using a HTML nugget (or the template files) just linking to those 2 URLs.user1234 wrote:I'd like to implement the template chooser/styleswitcher plugin, but want the users to be able to only choose between two styles (one is black on white, the other is white on black). As I have to keep the default template, this one gets also shown in the dropdown menu. Is there a way to limit the templates shown to just two of my choosing?
I think there must be some thread about this somewhere in here, but maybe it was in the German only forum ...
YL
Re: Template Chooser Plugin - choosing which templates possible?
Hi YL,
yes I saw that, but unfortunately there was neither clearcut code nor an explanation of how this has to be done in that thread. So that leaves me none the wiser.
Cheers,
Dachs
yes I saw that, but unfortunately there was neither clearcut code nor an explanation of how this has to be done in that thread. So that leaves me none the wiser.
Cheers,
Dachs
-
Don Chambers
- Regular
- Posts: 3657
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact:
Re: Template Chooser Plugin - choosing which templates possible?
When you say you have to keep the default template, and it appears in the drop down list, which template are you referring to? And why do you HAVE to keep anything other than your black and white templates?
=Don=
Re: Template Chooser Plugin - choosing which templates possible?
Hi Don,
I mean the default template called "default". If I delete it I get a smarty error when I try to access the admin interface. Restoring that template also ended that error.
Cheers,
Dachs
PS: it calls itself Serendipity v2.3
I mean the default template called "default". If I delete it I get a smarty error when I try to access the admin interface. Restoring that template also ended that error.
Cheers,
Dachs
PS: it calls itself Serendipity v2.3
-
Don Chambers
- Regular
- Posts: 3657
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact:
Re: Template Chooser Plugin - choosing which templates possible?
Are you sure about that? Serendipity 2.3 is located in the folder /carl_contest/.... it was the template installed by default if no other template was selected beginning with s9y v1.0-1.2. The folder /default/ is where serendipity would look for smarty files if a template does not choose to provide custom versions.
The error you mentioned makes sense to me of the /default/ folder is deleted, not /carl_contest/.
The error you mentioned makes sense to me of the /default/ folder is deleted, not /carl_contest/.
=Don=
Re: Template Chooser Plugin - choosing which templates possible?
Hi Don,
the folder is named "default" on the server, it calls itself - in the theme choosing area of the admin interface and in the dropdown menu of the template-chooser - "serendipity v2.3". Possibly an XML-misnomer, no idea. Fact is I tried to delete all template folders except my two bulletproof adaptions I want to use and got a smarty error, was unable to access the admin area. I reinstalled the "default" folder and I again was able to administrate the blog.
So what is the solution to having people choose only between two different templates/styles?
The background is that my client wants a dark scheme (light typeface on black/nearblack surface) and I convinced her of at least providing people having eye problems with the choice of a scheme where there is dark/black typeface on a light surface.
I have nothing against doing this via links placed somewhere in the sidebar, there are only two choices, so that's not going to take much space or look clunky. I'd need a step-by-step rundown on how to do this though, including the full URI code for that.
In general and for the long run it would be great if the template-chooser plugin could get an admin-side choosing facility, where you can tick those templates you want to offer and have only those in the dropdown menu.
Cheers,
Dachs
the folder is named "default" on the server, it calls itself - in the theme choosing area of the admin interface and in the dropdown menu of the template-chooser - "serendipity v2.3". Possibly an XML-misnomer, no idea. Fact is I tried to delete all template folders except my two bulletproof adaptions I want to use and got a smarty error, was unable to access the admin area. I reinstalled the "default" folder and I again was able to administrate the blog.
So what is the solution to having people choose only between two different templates/styles?
The background is that my client wants a dark scheme (light typeface on black/nearblack surface) and I convinced her of at least providing people having eye problems with the choice of a scheme where there is dark/black typeface on a light surface.
I have nothing against doing this via links placed somewhere in the sidebar, there are only two choices, so that's not going to take much space or look clunky. I'd need a step-by-step rundown on how to do this though, including the full URI code for that.
In general and for the long run it would be great if the template-chooser plugin could get an admin-side choosing facility, where you can tick those templates you want to offer and have only those in the dropdown menu.
Cheers,
Dachs
Re: Template Chooser Plugin - choosing which templates possible?
No, it is not. That's Serendipity v3.0 (by Carl, /templates/carl_contest/). Serendipity v2.3 (by Tom Sommer) is in /templates/default/.Don Chambers wrote:Are you sure about that? Serendipity 2.3 is located in the folder /carl_contest/....
"Carl Contest" used to be the standard theme installed in new s9y installations, but it was never the default template, i.e. the fallback s9y fetches template files from. It couldn't have been, since it does not have all the necessary template files.
YL
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Template Chooser Plugin - choosing which templates possible?
Hi!
As YellowLED mentioned, install the templatechooser event plugin, install the templatechooser sidebar plugin, go to your blog, view the HTML sourcecode, copy the HTML portion that contains the dropdown for the templates, create a new html nugget insert the HTML portion you copied, remove all templates from the <option> list that you don't want, save the HTML nugget plugin, remove the sidebar templatechooser plugin.
'default' may never be deleted from the directory, but you can remove it from the HTML dropdown through this procedure.
Regards,
Garvin
As YellowLED mentioned, install the templatechooser event plugin, install the templatechooser sidebar plugin, go to your blog, view the HTML sourcecode, copy the HTML portion that contains the dropdown for the templates, create a new html nugget insert the HTML portion you copied, remove all templates from the <option> list that you don't want, save the HTML nugget plugin, remove the sidebar templatechooser plugin.
'default' may never be deleted from the directory, but you can remove it from the HTML dropdown through this procedure.
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/
# 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/
-
Don Chambers
- Regular
- Posts: 3657
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact:
Re: Template Chooser Plugin - choosing which templates possible?
WHOOPS! Wrong version numbers on my part. Forgot all about Tom's being numbered as well...
Garvin & Yellowled's suggestion sounds perfect... you would end up with something LIKE (but not necessarily identical to) this:
The option values would be the exact template names you wanted to present to your visitors.
Garvin & Yellowled's suggestion sounds perfect... you would end up with something LIKE (but not necessarily identical to) this:
Code: Select all
<form id="theme_chooser" action="/index.php?" method="post">
<select name="user_template" onchange="document.getElementById('theme_chooser').submit();">
<option value="Black" selected="selected">Black</option>
<option value="White">White</option>
</select>
</form>=Don=
Re: Template Chooser Plugin - choosing which templates possible?
Hi,
for some reason this does not work.
I can't remove the sidebar template-chooser plugin, if I do, the event-template-chooser plugin gets removed at the same time.
I tried to hide the sidebar plugin and used the html nugget, but it only defaults to the template which is selected in the code. No switching possible.
Cheers,
Dachs
for some reason this does not work.
I can't remove the sidebar template-chooser plugin, if I do, the event-template-chooser plugin gets removed at the same time.
I tried to hide the sidebar plugin and used the html nugget, but it only defaults to the template which is selected in the code. No switching possible.
Cheers,
Dachs
Re: Template Chooser Plugin - choosing which templates possible?
Hi,
still no idea why your solution doesn't work, but I now found a different one!
If I rename the info.txt file in the template folders I don't want used into xinfo.txt, then they won't be shown in the dropdown list!
Cheers,
Dachs
still no idea why your solution doesn't work, but I now found a different one!
If I rename the info.txt file in the template folders I don't want used into xinfo.txt, then they won't be shown in the dropdown list!
Cheers,
Dachs