Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#16 2017-10-17 09:51:40

etc
Developer
Registered: 2010-11-11
Posts: 5,689
Website GitHub

Re: Themes setup: where to load?

Bloke wrote #307399:

It’s a great starting point for an out-of-the-box experience, plus the inline documentation is a wonderful learning aid to help newbies take the next steps towards customization.

Phil’s theme is working brilliantly, but for newbies its txp templates may look way too complex. I would suggest we also ship a minimal Basic theme for learning purposes, including switching between two themes.

Offline

#17 2017-10-17 09:53:22

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,566
Website GitHub Mastodon

Re: Themes setup: where to load?

etc wrote #307410:

Phil’s theme is working brilliantly, but for newbies its txp templates may look way too complex. I would suggest we also ship a minimal Basic theme for learning purposes, including switching between two themes.

I’m fine with that. Once the theme branch is ready I can make a basic theme very easily.

Offline

#18 2017-10-17 09:59:33

etc
Developer
Registered: 2010-11-11
Posts: 5,689
Website GitHub

Re: Themes setup: where to load?

philwareham wrote #307409:

I don’t really understand why the name change is needed, but OK.

It’s needed only on upgrades, to avoid name collisions, since the old installs already have a default “theme”. And if you put the new default in setup, it will not be available to old installs, which is pity.

Please bear in mind the original repo is already well established as default so I’d have to change that, and any inbound links to it, to whatever name you suggest.

We could rename the old default to something else instead, but it would be a bit disturbing for site admins. Sorry to cause you an extra work, but my intentions are fair. :-)

Offline

#19 2017-10-17 10:00:21

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,499
Website GitHub

Re: Themes setup: where to load?

philwareham wrote #307409:

I don’t really understand why the name change is needed

Not needed, as such. Just differentiates the default theme in 4.6 that wasn’t really a Theme (as we’re terming it in 4.7+) because it wasn’t exportable into a folder structure. Tentative argument, I admit.

More compelling is the argument that, on upgrade, we’ll be calling everyone’s currently-installed theme default – because we have to name it something, and we have no idea what features such a theme might have. So my ‘default’ theme on my website will be the same name as your ‘default’ theme on designhive. If we also continue to refer to the factory theme as ‘default’, well it’s one more potentially confusing usage of ‘default’ in the world. We’d have to be sure to differentiate between “your default” (the one used at upgrade) and “the default” (factory) theme when answering support requests.

Please bear in mind the original repo is already well established as default so I’d have to change that, and any inbound links to it, to whatever name you suggest.

The repo itself doesn’t necessarily have to change name. Just the manifest inside it so that when you push any of its changes to Textpattern it goes in the setup folder and has a consistent name.


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

Hire Txp Builders – finely-crafted code, design and Txp

Online

#20 2017-10-17 10:04:13

etc
Developer
Registered: 2010-11-11
Posts: 5,689
Website GitHub

Re: Themes setup: where to load?

Bloke wrote #307408:

Think you just nominated yourself for a job ;-)

Usual conditions? :-)

That’s a good point. Upgrades aren’t much of an issue if we only ship the factory theme in setup. But we need to name people’s existing set of pages/forms/styles as something on upgrade so it appears in the Themes panel and can be exported.

I think that a name other than ‘default’ for our factory theme would help distinguish the two. We could then cleanly name anyone’s current theme as ‘default’ and encourage them to change it if they intend to share it with a wider audience.

And put it in the themes folder, there is no reason to privilege one theme.

Offline

#21 2017-10-17 10:06:57

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,499
Website GitHub

Re: Themes setup: where to load?

etc wrote #307412:

And if you put the new default in setup, it will not be available to old installs, which is pity.

Well if we call it something else, it can be shipped in the themes directory, no problem! My argument in the OP was that it would cause confusion if we had “your default theme” and “our default theme”.

Maybe if we rename the factory theme, this all goes away: we ship the factory theme (with its new name) in the themes directory, and just leave the article and prefs data in setup, then simply tell the setup routine to only look in the themes directory for its themes, which allows people to drop custom themes alongside.

Setup would need to not proceed if someone emptied the themes dir though.


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

Hire Txp Builders – finely-crafted code, design and Txp

Online

#22 2017-10-17 10:09:21

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,566
Website GitHub Mastodon

Re: Themes setup: where to load?

Ah, OK, I see now – thanks for explaining.

