Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2010-03-08 21:55:46

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,454
Website GitHub

Re: Making the installation of front-of-site themes easier

Time for me to weigh-in I guess :-)

stephan wrote:

a meta-file that gives you a very concise and machine-readable overview of the templates.

A very nice idea. Essentially a list of steps that some software tool can interpret to do the deed and replicate the template on another installation. This may be in the form of SQL statements (for inserting sections/forms/setting options) or file copying/directory creation, although that’s a bit more involved because of platform idiosyncracies. Windoze servers, I’m looking at you ;-)

On the plugin side of things, when the textpattern.org redesign eventually takes off (must… find… time) we intend to try and build in a system to pass through the site to grab the actual latest plugin code (i.e. version checking). This might be a useful one-stop shop for a template to list the currently available plugin versions vs the versions that the template thinks it needs (i.e. the ones used at compile time). If we can get the plugin-to-TXP version compatibility thing off the ground too, all the better (gonna need some thought, that one).

Let’s add a dedicated themes directory to root as well – this would be for frontend themes:

Yep, having a self-contained dir is the way to go. I don’t mind what it’s called, but I would dig my heels in and say that perhaps ‘theme’ or ‘themes’ isn’t used simply because of the potential confusion with the admin-side themes. Support nightmare. Using _templates like Stuart suggested works for me… or how about a textplates directory? :-p

during installation of a frontend theme the user can chose to manually adjust the sections

I think what we’re talking about here is an installation wizard, right? A bit like the way installshield et al works. It reads an ini file containing instructions/messages/options, lets the user pick from the given options and then plugs those values into the script portion to actually do the final deed of installing.

Maybe there is already some core-API that allows the adjustment of settings

I don’t think so (might be wrong). But most settings are stored in txp_prefs and smd_prefalizer is a tool for viewing / editing them. If during the process of template creation something akin to smd_prefalizer could ask the template author to filter and mark which settings were important to be set on the target installation, they could be noted and relevant SQL statements generated to go in the meta file.

a theme may rely on one special article in the about section and show its excerpt on the front page

Yes, this gets quite tricky, especially when you factor in that articles might already exist and the template author happened to use the section/id/title permlink structure in their template. Not sure how to approach this part. As you say, the wizard could ask. I wouldn’t like to have to code the bit that worked behind the ‘automatic’ option though :-\

Extend core so that a plugin may easily make adjustments to settings

Plugins can do this on installation automatically (see the Plugin Callbacks section) if an author so chooses. Whether this can be hijacked for a template to override/augment remains to be seen.

Extend core so that sections may also be invisible – similar to drafts in articles

Interesting idea. Will give it some thought.

Extent the plugin API so that settings may be exported at will

Ditto.

Refactor mcw_templates/mem_templates so that it performs the above steps based on a master meta file

Volunteers? :-D


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#14 2010-03-09 15:44:48

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Making the installation of front-of-site themes easier

Oh gee. This jumped a few steps forward didn’t it? Not that I’m complaining but I have to work with what we have now.

Anyway Stef, the _templates directory is there purely for the mem_templates or hcg_templates plugins. They look for the templates there. The main backbone of my construction is the site-design directory. Seems like a good name to me. Does exactly what it says on the tin. I too would avoid “theme” for the same reasons you mention. I wouldn’t go with “textplates” either. Too gimicky for a directory name methinks.


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#15 2010-03-09 15:53:04

stephan
Plugin Author
From: Bochum, Germany
Registered: 2004-07-26
Posts: 196
Website

Re: Making the installation of front-of-site themes easier

Should we open a feature request for the site-design folder to be included in core? The rest will probably follow quite naturally ;-)


Yoko for Textpattern – A free blog themeMinimum Theme – If all you want to do is write.
Note: I am currently not actively using Textpattern, so I am not in the forums very often

Offline

#16 2010-03-09 16:01:32

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,330
Website Mastodon

Re: Making the installation of front-of-site themes easier

Offline

#17 2010-03-09 16:07:36

stephan
Plugin Author
From: Bochum, Germany
Registered: 2004-07-26
Posts: 196
Website

Re: Making the installation of front-of-site themes easier

I’ve seen this document and although I initially liked it quite a bit I came to the conclusion that it is too limited in its approach because it doesn’t take settings, plugins and sections into account.
Why didn’t I update the textbook site with my suggestion? Simply because I fear no one would have noticed :-)


Yoko for Textpattern – A free blog themeMinimum Theme – If all you want to do is write.
Note: I am currently not actively using Textpattern, so I am not in the forums very often

Offline

Board footer

Powered by FluxBB