When I used to HTML by hand, search 'n' replace was easy with text editor.
I finally made the site live last night by modifying htaccess, only to find path written in node bodies are all wrong. Where it says: src/href="sites/.. It should had said: src/href="/sites/..
There are million places I have to edit. How can I do this Search and Replace in one shot?
P.S., I like Image_assist because thumbnail popups to original sized image. I don't like Filtered HTML since I don't get full control, but Image_assist puts absolute path including the domain name so I typed path manually every time I added image. Now it's biting me.
Embedding image and make it act as I wish has been one of the most frustrating issues with Drupal so far. I am also frustrated AcidFree. How are others dealing with this?
A fast solution is to dump the database into an .sql file, and do a search&replace on it. Another method would be to do a mysql update using the replace function: http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_replac...
regards,
s
Wed, 13 Jun 2007 10:17:30 -0400 -n "A-NO-NE Music" madflute@anonemusic.com írta:
I finally made the site live last night by modifying htaccess, only to find path written in node bodies are all wrong. Where it says: src/href="sites/.. It should had said: src/href="/sites/..
There are million places I have to edit. How can I do this Search and Replace in one shot?
In a SQL prompt you could do
UPDATE [table_name] SET [field_name] = REPLACE([field_name],'[string_to_find]','[string_to_replace]');
Replace the [stuff] including the [] with the tables you want to effect and the fields...
So UPDATE node_revisions SET body = REPLACE(body, Red¹, Blue¹);
Would replace all Reds with Blues in the table node_revisions and the field body.
BACK YOUR DATABASE UP BEFORE YOU TRY THIS!
Mike Bishop / 2007/06/13 / 05:48 PM wrote:
In a SQL prompt you could do
UPDATE [table_name] SET [field_name] = REPLACE([field_name],'[string_to_find]','[string_to_replace]');
Thank you so much for this. Actually I chickened out and I ended up with retyping manually. I saved your response and put it in my safe. I will practice :-)