Page 1 of 1
changing the graphic directory
Posted: Tue Apr 24, 2007 5:04 am
by rj
For a few years now I have been putting everything in the root directory and now find it necessary to move the graphics into a sub directory.
Once I do, what do I do!?

Where do I do it, and how do I do it.
RJ
Re: changing the graphic directory
Posted: Tue Apr 24, 2007 10:31 am
by garvinhicking
Hi!
Uh...you should know best how to do that, since it was you who saved and referenced the files.
1. move the files
2. Change all locations where you refered to the files to point to the new location. Like in all your postings, all your templates files, CSS files or whatever.
Best regards,
Garvin
Posted: Tue Apr 24, 2007 3:26 pm
by rj
Oh...
You mean BY HAND?
I know I had to do that to the 60 pages in the website but gee, I though a database would do it all auto magically

Re: changing the graphic directory
Posted: Tue Apr 24, 2007 3:40 pm
by stm999999999
rj wrote:For a few years now I have been putting everything in the root directory and now find it necessary to move the graphics into a sub directory.
Do you say that all your images are not in the /uploads-folder?
Posted: Tue Apr 24, 2007 11:54 pm
by rj
I am running a website and blog from the same server directory.
So all my graphics for the website were in the root, and I used a lot of them in the BLOG so it was easy to just leave them there and point the blog to them.
I still am running both from the same server, but now the slew of graphics in the root is making it hard to find all the stuff I need everyday. Lots of .xml, js files, swf files, htm and so forth...
I know I have to go change the paths in the HTM files of the website but was hoping there was some auto MAGIC way of doing it in the blog.
RJ
Posted: Wed Apr 25, 2007 1:35 am
by d_cee
Hi
Maybe you could do a sql dump of your database, open it in a text editor and then find and replace href=' with href='/your_image_directory/
You'd have to skip over href=' if it's just a link rather than an image but it would be a fairly quick way to change the image paths in your entries. You'd then re-import the database and the enties would be updated.
Oh, and I'd be sure to back up my database first
HTH
Dave
Posted: Thu Apr 26, 2007 12:17 am
by rj
Garvin explained that to me earlier and I dont know, I only have 100 articles and then the sidebars... Best do it by hand than having me screw it all up.
Posted: Thu Apr 26, 2007 10:03 pm
by stm999999999
rj wrote:I know I have to go change the paths in the HTM files of the website but was hoping there was some auto MAGIC way of doing it in the blog.
RJ
if you use an image with the media library, there is a code in the blog-entry like
<!-- s9ymdb:301 -->
with this, every move of the image in the media library will automagicaly have en effect to the entry.
Posted: Fri Apr 27, 2007 1:30 pm
by garvinhicking
Hi!
Just an addendum to stm9x9: That only applies to images inserted into s9y entries using serendipity 1.1. All previous postings don't have that.
Regards,
Garvin
Posted: Fri Apr 27, 2007 3:42 pm
by rj
All the more reason to do it by hand...
RJ