changing the graphic directory

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
rj
Regular
Posts: 477
Joined: Sun Sep 10, 2006 2:53 pm

changing the graphic directory

Post 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
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: changing the graphic directory

Post by garvinhicking »

Hi!

Uh...you should know best how to do that, since it was you who saved and referenced the files. :-D

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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
rj
Regular
Posts: 477
Joined: Sun Sep 10, 2006 2:53 pm

Post 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 :)
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

Re: changing the graphic directory

Post 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?
Ciao, Stephan
rj
Regular
Posts: 477
Joined: Sun Sep 10, 2006 2:53 pm

Post 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
d_cee
Regular
Posts: 603
Joined: Wed Jan 18, 2006 6:32 pm
Location: UK
Contact:

Post 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
rj
Regular
Posts: 477
Joined: Sun Sep 10, 2006 2:53 pm

Post 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.
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

Post 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.
Ciao, Stephan
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
rj
Regular
Posts: 477
Joined: Sun Sep 10, 2006 2:53 pm

Post by rj »

All the more reason to do it by hand...

RJ
Post Reply