Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2017-10-17 09:35:56

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

Re: Themes setup: where to load?

philwareham wrote #307405:

OK, that’s fine then. If I upload a new folder called default_theme into setup, and delete the older pages/forms/styles folders there and commit – can you please then hook up that new folder so it works?

Either me or makss, yeah. Though you should be able to move the pages/forms/styles in there instead of deleting them, or copy the latest official theme in there.


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 2017-10-17 09:41:52

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

Re: Themes setup: where to load?

etc wrote #307406:

We can untie whatever we need, it shouldn’t be much code.

Think you just nominated yourself for a job ;-)

The main problem I see is that default is currently (4.6) used as theme, without respecting the themes structure

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.


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

#15 2017-10-17 09:49:36

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

Re: Themes setup: where to load?

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

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.

Offline

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

etc
Developer
Registered: 2010-11-11
Posts: 5,187
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,564
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,187
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: 11,446
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.

Txp Builders – finely-crafted code, design and Txp

Offline

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

etc
Developer
Registered: 2010-11-11
Posts: 5,187
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: 11,446
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.

Txp Builders – finely-crafted code, design and Txp

Offline

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

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
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: 11,446
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.

Txp Builders – finely-crafted code, design and Txp

Offline

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

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,446
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.

Txp Builders – finely-crafted code, design and Txp

Offline

Board footer

Powered by FluxBB