Member
Member
hackysack   10-09-2013, 14:52
#1

Hello -

I've been trying out the zpskleton theme, and would like to display the exif information on image.php without the user having to click the "Image Info" link to toggle the display on and off. I see this is true for other themes as well.

The only place I can see to change this behaviour and to have the exif display initally without a toggle is in the z--core/template-functions.php file.

I can't imagine anything good coming from editing core files, and am hoping someone can tell me another way to accomplish this, perhaps in the theme itself.

Any suggestions?

Administrator
Administrator
acrylian   10-09-2013, 15:09
#2

I edited the title of your topic so the theme's author might spot it.

On official themes this is an option actually, can't say for zpSkeleton naturally.

Member
Member
hackysack   10-09-2013, 15:20
#3

Thanks you, Acrylian. That was the clue I needed.

I went to github and copied image.php code from the demo theme.

Found out if I removed this code from skeleton:

and added this this from the demo page:

It displays the exif info without the toggle.

Thanks for pointing me in the right direction!

Member
Member
atomicmak   11-09-2013, 05:10
#4

do you get that image button blank while replacing this code ? I see the tiny blank button.

Member
Member
hackysack   11-09-2013, 13:35
#5

Hello -

No, I didn't get the button. However, I can't figure out how to get rid of the gray background that surrounds the word "Artist" That kind of looks like a button. Is that what you're talking about?

Member
Member
atomicmak   11-09-2013, 16:16
#6

Hi Hackysack I am also using same theme can you share your url ?
mine is www.wildart.in

if you go here
http://www.wildart.in/bustards/lesser-florican/lesser_florican_img_7272.jpg.php

on right side it says "Image Info" if I replace the code you shared above in image.php exif appear without toggle but button witout text remains and shows there as tiny spot.

Member
Member
hackysack   12-09-2013, 10:58
#7

What beautiful photos you have on your site.

Yeah, I see the spot you're talking about now. Guess I was looking through an optimistic lens. If I figure it out, I'll let you know what I did, or hopefully the author of skeleton will let us both know.

Administrator
Administrator
acrylian   12-09-2013, 11:04
#8

You can always hide things via CSS otherwise.

Member
Member
atomicmak   12-09-2013, 12:56
#9

Thanks Hackysack and Acrylian will try to check in detail of css with my little knowledge of editing visually in offline version.

Member
Member
hackysack   13-09-2013, 14:20
#10

Here's my latest attempt. It shows the exif info without a toggle, removes gray box around the label, and removes "Image Info" text.

Make backup files of your backup files if you try this. I am not a programmer. Just a patient trial-and-error guy.

I bailed out of the skeleton theme, and went with one of the officially supported ones just to keep it simple. In my case, I used a duplicate of "default".

I modified one of the core files, which bothers me a bit, but here are the changes I made:

=====================================================
zp-core/template-functions.php

line 2282
commented out
if (is_null($title)) {
$title = gettext('Image Info');
}

line 2410
commented out

Administrator
Administrator
acrylian   13-09-2013, 15:16
#11

As you say not a good idea. You should really be able to hide any element you don't need via CSS. Or find and remove the call that prints the element from the theme.

Member
Member
hackysack   13-09-2013, 15:50
#12

Hello acrylian -

The reason I finally edited the template-functions.php file is that I couldn't find any css controlling this. I even went so far as to rename the theme's "styles" folder to break all ties to css, and and yet the gray background around the label stayed, as did the words "Image Info"

Are there css calls elsewhere that I'm missing?

Administrator
Administrator
acrylian   13-09-2013, 16:26
#13

Sorry, don't know the theme that well. But you should be able to address the item itself with extra css added using display: none. You can easily view any element or the source code via your browser to find out which it is.

Member
Member
atomicmak   13-09-2013, 19:08
#14

hackysack I am no programmer but having little search knowledge and I finally figured.

put this in your style.css in theme at end

#exif_link {
visibility:hidden;
}
#metadata_title {
visibility:hidden;
}

and this will hide your button that you dont have to touch your core files.

Member
Member
hackysack   15-09-2013, 10:43
#15

Got it!
Thanks atomicmak and acrylian I can sleep better at night now, knowing that core file isn't waiting to trip me up at the next upgrade.

Since I switched to the default theme, the fix for me was different, but it was your directing me to the correct file that let me figure it out. In case you switch later, here's what I did:

===============
theme css file:


imagemetadata table


commented everything out

imagemetadata table td


commmented out- background-color: #f8f8f8;
added - background: none;

exif_link


commented out - float: right;
added - visibility:hidden;

}

==================
image.php


changed this - printImageMetadata(NULL, 'colorbox');
to this - printImageMetadata(NULL, '');
  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.