Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#136 2011-07-05 13:52:17

jayrope
Plugin Author
From: Berlin
Registered: 2006-07-06
Posts: 726
Website Mastodon

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

Answering myself: Permissions on themes folder were 757. had to set them to 777 to make it work. Doesn’t look ideal to me… but it works.


A hole turned upside down is a dome, when there’s also gravity.

Offline

#137 2011-07-05 13:53:17

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

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

jayrope wrote:

/* That means insufficient priviledges */

In which case, the slew of errors will be the fact the plugin cannot read and/or write to the textpattern/theme directory. Please check the permissions on that folder are set appropriately — they should be owned by the same user & group as the other dirs and should ideally have 664 privs at a minimum (some hosts require higher).


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

Offline

#138 2011-07-05 13:54:44

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

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

jayrope wrote:

Answering myself: Permissions on themes folder were 757. had to set them to 777 to make it work. Doesn’t look ideal to me… but it works.

Yeah, it depends on your host. I’d be nervous about 777 (775 is the maximum I feel comfortable with) but in some places having wide open permissions is sadly unavoidable.


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

Offline

#139 2011-09-20 14:59:46

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

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

Just as an update, the feature added to v0.27 is broken and should not be used. I’m considering revoking v0.27 and recommending a downgrade to v0.26, but I’m talking with maniqui about other workarounds to his multi-site problem. This may spawn a new (working!) v0.28 instead so watch this space.

Sorry for the duff code. It doesn’t affect the operation of the plugin in either single or multi-site mode because:

  1. you can’t save the new pref (duh!)
  2. even if you could, the plugin doesn’t properly use the path you specify (the core uses hard-coded paths to the theme dir)

But if it makes you in any way nervous, grab the previous version from my code archive and install that. You can safely remove the smd_at_file_path preference too if you wish, or just leave it floating around.

Last edited by Bloke (2011-09-20 15:00:16)


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

Offline

#140 2011-09-28 22:16:45

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

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

Pending further investigation I’ve revoked v0.27 and issued v0.28 instead which just fixes the slashes being erroneously stripped off on save of files.

Sorry about the false hope of multi-site path nirvana.


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

Offline

#141 2012-01-24 14:48:13

/dav/random
New Member
Registered: 2012-01-24
Posts: 7
Website

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

Hi,
I’m very new to textpattern, but I have some CMS/coding knowledge.
Going to the point:
I’m using textpattern 4.4.1 and your (smd_admin_themes) plugin… I would like to change the default theme without messing around too much. I had a similar issue mentioned by jayrope, but solved.

Now let’s say I want to install one of the themes listed here: http://textgarden.org/administration-themes
and I try with the first one “Hive”.
What i get is:
Notice: Undefined index: filename in /var/www/virtual/scaini.org/htdocs/site/textpattern/lib/txplib_misc.php(653) : eval()’d code on line 847
Installation failed :-( Check the archive

I tried with several themes, with no luck at all… can you help me?
Thanks a lot
d

Offline

#142 2012-01-24 15:56:33

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

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

/dav/random wrote:

Notice: Undefined index: filename in /var/www/virtual/scaini.org/htdocs/site/textpattern/lib/txplib_misc.php(653) : eval()’d code on line 847

Hmmmm, odd. If it got that far then I guess you have .zip support on your server. And the themes themselves are all packaged correctly. Can’t see why it would be failing. I suppose we could try outputting some debug info. If you look at the plugin code, somewhere around line 795 you’ll see this:

// $zip->debug = true;

If you uncomment the line by removing the //, save the plugin and try to import again you should see a truckload of info thrown to the screen. Some of that might help track down why it can’t find the filename needed to verify that the archive is valid. Past that and verifying you have PHP 5+ installed on your host with the appropriate zlib extensions, I can’t think why it would be failing. If you could post any diagnostic info that looks relevant either here, or e-mail me via the forum or my site (when the server / mail system comes back online, though it might be a while yet) I may be able to figure out what’s going wrong.


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

Offline

#143 2012-01-24 17:21:03

/dav/random
New Member
Registered: 2012-01-24
Posts: 7
Website

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

Ok,

just fast reply with some info (then I’ll try to enable the debug info):

- PHP Version: 4.4.4-8+etch6 (is that really a problem?)

- textpattern says that these extensions are disabled on my server: escapeshellarg, escapeshellcmd, proc_terminate, show_source, ini_restore, ini_alter, symlink

… do you think I have to contact the hosting?
Thanks in advance
d

Last edited by /dav/random (2012-01-24 17:22:00)

Offline

#144 2012-01-24 18:42:06

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

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

/dav/random wrote:

PHP Version: 4.4.4-8+etch6 (is that really a problem?)

Might be. I can’t remember offhand of the minimum specs of the plugin (and can’t verify it at the moment). More likely you’ll need to make sure zlib is compiled in (Txp’s High diagnostics should tell you that I think). If you look beneath your Upload box where you import the themes, does it mention that one of the supported types is zip?

disabled on my server: escapeshellarg, escapeshellcmd, proc_terminate, show_source, ini_restore, ini_alter, symlink

I don’t think that will impact it as I don’t use those features in the plugin.

The debug info will probably shed more light on this. Weird it’s not working.


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

Offline

#145 2012-01-25 15:55:15

/dav/random
New Member
Registered: 2012-01-24
Posts: 7
Website

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

Hi Bloke, I’ve done some work ;) first some info maybe useful for the debug:
  • trying to modify the plugin from admin>plug-in>modify i cannot save the changes and the system prompts to me an 501 error…
  • so i compiled again your plugin with the debug option (so i learnt how to build a plugin ;) )
    and I have some log for you.

