Hide Title Attribute

judecooks

Joined: 2013-12-15
Posts: 4
Posted: Mon, 2013-12-16 22:14

Hey all, trying to do the same thing as in this thread, but with the wind theme: http://galleryproject.org/node/105201

I tried the code Dave had posted, but that hid a lot more than the title in that code. I am not sure how to best hide the title as well, since some images are IMGXXX.JPG and some are PXXX.JPG. Hiding everything that starts with P won't work, because some Album Titles will start with P. I've tried a few tricks with the CSS code, but nothing has worked easily. Any thoughts or suggestions on how to best hide image titles?

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Wed, 2013-12-18 06:07

Add:

<script>
$("h2 > a:contains('IMG')").hide();
</script>

to the bottom of album.html.php of the them you are using.
I suspect you would need some fancy regex to find a something similar to items that are Pxxx.JPG and not catch Patrick.
The issue is, the title does not contain the extension. I guess a couple of regexes to catch if the title starts with IMG like above and one to check for P#### or P### depending on how your items are added.

I'm no regex expert and find there is lots of examples via google that might help.
http://www.mkyong.com/regular-expressions/how-to-validate-image-file-extension-with-regular-expression/

Why not just use the captionator module to give real titles or add EXIF titles to the item before you upload?

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team

 
judecooks

Joined: 2013-12-15
Posts: 4
Posted: Wed, 2013-12-18 12:49

Dave, thanks will try this code today and see if I can get it to work along with some regex options from the link.

I want to mirror G2, and my wife is the primary user and she wants to almost exactly match (visually) G2. Titles could be deleted there (which she did, she only uses the description field) - so that in album view, the photos simply display without anything below them. Trying to get that same view so we can move over to G3.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Wed, 2013-12-18 14:34
Quote:
Titles could be deleted there (which she did, she only uses the description field)

I don't recall if that was a single item basis or globally. If it is globally then just remove it from your custom theme.

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team

 
judecooks

Joined: 2013-12-15
Posts: 4
Posted: Wed, 2013-12-18 15:48
floridave wrote:
Quote:
Titles could be deleted there (which she did, she only uses the description field)

I don't recall if that was a single item basis or globally. If it is globally then just remove it from your custom theme.

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team

Dave, I think that if I remove titles globally, they will be removed for albums as well as photos/items. And I should have said, she removed titles from photos, but used them for albums. I would mass edit the titles of photos to add IMG and thus be able to remove them, but she 457 albums with 14,000+ photos...

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2013-12-19 01:57
Quote:
I think that if I remove titles globally, they will be removed for albums as well as photos/items.

No....Depending on the theme you are using you could remove all the titles of items (not albums) by editing the template or some css

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
judecooks

Joined: 2013-12-15
Posts: 4
Posted: Thu, 2013-12-19 14:19
floridave wrote:
Quote:
I think that if I remove titles globally, they will be removed for albums as well as photos/items.

No....Depending on the theme you are using you could remove all the titles of items (not albums) by editing the template or some css

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

Using the default (wind) theme - can you point me to the right way to code it? Too many years removed from my coding days to spit it I guess.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2013-12-19 16:27

no need to edit code just add some css rules:

.g-photo H2 a {
display: none!important;
}

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team