Easy way to hide image if there is codeblock

Hi guys

i make my new homepage with zenphoto + mansory theme. I make a lot of panorama photos and publish them on gigapan.com. They offer embedding code and it works perfect in codeblock for pages and images.

I will make a special section with panorama photos on pages. But i want to bring them also in the corresponding album with the other pictures. So my first idea was to publish there a small version of the panorama with a special icon that the user can see that under this thumbnail is more. He enters the image page and there is the embedded code in codeblock0.

But:
Above the codeblock stuff, there is the big image (with icon). Nobody will scroll down to the real panorama...

is there a way to:
- hide image view if there is a codeblock?

I tried to upload the image as it is and upload with ftp a 1x1px image as placeholder in the album folder and replace the original image with that. I expected zen actualize the thumbnail (what i dont want) but zen actualizes the image itself - its there again!.

How can i do that? I just want to hide the photo on the image page. Not in the album page. I want to have a kind of "only codeblock page with thumbnail".

Thanks and best regards

Comments

  • acrylian Administrator, Developer
    You could check if the codeblock has any content like `If(getCodeBlock(x)) { …}`. This naturally will require theme modifications.

    But if you have embed code anyway maybe an idea would be to use the textobject plugin instead? You would just put the embed code into the txt or html file and then you can have a separate thumbnail as with videos: http://www.zenphoto.org/news/using-external-sources
    I will make a special section with panorama photos on pages.

    If you need a specific layout for panorama image pages don't forget the included multiple layouts plugin which was made exactly for these purposes. You can create specific theme pages with specific layouts.
    http://www.zenphoto.org/news/multiple_layouts

    Before starting I would recommend to read the standard tutorial:
    http://www.zenphoto.org/news/theming-tutorial

    Does that help?
  • theme modifications are ok. I'm softwaredeveloper - but php and other web code is not my field:D

    In the theme there is just the call

    <?php printCodeblock(); ?>

    I found the getCodeBlockMethod in template-functions and i will try what comes out.

    As a first step i put that for the image.php above the image part. So it is on top. Thats ok for the beginning. But it would be more nice if the picture is not visible.

    I don't think that i need a special layout. On every page there will be one panorama, maybe a few above each other. But the rest is okay. i use the side bar, text there and so on.

    But inside the normal album i want the panorama too.

    Maybe i will publish code or extra content above or under the thumbails on the album side later for the text (at images its good at the side but for albums i prefer it in main area) but that will work.
  • thanks - it worked with the getCodeBlock method:)
  • acrylian Administrator, Developer
    All right, just trying to show some possibilities. Zenphoto is quite flexible.
Sign In or Register to comment.