Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-06-12 07:06:37

geoff777
Plugin Author
From: Benarrabá Andalucía Spain
Registered: 2008-02-19
Posts: 282
Website

[request] Find & Replace

Hi I’d like to see a Find and Replace function for Forms and Pages in Admin.

I know there’s one for articles but one for Forms and Pages would save me a lot of time.

Thanks
Geoff


There are 10 types of people in the world: those who understand binary, and those who don’t.

Offline

#2 2008-06-12 08:17:22

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: [request] Find & Replace

It’d be simpler to edit the template in a text editor. Aside from copy/pasting, you can use the Firefox extension, It’s All Text, or the Edit in Textmate input manager if you use Textmate.

Offline

#3 2008-06-12 09:39:59

geoff777
Plugin Author
From: Benarrabá Andalucía Spain
Registered: 2008-02-19
Posts: 282
Website

Re: [request] Find & Replace

I was thinking of a find and replace across multiple forms and/or pages.


There are 10 types of people in the world: those who understand binary, and those who don’t.

Offline

#4 2008-06-12 10:46:08

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,410

Re: [request] Find & Replace

geoff777 wrote:

I was thinking of a find and replace across multiple forms and/or pages.

In this cases I think the only non-elegant but quick solution is to use directly some sql queries on the db (backup first)

Offline

#5 2008-06-12 10:56:28

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

Re: [request] Find & Replace

I’ve already tried to work on such stuff myself. I’ts incredibly hard to solve if it shall work reliably. Everything you’re free to name like output_form naming, section names, category names (same applies to ~titles), parameters, values, etc. can stand in your way … [Edit: I meant SQL queries. Plugin authors welcome!]

Last edited by uli (2008-06-12 10:59:06)


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

Offline

#6 2008-06-12 11:13:58

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,410

Re: [request] Find & Replace

uli wrote:

I’ve already tried to work on such stuff myself. I’ts incredibly hard to solve if it shall work reliably. Everything you’re free to name like output_form naming, section names, category names (same applies to ~titles), parameters, values, etc. can stand in your way … [Edit: I meant SQL queries. Plugin authors welcome!]

Well I suggest always performing this kind of operations locally.
Consider also that the reliability of the operation is directly connected to the complexity of the query.
I’m not talking here about complex regexp queries but something like “find this word in all articles of section x and replace with this”.
Maybe I’m wrong but I don’t think this – if done carefully – can cause heavy damage.

Last edited by redbot (2008-06-12 11:16:09)

Offline

#7 2008-06-12 11:20:09

the_ghost
Plugin Author
From: Minsk, The Republic of Belarus
Registered: 2007-07-26
Posts: 907
Website

Re: [request] Find & Replace

It seems there was plugin – lam_search_replace


Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?

Offline

#8 2008-06-12 11:23:04

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,410

Re: [request] Find & Replace

the_ghost wrote:

It seems there was plugin – lam_search_replace

Yes, but I think it only works with articles body and excerpts, not page and forms

Offline

#9 2008-06-12 12:43:48

zero
Member
From: Lancashire
Registered: 2004-04-19
Posts: 1,445
Website

Re: [request] Find & Replace

You could use hcg_templates to export all your pages, forms and styles, search and replace locally and reimport them. The plugin is very fast so it wouldn’t be much trouble.


Gud One Blog
Wondrous Healing Wondrous ways to a healthy old age

Offline

#10 2008-06-12 13:08:47

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,410

Re: [request] Find & Replace

zero wrote:

You could use hcg_templates to export all your pages, forms and styles, search and replace locally and reimport them. The plugin is very fast so it wouldn’t be much trouble.

Yes Zero, but even in this case he will have to perform some sort of sql query no?

Offline

#11 2008-06-12 13:12:17

zero
Member
From: Lancashire
Registered: 2004-04-19
Posts: 1,445
Website

Re: [request] Find & Replace

No, it exports as text files.


Gud One Blog
Wondrous Healing Wondrous ways to a healthy old age

Offline

#12 2008-06-12 13:14:22

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,410

Re: [request] Find & Replace

zero wrote:

No, it exports as text files.

ah yes you’re right

Offline

Board footer

Powered by FluxBB