Can someone let me know about issue #950 and I’ll then start working on this.

So to clarify:

1. We need to rename the default theme (and its repo) and place that into the themes directory? Remove whatever is currently in setup.
2. We need to create a new basic (raw) theme – where does that go? Also into themes folder (so not themes reside in setup at all)?

Offline

#23 2017-10-17 10:25:01

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,499
Website GitHub

Re: Themes setup: where to load?

philwareham wrote #307416:

Can someone let me know about issue #950

That makes sense. The manifest should hold all de facto meta data; txp_skin.xml should be axed in due course. Makss??

We need to rename the default theme (and its repo) and place that into the themes directory? Remove whatever is currently in setup.

Correct. Remove pages/forms/styles in setup, but leave articles and prefs etc. Then we can tell setup that its themes will solely come from the themes directory. At the moment, the loading of content is a separate step during setup so we can keep that separate and tell it to still use the setup directory for such content. Longer term, we’ll think about marrying content stuff too.

We need to create a new basic (raw) theme – where does that go? Also into themes folder (so not themes reside in setup at all)?

Yep, exactly. That gives us the best of all worlds. New installations get to choose from:

  1. our current ‘factory’ theme (maybe with a new sexy name)
  2. a super-basic theme
  3. any theme the admin drops in the themes dir

Upgraders will:

  1. have their own theme, called default that may not (at least during upgrade) be written to disk. Need to check this is okay and things don’t break if you, say, rename the theme and it’s not currently been exported to disk. I’m not sure if writing to disk (i.e. calling theme->export) as part of the upgrade process is such a good idea. We’ll have to talk it over.
  2. be able to access the renamed factory theme if they want to install it alongside their default.
  3. be able to install the basic theme.
  4. be able to upload their own themes and install them.

Winner.


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

Hire Txp Builders – finely-crafted code, design and Txp

Online

#24 2017-10-17 10:37:07

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,499
Website GitHub

Re: Themes setup: where to load?

Further, when we do the upgrade, what are we going to set as the currently in-force theme meta data?

  • Name: default
  • Title: default (?)
  • Theme version: ?? Current Txp version?
  • Description: ?? Empty?
  • Author: ?? Pick a ‘Publisher’ user name from those in the system? Use the currently logged-in user, assumed to be the admin who performed the upgrade?
  • Website: ?? Empty maybe?

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

Hire Txp Builders – finely-crafted code, design and Txp

Online

#25 2017-10-17 10:47:05

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,566
Website GitHub Mastodon

Re: Themes setup: where to load?

I would null most of those, apart from the name of course. The author can always edit the meta data through the themes panel if they wish to.

Offline

#26 2017-10-17 10:48:56

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,499
Website GitHub

Re: Themes setup: where to load?

philwareham wrote #307419:

I would null most of those, apart from the name of course. The author can always edit the meta data through the themes panel if they wish to.

Fine by me.


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

Hire Txp Builders – finely-crafted code, design and Txp

Online

#27 2017-10-17 15:11:31

etc
Developer
Registered: 2010-11-11
Posts: 5,689
Website GitHub

Re: Themes setup: where to load?

Bloke wrote #307415:

Setup would need to not proceed if someone emptied the themes dir though.

We should, however, provide a safety net in case this dir is empty.

Offline

#28 2017-10-17 15:40:51

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,499
Website GitHub

Re: Themes setup: where to load?

etc wrote #307424:

We should, however, provide a safety net in case this dir is empty.

Ummm, like a link to a downloadable bundle that contains the default theme that they can unzip into themes in order to proceed with the installation?

Better suggestions welcome :-)


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

Hire Txp Builders – finely-crafted code, design and Txp

Online

#29 2017-10-19 12:18:41

makss
Plugin Author
From: Ukraine
Registered: 2008-10-21
Posts: 355

Re: Themes setup: where to load?

Bloke wrote #307399:

Absolutely. In fact, I think makss did just that, changing the setup routine to use Form folders and manifest.json.

Yes, that’s right, only I thought that this would be a temporary solution, so I did not put the default theme in a separate folder. Now I tried to fix it (we still need to test this code).


aks_cron : Cron inside Textpattern | aks_article : extended article_custom tag
aks_cache : cache for TxP | aks_dragdrop : Drag&Drop categories (article, link, image, file)

Offline

Board footer

Powered by FluxBB