PDA

View Full Version : Wrong image path after changing the forum path


stckhlm
04-21-2009, 03:36 PM
I've changed my current forum path from ../forum/ to ../
(domain.com/forum --> domain.com)

Everything works fine after this change. But i have a problem with the images in GARS. The header images and other images in custom modules still using the old path. When i check the source i see the image link as domain.com/forum/image_path.

Can someone please help me to make it as it has to be ? (domain.com/image_path

I did change the path settings in ACP.

Regards

Morgan
04-22-2009, 01:48 PM
Are both of the following settings correct in the ACP -> GARS -> Settings?

Absolute path to images folder
FULL URL to your default images folder

stckhlm
05-09-2009, 08:26 PM
I have some problem actually. Even the above mentioned path to image folder and full url to default image folder is correct, some threads still using the /forum path for images. But when i remove the "forum" path from the address bar, then i can see the image.

I couldnt solve this problem...

Morgan
05-11-2009, 05:54 PM
Changing paths in the ACP doesn't necessary change content, i.e., content in a post is whatever it is and changing a path doesn't change the post content with or without GARS, so you'd need to either do an .htaccess 301 redirect for the images, or you can query the database to update the content.

Here is a generic MySQL query that will do search/replace. Take backups before running this query!!! You need to set the values in lowercase:

UPDATE table_name SET field_name = REPLACE(field_name, 'find this string', 'replace with this string');

Tables where you might want to run the query include:

gars
post
postedithistory
postparsed

Look at those tables to see what fields if any need to be updated with the query, and again, take backups before running the query just in case something gets inadvertently changed that you didn't mean to change.