zpSkeleton: Showing EXIF info without toggle

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?

Comments

  • acrylian Administrator, Developer
    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.
  • 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:

    <?php if (getImageMetaData()) { ?>
    <?php printImageMetadata(null,true,'imagemetadata'); ?>
    <?php } ?>

    and added this this from the demo page:

    <?php
    if (getImageMetaData()) {
    printImageMetadata('', false); ;
    }
    ?>

    It displays the exif info without the toggle.

    Thanks for pointing me in the right direction!
  • do you get that image button blank while replacing this code ? I see the tiny blank button.
  • 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?
  • 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.
  • 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.
  • acrylian Administrator, Developer
    You can always hide things via CSS otherwise.
  • Thanks Hackysack and Acrylian will try to check in detail of css with my little knowledge of editing visually in offline version.
  • 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
    <div<?php echo $id . $class; ?>>

    line 2415
    changed this
    echo "<tr><td class=\"label\">$label:</td><td class=\"value\">";

    to this
    echo "<tr><td>$label:</td><td class=\"value\">";

    ============================================================
    themes/defaultcopy/image.php

    line 93:
    changed this
    printImageMetadata(NULL, 'colorbox');

    to this:
    printImageMetadata(NULL, '');

    ====================================================
    I think I got all the changes here. If it doesn't work, let me know, and I'll recheck to see if I missed a step.

    If anyone smarter than me sees a mistake, don't hesitate to correct this.
  • acrylian Administrator, Developer
    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.
  • 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?
  • acrylian Administrator, Developer
    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.
  • 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.
  • 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, '');
Sign In or Register to comment.