Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#133 2011-06-24 15:23:16

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

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

I did some a quick test: I opened /lib/txplib_theme.php and changed the two instances of txpath to a hardcoded /path/to/admin/. That only change helped smd_admin_themes to find/list the themes at /admin/theme/ (instead of those at /textpattern/theme/).

It seems to me that smd_admin_themes (more precisely, function smd_at_read_skins()) resorts to some mechanisms provided by txplib_theme.php to find/list the available skins.
So, it doesn’t seem to me that smd_at_file_path is having any effect or relation to the way smd_admin_themes looks for themes.

Now, I wonder if it’s still possible for smd_admin_themes to override/overwrite/redefine the value for txpath at txplib_theme.php, or not rely on that lib at all…
Amaze me one more time, Stef.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#134 2011-06-24 18:49:50

maverick
Member
From: Southeastern Michigan, USA
Registered: 2005-01-14
Posts: 975
Website

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

Julian

I just ran into the issue again on an install I needed to move, and smd_admin_themes needed the path updated. Same as last time: In order to get the new path to save, I had to delete the current preferences and install them again.

Not sure that it helps your situation, but fwiw.

Offline

#135 2011-07-05 13:44:36

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

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

smd_admin_themes 0.26 stopped working here after update from 4.4.0 to 4.4.1. Upgraded to v.027, problem persists.

Upon creating a new theme i get these errors (translation of German error messages in comments below):

Warning: mkdir(theme/author/) [function.mkdir]: Keine Berechtigung in …/textpattern/lib/txplib_misc.php(653) : eval()’d code on line 623
/* That means insufficient priviledges */

Warning: fopen(theme/author/author.php) [function.fopen]: failed to open stream: Datei oder Verzeichnis nicht gefunden in …/textpattern/lib/txplib_misc.php(653) : eval()’d code on line 691
/* File or directory not found */

Warning: fwrite(): supplied argument is not a valid stream resource in …/textpattern/lib/txplib_misc.php(653) : eval()’d code on line 692

Warning: fclose(): supplied argument is not a valid stream resource in …/textpattern/lib/txplib_misc.php(653) : eval()’d code on line 693

Warning: fopen(theme/author/textpattern.css) [function.fopen]: failed to open stream: Datei oder Verzeichnis nicht gefunden in …/textpattern/lib/txplib_misc.php(653) : eval()’d code on line 696
/* File or directory not found */

Warning: fwrite(): supplied argument is not a valid stream resource in …/textpattern/lib/txplib_misc.php(653) : eval()’d code on line 697

Warning: fclose(): supplied argument is not a valid stream resource in …/textpattern/lib/txplib_misc.php(653) : eval()’d code on line 698

Upon trying to upload an existing theme from a saved .zip file i get these errors:

Warning: move_uploaded_file(…/textpattern/theme/php6AF8qI) [function.move-uploaded-file]: failed to open stream: Keine Berechtigung in …/textpattern/lib/txplib_misc.php on line 1486
/* That means insufficient priviledges */

Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move ‘/tmp/php6AF8qI’ to ‘…/textpattern/theme/php6AF8qI’ in …/textpattern/lib/txplib_misc.php on line 1486

To me it almost looks like as if the upgrade to txp 4.4.1 went wrong, but i can’t figure it out, really. Any help in sight?
Thank you very much in advance!

Last edited by jayrope (2011-07-05 13:45:43)


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

Offline

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

jayrope
Plugin Author
From: Berlin
Registered: 2006-07-06
Posts: 684
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: 10,720
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.

Txp Builders – finely-crafted code, design and Txp

Online

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

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

Txp Builders – finely-crafted code, design and Txp

Online

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

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

Txp Builders – finely-crafted code, design and Txp

Online

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

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

Txp Builders – finely-crafted code, design and Txp

Online

#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: 10,720
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.

Txp Builders – finely-crafted code, design and Txp

Online

#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: 10,720
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.

Txp Builders – finely-crafted code, design and Txp

Online

Board footer

Powered by FluxBB