Run Spartacus with safe_mode on

Creating and modifying plugins.
Post Reply
VladaAjgl
Regular
Posts: 44
Joined: Mon Nov 19, 2007 10:00 pm
Contact:

Run Spartacus with safe_mode on

Post by VladaAjgl »

Hi boys and girls,
I have almost broken my head thinking how to put Spartacus in work on my web server with safe_mode on (the provider doesn't want to change it, he says "security reasons"...). But finally I made it up :-)

The only trouble in the spartacus is the creating of directories. When you create them in standard way, you cannot change their privilegies and because standard privilegies are not write privilegies for php... . My solution is to create the directories using ftp access. So I added this function and modified Spartacus plugin accordingly. This solves the Spartacus download trouble. But it can pretty well fix the trouble when creating directories in media administration. It is only necessary to inlude a new event hook call in (/include/admin/images.inc.php) file. The hook is then processed in Spartacus plugin.

You can download modified files for testing at:
http://vlada.ajgl.cz/myplugins/spartacu ... load_1.zip

If you, the developpers of Serendipity, find it good, feel free to include my code in next release.

Bye Vladimir
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Run Spartacus with safe_mode on

Post by garvinhicking »

Hi!

The idea is great! However you took a spartacsu version from 1.2 instead of 1.3, so your patch undos some changes of newer spartacus versions. Would you have the time to update the spartacus plugin to the 1.3 code and deliver a patch for that? I'd love to implement your functionality, this rocks!

another idea: Could you reduce the amount of FTP input fields? You could store the ftp login format in this way: "ftp://user:password@host/directory", then you'd only have one input field instead of 4...?

And maybe in the introspect_config_item you could check if the ftp_* commands exist, before offering those options?

Last but not least: The format of include/admin/images.inc.php has also changed for s9y 1.3, could you also there include your changes for the new version instead?

Since this functionality might break things, I'd only add it for the 1.3 version tree, not the 1.2.1 one.

Great work!

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
VladaAjgl
Regular
Posts: 44
Joined: Mon Nov 19, 2007 10:00 pm
Contact:

Re: Run Spartacus with safe_mode on

Post by VladaAjgl »

version of Spartacus - That's the problem when you work on something locally and you do not care if there is new version available (as I did) ;-) Yes, I will update the last version files.

introspect_config_item - yes, I agree, that's good idea

reducing the input fields: Technically it is possible without any problem. My first idea was to do that intuitively, such as it is in ftp file managers, where there are separate fileds for each setting. Because IMHO users who are not much experienced could be confused by the format "ftp://user:password@host/directory". And Spartacus is the plugin, which is used by almost all serendipity bloggers. ... I can agree with the fact that one field instead of four is better, and in the description text we can give an example. I'd only like to know if my first idea is correct or not.

Have a nice day
Vladimir
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Run Spartacus with safe_mode on

Post by garvinhicking »

Hi!
VladaAjgl wrote:version of Spartacus - That's the problem when you work on something locally and you do not care if there is new version available (as I did) ;-) Yes, I will update the last version files.
Great. :) It's not so many changes :)
reducing the input fields: Technically it is possible without any problem. My first idea was to do that intuitively, such as it is in ftp file managers, where there are separate fileds for each setting. Because IMHO users who are not much experienced could be confused by the format "ftp://user:password@host/directory". And Spartacus is the plugin, which is used by almost all serendipity bloggers. ... I can agree with the fact that one field instead of four is better, and in the description text we can give an example. I'd only like to know if my first idea is correct or not.
Hm, you might have a point there, I see. That's okay then, leave it with multiple fields. The other syntax might well be optimized for developers, and simple users might be afraid of that. :)

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
VladaAjgl
Regular
Posts: 44
Joined: Mon Nov 19, 2007 10:00 pm
Contact:

Updated

Post by VladaAjgl »

Done :-) --> http://vlada.ajgl.cz/myplugins/spartacu ... load_2.zip

(Spartacus, the image.inc.php was not necessarry to change... incredible... you and me did the same changes, introduced the same hook with the same name :-) )
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Updated

Post by garvinhicking »

Hi!

Great! committed! :)

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply