completed Gallery Photo Titles

blindmime
@blindmime
10 years ago
772 posts
I would like to see gallery photos have titles and the url end with the title rather than whatever the photo file might be called (which often has nothing to do with the photo).

home/gallery/6/my-cat-david instead of home/gallery/6/IMG20049830.jpg
updated by @blindmime: 01/21/15 07:32:50PM
brian
@brian
10 years ago
10,148 posts
blindmime:
I would like to see gallery photos have titles and the url end with the title rather than whatever the photo file might be called (which often has nothing to do with the photo).

home/gallery/6/my-cat-david instead of home/gallery/6/IMG20049830.jpg

The problem is that there are no titles on the photos - only on the Gallery itself.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
boplive
@boplive
10 years ago
345 posts
I myself was going to ask about this..but Blindmime beat me to it...I guess it boils down to us being a bit more proactive in naming the image to go with the title before uploading it up to the site..then the photo title and url will be uniform...;)
douglas
@douglas
10 years ago
2,791 posts
Or you can add an image title field via the form designer and then add that variable to your templates.


--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos
blindmime
@blindmime
10 years ago
772 posts
I'm mostly concerned with the urls.

I would not expect my users to have to change the names of their photos for the sake of my website's conventions.

Also, the the url's have urlencoded characters rather than gracefully parsing things like commas and apostrophes, etc. It doesn't make for very friendly urls.

Also, the editor sometimes loses text. I type something in the caption editor and update. It shows on the page. I go to edit it and nothing is showing in the editor. I cancel, return to the page and it still shows, but I can't go back and edit it. I don't think it's happening all the time though, so I haven't narrowed the behavior down consistently.
updated by @blindmime: 12/13/14 03:14:54AM
brian
@brian
10 years ago
10,148 posts
blindmime:
Also, the the url's have urlencoded characters rather than gracefully parsing things like commas and apostrophes, etc. It doesn't make for very friendly urls.

JR uses proper URL conventions for encoding - if you can let me know what you mean by "gracefully" parsing commas and apostrophes (which are not URL valid characters) then I can check it out and see if there is anything we can do.

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
blindmime
@blindmime
10 years ago
772 posts
I have a gallery called "Bryan's Memes". The URL is "bryan/gallery/bryans-memes/all" which is great. Jamroom "gracefully" strips out the apostrophe.

However, inside this gallery I have an uploaded image called "HERE'S JOHNNY.jpg". I am seeing two different URLs for that page. One is "bryan/gallery/14/HERE%27S-JOHNNY.jpg". The other is "bryan/gallery/14/HERE'S-JOHNNY.jpg". They both work. I know they are actually the same URL, but jamroom has both instances referenced on a page. I also have URLs with commas.

I think having a title determine the last part would be good because users will often upload photos with non-descriptive, often numerical naming conventions. You could code "use the title if it exists, otherwise use the file name". The code should strip out invalid characters, of course.

Also, the image URL above loses the gallery name. I think it would be better if the img URL kept the gallery name and was something like "bryan/gallery/14/bryans-memes/heres-johnny" which, in fact, already works!
updated by @blindmime: 12/16/14 04:56:16AM
brian
@brian
10 years ago
10,148 posts
Basically everything after the ID (14) is extraneous and just for "show" so I can see about making it a bit nicer. Note that this is the correct URL name:

HERE%27S-JOHNNY.jpg

but your browser will show the actual apostrophe when in the URL bar (but the actual apostrophe should not be found anywhere in the actual source).

Hope this helps!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
blindmime
@blindmime
10 years ago
772 posts
I do show apostrophes and commas in the source:
 <div class="gallery_slider_img">
                            <a href="http://domain.com/bryan/gallery/12/it's-not-you.jpg#gallery_img"><img src="http://domain.com/gallery/image/gallery_image/12/small/crop=portrait/_v=1418531515" width="46" height="46" alt="it&#039;s-not-you.jpg" class="img_shadow"></a>
                        </div>
brian
@brian
10 years ago
10,148 posts
OK weird - let me check that out - those should be URL encoded.

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
blindmime
@blindmime
10 years ago
772 posts
Actually, the alt tag above is urlencoded in the source (this forum converted it), but the a href tag does have an apostrophe in the source as shown above.
brian
@brian
10 years ago
10,148 posts
The latest Gallery module should fix this up and make it better - basically the file name URLs will look a little better, and if there is an image caption that will be used in the URL instead.

Update and let me know if that looks better.

Hope this helps!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
blindmime
@blindmime
10 years ago
772 posts
Using the caption doesn't work well. I put copyright and other information in there. Sometimes a story behind the photo. One url looks like this: "/gallery/15/by-https-wwwflickrcom-photos-explorationdigest-cc-https-creativecommonsorg-licenses-by-nd-20#gallery_img".

Might I again suggest adding a Title field to the gallery item, then this convention for the url:

/gallery/item_id/gallery_name/item_title (if title is blank then use the image name instead of title.
brian
@brian
10 years ago
10,148 posts
Yeah that may be what we have to do. I was hoping to avoid having to add another form field, as I'd like this to be as easy as possible. I'll check it out.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
brian
@brian
10 years ago
10,148 posts
I have updates for this that should fix this up - I'll get it released tomorrow.

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net

Tags