Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#169 2012-09-11 23:47:33

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

Re: smd_admin_themes: Manage, edit, switch and share admin-side themes

I’ve thrown up a version of this plugin that works with 4.5.0+. Grab it from the beta page and let me know how you get on.

Features:

  • Textpattern 4.5.0+ only
  • Better folder support
  • Improved file and image handling – supports sass, svg, and textile types
  • Preview facility added for .svg and .textile files
  • Multi-file uploads supported (one validation error, but I don’t care)
  • Placeholder image added for themes without screenshots (thanks philwareham)

The revamped theme editing interface works well across the core themes, but it renders a puny thin textarea in sandspace4 for some reason. It might be my markup, so if you have any insights, phiw13 or anyone, then please let me know what I can do (oh, and btw, there appears to be rol="navigation" in sandspace4 at the moment, but it’s a minor thing considering the core’s doctype doesn’t support it anyway).

Once I’ve ironed out any remaining display issues with it, I’ll release it as a final version, but I think it’s pretty close now. Will await feedback, thanks for bearing with me while I bring the plugins up to date.

Last edited by Bloke (2012-09-11 23:48:30)


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

#170 2012-09-13 00:29:01

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,220
Website

Re: smd_admin_themes: Manage, edit, switch and share admin-side themes

Bloke wrote:

The revamped theme editing interface works well across the core themes, but it renders a puny thin textarea in sandspace4 for some reason. It might be my markup, so if you have any insights, phiw13 or anyone, then please let me know what I can do (oh, and btw, there appears to be rol="navigation" in sandspace4 at the moment, but it’s a minor thing considering the core’s doctype doesn’t support it anyway).

::sigh:: you use the same markup as the style tab (nothing wrong with that, per se). My stylesheet doesn’t account for the fact that it might be reused for other panes. I’ll release an update later today. And guilty as charged for the rol="navigation"; it was fixed in my work files, but apparently the early august HD crash messed up somewhere :-(.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#171 2012-09-13 00:50:10

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,220
Website

Re: smd_admin_themes: Manage, edit, switch and share admin-side themes

BTW – If you make some additional changes to the markup, can your wrap the content of that edit textarea column in a div id="main_content" (same as the styles tab)? Just for consistency’s sake, no obligation.

Basically: <td class="column"><div id="main_content"><h1>Edit $themename</h1>…


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#172 2012-09-13 01:01:42

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

Re: smd_admin_themes: Manage, edit, switch and share admin-side themes

phiw13 wrote:

BTW – If you make some additional changes to the markup, can your wrap the content of that edit textarea column in a div id="main_content" (same as the styles tab)?

Sure, good catch. I forgot that bit when I went back to fix it for 4.5.0.


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

#173 2013-10-02 09:07:55

jpdupont
Member
Registered: 2004-10-01
Posts: 752

Re: smd_admin_themes: Manage, edit, switch and share admin-side themes

Stef,

On 2 new installs, 4.5.4, on 3 of yours plugins, the language strings are not translated … What’s the problem ?

smd_admin theme, ied_plugin_composer, smd_users_manager …

Offline

#174 2013-10-02 11:13:44

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,310

Re: smd_admin_themes: Manage, edit, switch and share admin-side themes

JP, that’s also been mentioned here and discussed below.


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#175 2013-10-02 12:42:17

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

Re: smd_admin_themes: Manage, edit, switch and share admin-side themes

jpdupont wrote:

On 2 new installs, 4.5.4, on 3 of yours plugins, the language strings are not translated … What’s the problem ?

Eeegads, sorry. I implemented textpack support and added some public download/list tags in ied_plugin_composer so my site now serves plugins that way instead of using rah_plugin_downloader, but I forgot to assign the textpack prefixes to my plugins, d’oh!

I’ve just gone through and done that to all of them so either go download the plugins again from my site, or visit stefdawson.com/sw/plugins and download the textpacks directly from the links in the header of each plugin, then install them as normal from Admin->Preferences->Languages.

Sorry again for the shoddy support.

Last edited by Bloke (2013-10-02 12:42:40)


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

#176 2014-09-14 17:03:37

candyman
Member
From: Italy
Registered: 2006-08-08
Posts: 684

Re: smd_admin_themes: Manage, edit, switch and share admin-side themes

Very odd: I can switch the admin themes without any problem except for the Plugins page that always keep the default theme despite the choice.
What am I missing?

Last edited by candyman (2014-09-14 17:04:08)

Offline

#177 2014-09-14 19:21:41

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

Re: smd_admin_themes: Manage, edit, switch and share admin-side themes

candyman wrote #283742:

I can switch the admin themes without any problem except for the Plugins page that always keep the default theme despite the choice. What am I missing?

Nothing. That’s the way it works. No plugins run on the Plugins page, including smd_admin_themes, so you always get the default theme.


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

#178 2016-09-14 00:00:04

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

Re: smd_admin_themes: Manage, edit, switch and share admin-side themes

The plugin has been updated for Txp 4.6.0, aligning it with the new layout model. Plus a few visual tweaks, moving things around for a better workflow, fixing a few warnings here and there for newer PHP versions, and so forth.

Because it’s not been extensively tested yet, I’m releasing it as a beta. Please grab the release from GitHub and report on the success or otherwise, either in this thread or on the plugin issues page.

For anyone pining after the axed Classic theme from 4.6.0, here’s how you can rectify things:

  1. On your server, go to the (now unused) textpattern/themes directory.
  2. Copy the entire classic directory into textpattern/admin-themes.
  3. Go to Extensions->Admin themes and click the Edit button alongside the theme.
  4. Tweak to fix the CSS errors.
  5. Export it and share with the community.

If you wish to rename the theme, you need to do a bit more work between steps 2 and 3:

  • Alter the folder name (e.g. classic2016).
  • Alter the filename of classic.php to match it (e.g. classic2016.php).

And, once you’ve gone to the Edit panel for the theme, click classic2016.php to open it in the textarea, find the line that reads:

class classic_theme extends \Textpattern\Admin\Theme

and change it to:

class classic2016_theme extends \Textpattern\Admin\Theme

Save it, then you’re free to edit at will. At this point you can also switch to the theme to see how much work you have to do.

If you don’t have a copy of the old Classic theme in your server installation, you can checkout Txp 4.5.7 and copy the entire directory from there. Same goes for Remora, but since it’s based on Classic, you’ll need both installed. And remember if you’ve renamed Classic, you’ll also need to alter the extends line inside remora.php to match.

Happy Theme editing!


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

#179 2016-09-27 13:55:25

michaelkpate
Moderator
From: Avon Park, FL
Registered: 2004-02-24
Posts: 1,379
Website GitHub Mastodon

Re: smd_admin_themes: Manage, edit, switch and share admin-side themes

I had never used this before because I was always happy with Classic. This is amazing powerful and I look so forward to have something similar for the Front-End in 4.7.

Oh, and the Beta seems to be working perfectly for me.

Offline

#180 2016-09-27 14:01:31

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

Re: smd_admin_themes: Manage, edit, switch and share admin-side themes

michaelkpate wrote #301783:

This is amazing powerful and I look so forward to have something similar for the Front-End in 4.7.

Thank you, and for testing the beta.

I hadn’t considered a front-end version for Themes, but I guess there’s a lot of functional overlap so probably isn’t too much of a stretch.

Themes are (will be) switchable and editable from the admin-side anyway, but given that we’re talking about permitting flat file editing and database synchronisation of front-side themes (which keep the version-control group happy) a plugin like this that manages themes in a more modular fashion might be useful. Kind of a halfway house.

Will see how things go when Theme support lands in 4.7.0.


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