G3 - Replace Titles that have filenames with some kind of null character - in on thumbnail page, photo page, in breadcrumbs, etc
Hammers
Joined: 2006-04-24
Posts: 48 |
Posted: Thu, 2012-02-09 00:11 |
Hello, I used the search function and read a lot of posts, but I didn't find exactly what I'm looking for. Here is my problem. Many of my pictures have a descriptive value that has been typed for the Title. Many of my pictures had no value for Title in Gallery 2. When I imported from G2 to G3, those pictures with no title ended up with the filename imported into the Title attribute. I want to figure out how to obfuscate this. Is there a way to allow a null value for title on my photos? Or maybe that guess at an approach is silly and all wrong? Here is what I had in G2: Can someone give me a reasonable way to get rid of displaying filenames for the titles of my photos? Thanks, |
|
Posts: 27300
Titles are titles and not descriptions.
If you want to create a custom theme you could change the behavior.
G3 requires a title. So how do you want to approach this? Some regex could be done if the title starts with IMGXXX then don't show it?
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 27300
In G2 how did the breadcrumb work with no title?
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 48
Dave,
Thanks for your help, I really appreciate it. Creating a custom theme is beyond my skills. I'm no web developer, just a guy that knows enough to be able to use Gallery at a basic level, load the themes that other people have created, and play with the settings they have made available until I can get as close as to what I envision as possible.
Sure, if the title starts with IMGXXX, that would probably work, or the example I gave above where it ends in .jpg or .JPG. Then replace it with... some kind of character that, when rendered by Gallery 3, doesn't display anything?
I don't have any experience making changes in the database. I'm sorry to admit that I don't know how to construct the regular expression to achieve that, nor how to run it. I am certainly willing to try if you or someone else were willing to put the effort into explaining it.
Good point about the breadcrumb. I probably reached too far when I mentioned that. Because of your post I looked at what I have in Gallery 2 and see that the filename still shows in the breadcrumb. I hadn't even noticed that in the past so I don't see any need to put too much effort into worrying about it in Gallery 3.
Here:
http://www.kenaldrich.com/gallery/main.php?g2_itemId=23967
Thanks,
Ken
Posts: 27300
So I guess a good solution is to just modify the theme and if the title starts with IMG then don't show it except in the breadcrumb?
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 48
Dave,
I think that would work, exactly. I've been using the Clear Canvas theme the last day or two and I like it.
http://www.kenaldrich.com/gallery3/index.php/album_005/albumsnorkel/album
However, I wouldn't know how to modify that theme to do the filtering based on the string "IMG".
Thanks,
Ken
Posts: 27300
I can't get the theme to work but try the attached. Not tested so keep a backup.
rename and overwrite the views/album.html.php
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 48
Dave,
That worked really well. Fantastic. Thank you very much! The results look great.
Now I feel a little bit shy about asking for two more things. You've already spent time making this really cool improvement, but I now notice two more things that I think would really improve the theme. If you're game, here they are:
1) When viewing a page with thumbnails, the tops of the thumbnails in a row do not always align. It is dependent upon the title for the thumbnail. For example, if the title is one line tall versus two lines tall, the thumbnails are not aligned vertically. So if you have a row of photos where one picture has no title, the next one has three lines in the title, and the next one has one line in the title; that row looks like a roller coaster. Is there a way to have the photos in a row align/justify to the tops of the photos rather than to the bottom of the associated title text?
Here is an example. The bottom most row on this page is pretty dynamic.
http://www.kenaldrich.com/gallery3/index.php/album_005/album_001
or
http://www.kenaldrich.com/gallery3/index.php/europe_2009/budapest/favorites
2) When viewing the page for a photo, the title is displayed at the bottom. The title seems a little "snug" against the photo. It is right under the photo and runs into the shadowing affects of the photo. I think maybe just adding a carriage return so the title is moved down one line might do it. I had a couple people have a look at the albums and they observed that their eyes don't naturally even see the title. They looked at several pictures without even realizing there was descriptive text under them until it was pointed out.
http://www.kenaldrich.com/gallery3/index.php/montana_2009/P8010130
I do like this theme and I think it is the one I'm going to stick with. Thanks for all the work you've done.
Posts: 48
Dave,
Ah, I just made an observation about number 1) above. I understand now why the vertical alignment is set as it is. This better accommodates the situation where you have photos of various sizes in a row, or even photos that are taller than wider (portrait). If you made them all align to the top as I suggested above, that would probably look funny.
Sorry about not considering that earlier.
Thanks
Posts: 27300
#2 add
to the css
As for #1 i think the height of the div is calculated depending on the size of the thumb. I guess it all depends on how you want the thumbs. If you want them all to be aligned to the top then the text underneath will go up and down more relative to what it is now. Square or rectangle thumbs might be a better option then you could fix the top or the bottom.
Either way it should be just a css change.
I still have to be able to install this theme on the most recent experimental version of G3. Has anybody else had success with this theme and experimental version of G3?
If so what version of the theme and where from as I see a few different versions in the themes thread.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 48
Dave,
I've never adjusted CSS before.
I made a guess and looked at [\views\photo.html.php] and found the section quoted later in this post at the bottom of that file. I'm assuming that is where it would go, but I'm not exactly sure where to insert the statements you quoted above.
Thanks,
Ken
Posts: 27300
almost 6 years of using Gallery and you have not had to do any css? Perhaps it is time to get a book and learn some simple stuff. If you can't get books the web is full of free stuff to learn.
As I still can't get this theme to load. we will have to do this by trial and error.
Edit themes/clean_canvas/css/clean/screen_candy.css
add the above
to the bottom of that file.
Give a man a fish and he eats for the day or you can learn how to
fishCSS with this tool:http://tips.webdesign10.com/web-developer-toolbar.htm
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 48
Dave, thanks for your help, that adjustment worked very well. There is now a little space between the bottom of the photo and the title and it makes it look more pleasing.
I understand what you're saying about learning CSS. I just have to choose what I invest my time and brain energy into. And I'm getting older and learning a lot of syntax for a completely new system is harder than it used to be (I know, lame excuse). I learned basic HTML back in the late 90's and it served me well enough to make a basic website for my personal interests. Now things have gotten much more complicated since then and I haven't really kept up. Mostly because guys like you make and contribute excellent stuff that works really well out of the box.
I don't make any money doing this stuff, it's just for fun. Because I would only venture into modifying CSS every couple years, it makes it hard for me to justify learning it. And of course, when I don't use it, I lose it.
Instead I put time into learning VB, Powershell, etc.... all of the server platforms, server and client applications, and stuff I need that will help me in my career path. I find it rare that what I do in my day to day professional world intersects with web development.
But, I completely understand where you're coming from. You get a guy, me, who comes on here and asks for help, yet you realize I haven't invested much time into learning the basics of the language myself. I get that. I just can't, at this time, dig into it so I can make a few tweaks to my personal website. I've got to bone up on some cluster management stuff for a work project at the moment.
Thanks again. Much appreciated.
Posts: 27300
Nor do I.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 48
Well, I am really enjoying this theme. There is one album that I migrated from G2 to G3 that is having a problem in G3.
http://www.kenaldrich.com/gallery3/2007/album_004
In G2 it looks like this:
http://www.kenaldrich.com/gallery/main.php?g2_itemId=9316
I'm wondering if it is the theme or something goofy has happened with the album. If I change the theme to something else then the problem goes away.
I went through all of my albums and sub-albums. This is the only one with the problem.
Maybe I just need to delete the album and upload the pictures again?
Thanks
Posts: 27300
try the rebuild items module for that album.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 48
Dave. Thanks again. Nice module, worked a treat. It identified that one of the thumbnails needed some attention. I marked it and ran the maintenance. Page renders as expected. I really appreciate all of your hand holding.