Member
Member
Stephane   2008-06-15, 12:39
#1
Hi guys, I'm working on a complete revamp of Effervescence and having a lot of fun with the new features.

The way I've got image descriptions and tags implemented is to check via `getImageDesc()!=""` and `getTags()!=""` that these fields are not empty, so as to make the styling cleaner if they are absent.

I would like to do the same with EXIF data. How can I check that the EXIF indeed contains information and not a blank array?
Administrator
Administrator
acrylian   2008-06-15, 12:59
#2
You can check the EXIF fields directly (please see the documentation) or you could probably try some PHP array functions like `count`, `in_array` or `sizeof` for example (see http://www.php.net/)

BTW, nice effervescent mod, but horizontal scrolling is really a little inconvenient...
Member
Member
Stephane   2008-06-15, 13:11
#3
Thanks, I'll try and figure it out with PHP. It's not exactly my strong suit.

Regarding Effervescence, the horizontal scrolling is just a fun little thing I added for my own gallery. I'm actually starting off from scratch for v2. I might even have to give it a new name, because I have a feeling it will be quite different from my original Effervescence theme.
Member
Member
Stephane   2008-06-15, 13:14
#4
I'm also realizing that `getTags()!=""` is not a good way to check whether the list of tags is empty or not. Do you have tips on how I could do this with PHP?
Administrator
Administrator
acrylian   2008-06-15, 13:19
#5
Alright, I somehow actually didn't realize that you are the original author, sorry...:-) Needless to say that any new theme is welcome.
Administrator
Administrator
acrylian   2008-06-15, 13:22
#6
Since these are all arrays, I would think that the php array functions `count` might be suited for that:
http://www.php.net/manual/en/function.count.php
Member
Member
Stephane   2008-06-15, 13:34
#7
Got it to work with both tags and EXIF, cheers!

Just for reference I'm using `count(getTags())!=0` and `count(getImageEXIFData())!=0` to check whether the tags or EXIF contain any data.
Member
Member
sturmgas   2010-02-08, 14:46
#8
This is what i'm looking for i believe. Where did you implemented the `count` in the image.php or somewhere else and how?
  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.