But since this happened, I have a great suspect: something may be wrong with the permissions of files and folders… gust a guess but no solution (I’m totally new to textpattern :P).
Here some output: for hive theme and for life theme

Thank you in advance for your time
d

Last edited by /dav/random (2012-01-25 15:57:36)

Offline

#146 2012-01-25 16:13:34

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

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

/dav/random wrote:

But since this happened, I have a great suspect: something may be wrong with the permissions of files and folders…

I concur. I get exactly the same output as you except I also get the following lines at the bottom:

dUnzip2: Returning already loaded file list.
dUnzip2: Creating folder: /path/to/textpattern/theme//hive
dUnzip2: Creating folder: /path/to/textpattern/theme//hive/color
dUnzip2: Creating folder: /path/to/textpattern/theme//hive/color/blue
dUnzip2: Creating folder: /path/to/textpattern/theme//hive/color/default
dUnzip2: Creating folder: /path/to/textpattern/theme//hive/color/green

So, ignoring the fact it’s showing double slashes at the end (no idea why: that bit’s part of dunzip2, not my code), it seems yours can’t make the directories. So first of all, please check your textpattern/theme directory is writable by the server. Mine is set at 755 permissions but it varies from host to host depending on how things are set up.

Second question: are you using v0.28 of the plugin?

oh, and btw, ‘Life’ is not an admin-theme :-)


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

Offline

#147 2012-01-25 16:31:53

/dav/random
New Member
Registered: 2012-01-24
Posts: 7
Website

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

… you’re so fast!
:P

  • Yes my textpattern/theme is 777 … but I guess that maybe the folder for temporary files and for plugins cache has something to do with this (but i previously set them to 777).
  • I’m using the v0.28
  • your “btw, ‘Life’ is not an admin-theme” can shed a light on this problem (I think you’re going to kill me): so for let’s say “regular” theming this plugin in not suitable and I have to do all the work… by hand? copying, alter the forms etc etc… I thought it was a fast way to switch between themes, for the whole site (like “Administrate Themes”). Am I wrong?

sorry and thanks
d

Last edited by /dav/random (2012-01-25 16:40:10)

Offline

#148 2012-01-25 16:39:31

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

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

/dav/random wrote:

Yes my textpattern/theme is 777

Can’t get much more open than that!

for let’s say “regular” theming this plugin in not suitable and I have to do all the work… by hand?

Correct. Textpattern doesn’t have one-click front-of-house themes yet. You can ease the workload with a plugin. I can’t remember which one is in vogue right now. Might be hcg_templates or mem_templates. Stuart probably mentions which is best to use on the textgarden site.

Sorry I can’t help with this installation thing though. It definitely sounds like it’s server related but I can’t think why offhand. Maybe have a look at your Txp High Diagnostics (Admin tab) and see if anything in there sheds any light on it.

Last edited by Bloke (2012-01-25 16:39:54)


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

Offline

#149 2012-01-25 16:42:31

/dav/random
New Member
Registered: 2012-01-24
Posts: 7
Website

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

Thanks indeed!
My first experience in txp community, and looks great! ;) thanks for your time … I’ll go and learn something more about txp.
Thanks again
d

Offline

#150 2012-01-29 02:55:12

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

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

Maintenance release v0.30 is available. While there are no new user features in this version I have taken the opportunity to do a few things to help serve people better in future:

  • Removed all compression / decompression algorithms from this plugin and made them into a separate plugin called smd_crunchers
  • Upgraded the algorithms to the latest versions, some of which have improved security features
  • Made smd_crunchers a sort of required plugin for smd_admin_themes. If you do not install it, you can still use smd_admin_themes for creating, editing, and cloning themes, you just won’t be able to install new ones or export your themes to share with others from the interface (you’ll have to do it manually via FTP and an external archive tool)

While this might seem like a backwards step and necessitates yet another smd_ prefixed plugin in your list, it offers a few benefits:

  1. The plugin’s about 1400 lines of code shorter
  2. I can keep the algorithms up-to-date without having to release a new version of smd_admin_themes
  3. I can use the library in other plugins — and I have one or two that will need compression types in the near future
  4. Other people can use the library if they wish to offer compression / decompression features without having to rely on disparate PHP extensions being loaded (or not)

You will need PHP5 to use smd_crunchers since the latest version of one of the algorithms does. In light of this change and the library dependence I’ve bumped the major version number of smd_admin_themes, but functionally you won’t notice anything as long as your server meets these requirements and you install both plugins.

Hope that all makes sense.


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

Offline

Board footer

Powered by FluxBB