[solved] How To Make Common Change among multiple pages.

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
TJINAK
Forum Members
Forum Members
Posts: 136
Joined: Wed Feb 22, 2006 1:01 am

[solved] How To Make Common Change among multiple pages.

Post by TJINAK »

I need to update a url link on roughly 100 pages within my site.  Is there a quick and easy way to do this?

Here is my scenrio:

Currently tag reads:

http://redoubtrealty.com/Plats,%20Subdi ... 7-6055.pdf

Tag should read:

http://redoubtrealty.com/uploads/images ... 7-6055.pdf

The name of the .pdf changes for each page.

Please see http://redoubtrealty.com/index.php?page=07-6055 for live web site.

Thank you,

TJ
Last edited by TJINAK on Thu Nov 29, 2007 9:02 pm, edited 1 time in total.
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

Re: How To Make Common Change among multiple pages.

Post by RonnyK »

You could use a GCB in the future, that way you only have to change the single value in the GCB.

Ronny
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: How To Make Common Change among multiple pages.

Post by calguy1000 »

Unfortunately there is no 'global search and replace' in CMS..... cool feature idea though. 

something that allows you to select a bunch of pages, then click 'replace strings matching this regular expression with that one'..... it'd be cool.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
TJINAK
Forum Members
Forum Members
Posts: 136
Joined: Wed Feb 22, 2006 1:01 am

Re: How To Make Common Change among multiple pages.

Post by TJINAK »

Okay, so if all the content is stored in mysql is it possible to do a query (search and replace) against the correct table that holds the page content ?

I'm no MySQL guru - I'm just brain storming.

Maybe someone can help me fill in the blanks (table_name, field_name, string_to_find )...

eg:

Code: Select all

update [table_name] set [field_name] = replace([field_name],'[string_to_find]','[string_to_replace]');
Also, would this really work since I'm only wanting to replace a portion of the url, see original post.

Thank you,

TJ
Last edited by TJINAK on Thu Nov 29, 2007 6:42 pm, edited 1 time in total.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: How To Make Common Change among multiple pages.

Post by calguy1000 »

what I would do is:

a) lock out all admin users from the site (a .htaccess file in admin can be used for this).
b) do a mysqldump of the database
c) copy that mysqldump to a backup file (for safety purposes)
d) use an editor or 'sed' to do a global search and replace inside the mysqldump
e) re-import the mysqldump
f) allow admin users to log back in. (remove the .htaccess file)
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
TJINAK
Forum Members
Forum Members
Posts: 136
Joined: Wed Feb 22, 2006 1:01 am

Re: How To Make Common Change among multiple pages.

Post by TJINAK »

I like this suggestion.
I'll give it a go and report back.

TJ
TJINAK
Forum Members
Forum Members
Posts: 136
Joined: Wed Feb 22, 2006 1:01 am

Re: How To Make Common Change among multiple pages.

Post by TJINAK »

Kudos!

604 changes in under 5 min's.

Love it!

Thank you,

TJ
Post Reply

Return to “CMSMS Core”