Member
Member
zyfb   26-04-2012, 23:39
#1

This is what i want to do
if(.gif file is true)
echo" printfullimage";
else
echo"printdefaultimage";

What is the actual code for this?

Member
Member
zyfb   27-04-2012, 00:57
#2

This is what I have, but still not working. I need help with the if statement.

What I want is to show the full image when is a gif file and show the default size image when is other files.

`

"> [img]

`

Administrator
Administrator
fretzl   27-04-2012, 05:23
#3

You're looking for something like this:
if (getSuffix($imageobject->filename) == "gif" {

Member
Member
zyfb   27-04-2012, 07:47
#4

fretzl, thank you for your help.
Do you think you can help me with the rest of the code?
When I upload the code. only the second code the else statement prints.

Administrator
Administrator
fretzl   27-04-2012, 09:25
#5

I'm not sure where you are using this code.
Of course you have to setup the image object.
http://www.zenphoto.org/news/zenphotos-object-model-framework#creating-a-new-object

If it's part of the next_image() loop the image object is already setup so then you can try:

if (getSuffix($_zp_current_image->filename) == "gif" {etc...

Member
Member
zyfb   27-04-2012, 18:43
#6

It works perfectly thank you

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.