Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#16 2011-07-31 20:35:20

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: sed_cleaner

jpdupont wrote…

It seems the plugin don’t care of the table prefix here “demo_”, and dont’ care of the subdir “demo”, to remove files

Good catch. It doesn’t use table prefixes. I’ll fix that.

The plugin operates on the directories relative to the textpattern directory so those errors are more likely to be file system permissions on the setup directory. The script cant remove what it doesn’t have permission to remove.

Edited to add: I’ve confirmed that directory cleanup works in subdir installations as long as your filesystem permissions allow it.

Last edited by net-carver (2011-07-31 21:17:34)


Steve

Offline

#17 2011-07-31 21:14:45

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: sed_cleaner

v0.4.1 posted.

Should fix the plugin to work with table prefixes.

To opening post for links


Steve

Offline

#18 2011-08-01 09:07:09

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,681
GitHub Twitter

Re: sed_cleaner

Hi Steve.

For plugin help file: Where can we find a complete preference entries list?

Cheers,


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#19 2011-08-01 11:14:09

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

Re: sed_cleaner

Patrick, possibly fewest clicks is via phpMyAdmin.
Another way would be this one.


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

Offline

#20 2011-08-01 11:24:30

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,681
GitHub Twitter

Re: sed_cleaner

Ok Uli.
Good tip. Tks.


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#21 2011-08-01 16:15:11

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: sed_cleaner

all

I updated the documentation linked in the opening post. The ‘usage & installation’ section should be clearer now.

Do let me know your success or failures with this plugin please.

Pat64

I’ll see if I can generate a list of the prefs that can be set.


Steve

Offline

#22 2011-08-01 18:39:14

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,681
GitHub Twitter

Re: sed_cleaner

Hi Steve.

Based on Uli’s advices I edit this file: Preferences List

But don’t know if it’s complete.


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#23 2011-08-01 18:41:07

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: sed_cleaner

I wrote:

I’ll see if I can generate a list of the prefs that can be set.

Done. It’s at the end of the cleanups.php file.

But I see you’ve been busy too :)


Steve

Offline

#24 2011-08-01 19:42:39

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

Re: sed_cleaner

Steve,

I have a home made php reset script :

		// empty tables  
        ...
        ...
		// delete records  
	safe_delete('txp_category','name<>\'root\'');
	safe_delete('txp_section','name<>\'default\'');
	safe_delete('txp_form','name<>\'default\'');
	safe_delete('txp_page','name=\'archive\'');
		// empty fields
	safe_update('txp_css','css=\'\'','name=\'default\'');
	safe_update('txp_form','Form=\'\'','name=\'default\'');
	safe_update('txp_page','user_html=\'\'','name=\'default\'');
	safe_update('txp_page','user_html=\'\'','name=\'error_default\'');

How put these lines in the cleanups.php file ?

Offline

#25 2011-08-01 20:03:45

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: sed_cleaner

Hi jpdupont

Thanks for trying this out! I can use some of what you posted above verbatim.

Edited to add: I may need to extend the commands in cleanups.php to handle some of these after all as they may not be exactly what everyone wants.

Last edited by net-carver (2011-08-01 22:39:55)


Steve

Offline

#26 2011-08-01 20:37:30

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: sed_cleaner

v0.4.2 posted.

Bugfix: don’t delete the category roots when emptying the categories table. (Thanks jpdupont)

To opening post for links.


Steve

Offline

#27 2011-08-01 22:21:29

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: sed_cleaner

v0.5 posted.

Can now do what jpdupont asked for.

To opening post for links


Steve

Offline

#28 2011-08-02 06:31:20

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

Re: sed_cleaner

Thanks Steve !

Maybe a … last idea ???

As the wonderful automatic plugin insertion, an automatic .page, .css, .form file insertion ?

Offline

#29 2011-08-02 08:09:23

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: sed_cleaner

Hi jpdupont,

As I mentioned above, I’m not so keen on turning this into an import mechanism for presentation items as there are plenty of good theme installers around already.

If people can see a gap between what this plugin now does and what a theme installer does, and can convince me of the need, I’ll take a look at adding that functionality.


Steve

Offline

#30 2011-08-02 08:56:25

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

Re: sed_cleaner

What I mean here here, is not a theme installer, but a complete TXP reset/initialisation.
Each time I start a new TXP site, I must remove many things : your pluging actually do the job ! Fine !
Then I paste the same plugins code from other site : now your plugin do the job ! Wonderful !
And finally I paste from other installations the sames css reset, the same form snippets (jquery code / calls, search form, …).
It’s not theme import (I never use pre made theme …), but last step in the initialisation job !

Offline

Board footer

Powered by FluxBB