Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-05-07 09:38:20

FireFusion
Member
Registered: 2005-05-10
Posts: 698

[request] Find and replace

It would be great to have a find and replace feature that worked on articles, pages, forms, custom fields etc.

I’ve seen it done in EE.

Very useful if you want to change a tag that spans across multiple articles.

Offline

#2 2007-05-07 15:22:08

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: [request] Find and replace

Great idea. This would be awesome.

Offline

#3 2007-05-07 15:36:22

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,091
Website GitHub Mastodon Twitter

Re: [request] Find and replace

mrdale wrote:

Great idea. This would be awesome.

Indeed! Would this or this give someone a boot start?

Last edited by colak (2007-05-07 15:42:49)


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#4 2007-05-08 10:36:10

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,449
Website GitHub

Re: [request] Find and replace

I don’t think it’s a huge task, although there’s obvious potential for things to go very wrong with a few ill-placed quotes in the search/replace strings. Would need rigorous testing with all manner of crazy input, and would be useful to be able to limit it to particular segments of the database in case a global SnR is not required for whatever reason.

I’ve never done an admin-side plugin before, but I could maybe take look at implementing this given a bit of time to learn the ropes. And plenty of chocolate.

However, a better solution might be to gently prod Rob Sable and see if it can be added to his awesome rss_admin_db_manager plugin. It would fit nicely in there, if he’s game.


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

Offline

#5 2007-05-08 23:54:13

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: [request] Find and replace

Have you thought of using mcw_templates and doing it via a desktop program?

Offline

#6 2007-06-03 08:23:05

FireFusion
Member
Registered: 2005-05-10
Posts: 698

Re: [request] Find and replace

I tried this code and it worked but one of the problems is the database has a “Body” field and a “Body_html” field. So you’d have to do two statements for every find and replace as one doesn’t update the other unless you save the article again.

So a good plugin just need an interface for that statement (a means to select areas via drop down is a must) and function to update “Body_html” on all the articles that have been updated.

Offline

Board footer

Powered by FluxBB