Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#61 2009-10-29 17:59:54

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

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

I have problems too: unclean themes images layout and no effects at all during creation/deleting of any template.

Just upgraded to 4.2.0.

Last edited by candyman (2009-10-29 18:19:50)

Offline

#62 2009-10-30 10:57:05

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

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

Eeek, I’d forgotten about my updated version, sorry. Try v0.11 instead because it adds a plethora of new stuff:

  • Improved update notifications from Textgarden
  • More robust file support: no more mkdir warnings (thanks thebombsite)
  • Support for screenshots of other formats instead of the, often bloaty, PNG format. Use JPG, GIF, or whatever is your poison (thanks thebombsite)
  • README files no longer trigger an ‘unsupported type’ warning (thanks thebombsite)
  • More consistent CSS names in the admin screen
  • Made global theme more obvious (thanks pieman)
  • Altered prefs tab a bit (thanks pieman)
  • Added .ssc support (thanks pieman)
  • Now ignores .svn subdirs (thanks pieman)
  • Fixed a few warnings and (hopefully) made it more resilient to timeout situations (thanks Gerich)
  • Fixed rogue prefs appearing on Advanced prefs pane and ensured correct plugin flags were set
  • Removed TXP’s hard space in the upload form so Opera and IE wrap (thanks thebombsite)
  • Improved warning messages for compression (primarily zip) problems
  • Removed a few redundant functions and did some housekeeping

Styleplate (.ssc) file support is shamefully plagiarized from various sources on the Interweb. It’s merely a shorthand way of specifying constants and reusable rules in your CSS. Examples robbed from the plugin help:

@branding: #123456;
#header {
  color: @branding;
}
h2 {
  color: @branding;
}

You can also specify whole rule blocks like this (Note the colon after the block name) :

@my_block: {
  margin:0 20px;
  border:3px solid #999;
  font-size:120%;
}
#header {
  color: @branding;
  position:relative;
  @my_block;
}
h2 {
  @my_block;
}

The general idea is that you can create a file called my_sheet.ssc, create your style rules exactly as normal in this file, but you may add constant definitions at the top that you can sprinkle throughout your file. Constant definitions must all begin with an @ and the constant name ends with a colon (keeps things simple for me!)

When you hit Save, your .ssc file is ‘compiled’ into a real .css file of the same name. When it comes time to distribute the theme you can either delete the .ssc file or leave it there so others (or you) may use it in future. Your choice.

MattD

Hmmm, damn permissions. Try the latest version, though I’m not sure it’ll help because if it’s having problems installing a theme due to file permissions on the theme directory you’ll have to increase the permissions first.

candyman

Weird. Have you done a hard refresh to make sure the CSS rules are being read correctly? Try the new version of the plugin and see if it helps.

That screenshot looks a bit Safari-ish (is it?) I’ve never tested it on that platform. What browser version are you using? Anyone else having visual problems on Safari, or any other browsers for that matter?

All

As ever, please let me know how you get on with this version. Good, bad, or ugly it all helps…

Last edited by Bloke (2009-11-02 21:51:01)


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

#63 2009-11-02 21:48:10

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

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

A minor update v0.12. This version only caches theme version info for themes that are installed in your TXP. Just saves cluttering up the prefs table unnecessarily.


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

#64 2009-11-02 22:10:06

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

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

Bloke wrote:
Have you done a hard refresh to make sure the CSS rules are being read correctly? Try the new version of the plugin and see if it helps.
That screenshot looks a bit Safari-ish (is it?) I’ve never tested it on that platform. What browser version are you using? Anyone else having visual problems on Safari, or any other browsers for that matter?

The v1.11 solved the problem, thanks! Yes, I use the latest version of Safari (4.0.3).

With v1.12 has appeared the text [GLOBAL] beside the theme name. Is that OK?

Last edited by candyman (2009-11-02 22:14:25)

Offline

#65 2009-11-02 22:19:34

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

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

candyman wrote:

The v1.11 solved the problem, thanks!

Excellent stuff.

With v1.12 has appeared the text [GLOBAL] beside the theme name. Is that OK?

Yep. The old way of displaying a tiny asterisk by the side of the currently active global theme was too difficult to see so I made it more obvious. You can change the global (i.e. site-wide default) theme from the plugin Preferences as normal.


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

