Pages (2): 1 2   
Member
Member
thegirlinthecafe   30-04-2007, 21:37
#1

Hi all,

I was wondering if it is at all possible to get even nicer URL's in Zenphoto, as I am still not too keen on the way zenphoto is rewriting the urls at the moment.

The best thing for me would be to use the title of the image in the url. An example:

In stead of
http://www.thegirlinthecafe.com/photo2/new%20york/newyork005.jpg.php

I would love to have

http://www.thegirlinthecafe.com/photo2/new-york/123-times-square

(where 123 is the id of the image in the database, if at all needed)

I have this working on my photoblog (which is running pixelpost):

http://www.thegirlinthecafe.com/photoblog/160-london-marathon

and it works like a charm, google seems to love url's like that.

Has anybody tried this? Is this at all possible?

Thanks in advance for any help,
Ingrid

Developer
Developer
trisweb   01-05-2007, 07:23
#2

You're right, that's ideal for Google. I think it thinks they're more relevant, unlike names of php files. Then again, I get great hits on my galleries with the .php extension.

Unfortunately it's not easily changed (at all) - the unique identifier to find the photo requested is the actual filename, and the only way to get that is from the URL, so it must contain the filename. That's just how ZP works, it's filesystem-based. The titles are rather stored in the database as metadata, which you can't use to get a photo and doesn't need to be unique.

In future versions I'm planning on basing the framework on the database while keeping filesystem synced, instead of the other way around. That should allow more reference options in the URL. I'll make sure to keep that in mind in development..... if I ever have free time again after this startup gets off the ground.... :-(

Member
Member
thegirlinthecafe   01-05-2007, 08:04
#3

Hi Tris

Thanks for your answer, and I really appreciate your hard work.

I am just too lazy to rename all my pictures so they have proper titles, that's why titles in my case would make more sense in the url than the filename. But it has to do for now I guess

Member
Member
iriome   03-02-2008, 14:07
#4

Hello,

Does Zenphoto now support nicer URLs ? It would be nice to have URLs like "/album/qName-of-the-photo" instead of "/abum/IMG4254.JPG".

Without changing the way the framework is designed, maybe you can just add a field to rename the photo ? Or, better, automagically transform the title into a qualified name (space replaced by -, etc...), and add a checkbox under the title field like "Rename the file for 'qName-of-the-photo' ?".

Thanks !

Member
Member
sbillard   03-02-2008, 18:41
#5

Why don't you just rename the images in FTP? Or, better still, start them off with the name you want.

Member
Member
DirkSohler   08-02-2008, 12:26
#6

Spaces, capitalization, special characters and so on in file names in the web are evil

Member
Member
sbillard   09-02-2008, 00:22
#7

But, what has that got to do with the renaming of the image. If you don't want these characters in the name, don't put them there.

Member
Member
DirkSohler   09-02-2008, 16:08
#8

Well, if i create a blog entry in Wordpress “Süße Sahne (selbst gemacht)” (“sweet cream (selfmade)”), the URL will be “example.com/suesse-sahne-selbst-gemacht”

Member
Member
sbillard   09-02-2008, 20:43
#9

Maybe the i18n project will take this on.

Member
Member
jsumners   10-02-2008, 05:38
#10

To the original topic:

I've taken this request on, and will get it worked out when I can. I might not get it done until after my current semester, though. My senior project comes first. (Yay wavelets!)

Administrator
Administrator
acrylian   10-02-2008, 10:57
#11

I see the problem with the spaces etc but for renaming the image to a proper title we have the admin backend.

DirkSohler: But the difference to zenphoto is that wordpress is not file system based.

sbillard: This is not really something that belongs to l18n, it's a general topic.

Jsumners: No hurry, I have already sort of a function, that can do things like that, that needs a little refining.

Member
Member
DirkSohler   10-02-2008, 14:22
#12

Jep, it’s not fs based, and that is one of the reasons, why i switched to zenphoto!

Member
Member
iriome   23-02-2008, 15:49
#13

sbillard, I can actually rename each file with the right name before posting them on Zenphoto, but it is not the best solution. I see to problem :

1/ you have to set the title twice : first in the filename, second in the title field when you post the photo

2/ even if I rename a "IMG1234.JPG" into "my-first-day-in-Berlin.jpg" for instance, there is still this ".jpg" that has no reason to be in the URL (cf http://www.w3.org/Provider/Style/URI). I want to remove this extension because with an album photo, you don't just give access to a photo file, you give access to a whole photo+title+comments+category+tags resource, which is more than a simple file, and so can't have any extension.

That's why I suggested :

1/ to have a checkbox in the form to add a photo that, if checked, generate a qualified name from the title (the way Wordpress does, cf DirkSohler comment), and rename the file this way. For instance, if I put "My first day in Berlin" as title, the file IMG1234.JPG I sent is renamed on the server as my-first-day-in-berlin.jpg

2/ find a way (maybe with Apache content negociation or mod_rewrite) to use the URL /my-first-day-in-berlin, without the ".jpg"

This way, Zenphoto would have very nice URLs, without changing the whole design (i.e. zp would still be FS based, and not DB based as Wp or other script can be).

It would be great, I can't find a great photo album manager with nice URL...

Thanks again for your work !

Member
Member
sbillard   23-02-2008, 20:56
#14

iriome:

There is an option to add a image suffix, so you could use, say "view" and your file would show as "my-first-day-in-Berlin.jpg/view"

If you put a title in your EXIF/IPTC data, it will be used as the zp title. Omitting the suffix on the filename that is on the server will cause all sorts of problems for zenphoto. That's the key it uses, for instance, to recognize images vs other files.

Nothing is needed in mod_rewrite to omit the suffix. The problem is how to determin what the suffix should be. No suffix: then it is an album request. JPEG, JPG, GIF, PNG? FLV, 3GP, MOV?

It would not be too hard for you to modify a theme to omit the suffix. But then every request will go to your albums.php file. It could then decide what to do.

BTW, I am wondering how much of a problem this really is. Why are you looking at the URL anyway, the images should be the attraction of your album.

Member
Member
sbillard   23-02-2008, 22:02
#15

BTW, you do not have to do the rename twice. Just rename the image before the upload. ZP will use the image name (without the suffix) as the default title.

Member
Member
sbillard   23-02-2008, 22:08
#16

Update:

You can modify the function zp_load_request() so that it will treat the last name in the list as the image name if you wish. Just add the .jpg suffix to what rewrite_get_album_image() returns as the image filename.

Member
Member
iriome   24-02-2008, 23:02
#17

I didn't know about EXIF/IPTC title, wich soft handle this ? (I use digikam but i haven't seen this).

I will try to create a maintenable hack for my problem.

Thanks

Member
Member
sbillard   25-02-2008, 00:45
#18

Photoshop Bridge does a nice job of editing EXIF/IPTC data. I am sure there are other programs that do this as well.

Member
Member
steve.goodmedia   27-02-2009, 12:45
#19

Is it possible to remove the .jpg extension from the end of a url by using .htaccess

Administrator
Pages (2): 1 2   
  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.