Hide/Show div depending on file type in image.php

Hi guys,

I want to show/hide a text div depending on the file type on image.php.

Can you tell me how to set it as a 'php if' on file type?
I wonder it'd be similar to the <?php if (hasPrevImage()) { ?>.

Thank you very much.

Comments

  • acrylian Administrator, Developer
    You can do it like this:
    `if(getISuffix($_zp_current_image->filename) == 'jpg") { … }`
  • imai Member
    Thanks a lot for the response.

    But it didn't work as a string.

    I thought on replacing for `'jpg'` instead of `'jpg"`.
    Though it worked as a string but still got the error below:

    "Fatal error: Call to undefined function getISuffix() in .../image.php on line 44"

    Just in case is it easy to resolve?
    Otherwise I can live with it for now.

    Cheers
  • acrylian Administrator, Developer
    I just had a typo in the function name as it is called `getSuffix`. On such answer always remember that we sometimes answer inbetween quickly. There is a functions documentation on our user guide you can also refer to. Or you use a IDE like Eclipse, Netbeans or the like that provides access to functions.
Sign In or Register to comment.