#66 2009-11-03 07:54:09

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

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

Sorry Stef, I didn’t understand how can I replace the [GLOBAL] text (which indicates which ehtme is actually active, isn’t it?) with another one or an icon… I’ve looked at the smd_admin_themes preferences with no luck…

Offline

#67 2009-11-03 09:36:41

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

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

candyman wrote:

how can I replace the [GLOBAL] text (which indicates which ehtme is actually active, isn’t it?) with another one or an icon…

OK, firstly, the [GLOBAL] text is hard-coded in the plugin. If you want to change the actual text, you’ll need to go right to the bottom of the plugin and look for a string named is_global and alter the text on the right hand side of the => sign. That’s where you change all plugin strings if you want to localise the plugin into a different language.

Secondly, the global theme does not necessarily indicate the active theme. It indicates which is the default (or fallback) theme.

In the plugin preferences, if you set the theme system to “one theme for everyone” then, yes, the GLOBAL theme will be the one in use by all people (except Publishers). If you choose either of the other two options (one theme per group or one theme per user) then the GLOBAL theme that you choose in the plugin’s preferences will only be used in those instances where the theme is not available to the plugin. Primarily, this occurs in the following situations:

  1. when you are on the Admin->Plugins tab (because my plugin is not permitted to run there)
  2. when you are on the Login page (ditto)
  3. when a theme has been deleted by a Publisher and somebody is using that deleted theme

The reason the [GLOBAL] theme is tagged in such a way — and may in fact be different to the theme you are currently seeing — is because you, as a Publisher, can switch themes without affecting anybody else. This allows you to develop and try out themes with a substantially reduced fear of messing up anybody else’s admin side experience. When you have tested it and you are comfortable that a theme works the way you want, you can go into the plugin preferences and set it to be the global (or fallback) theme. It will then be displayed to your users depending on the theme system you have chosen in the plugin prefs (or when one of the above 3 conditions are met).

Does that clear it up or have I confused you even further?!

EDIT: Hmmm, perhaps I should rename it [DEFAULT] instead?

Last edited by Bloke (2009-11-03 09:41:18)


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

#68 2009-11-03 15:20:09

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

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

My vote for [DEFAULT].
For the other things, look at this.

Offline

#69 2009-11-03 17:37:31

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,254
Website

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

Bloke wrote:

MattD

Hmmm, damn permissions. Try the latest version, though I’m not sure it’ll help because if it’s having problems installing a theme due to file permissions on the theme directory you’ll have to increase the permissions first.

Installed the new version and installed a new theme from Textgarden with no errors. Didn’t even change permissions.


My Plugins

Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker

Offline

#70 2009-11-03 20:12:43

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

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

Hi Stef. I just installed the latest 0.12 version to my XAMPP install and I’m getting this:-

Deprecated: Function ereg_replace() is deprecated in C:\xampp\htdocs\textgarden\textpattern\lib\txplib_misc.php(594) : eval()'d code on line 295

It repeats several times. If I thought I was going to live long enough I would count them for you. Seriously though it repeats itself endlessly. Is it me or is it you? ;)

Should mention I’m on r3283 in my XAMPP install.

I also installed it to 4 “live” sites, all at r3283 with no problem. Of course my XAMPP install may be way in advance of any “live” server or it may just need something switching on or off. :)

Last edited by thebombsite (2009-11-03 20:22:10)


Stuart

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

Offline

#71 2009-11-04 08:34:44

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

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

thebombsite wrote:

Function ereg_replace() is deprecated

Nuts, that function is deprecated in PHP 5.3+. The docs say to “swap it for preg_replace with the i modifier” instead. Whatever that means, I’ll figure it out and issue a fix. Thanks for letting me know.


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

#72 2009-11-04 17:00:16

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

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

That would fit. My XAMPP install is PHP 5.3.0 apparently.

I’m not too worried other than it is where Textgarden V2 is currently sitting so I would have to remove the plugin from Textpattern in XAMPP before importing the database to the “live” site, then re-install it on the “live” site.

No “biggie” but if I decided to install another instance of Textpattern specifically to create a new admin theme, not that I really have the time at the moment…

Last edited by thebombsite (2009-11-04 17:05:25)


Stuart

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

Offline

Board footer

Powered by FluxBB