PDA

View Full Version : <if> statement


Gio~Logist
08-07-2005, 01:28 AM
Is there and if statement or something that i can create that makes it so that IF AN IMAGE EXISTS then it will show?

Something like



<if condition="http://www.site.com/forums/test.gif==' '>


<else />

<img src="http://www.site.com/forums/test.gif==' '>

</if>

Guest190829
08-07-2005, 01:51 AM
I don't know about using template in conditionals, but in the php file your editing/making you can do something like this:


$url = "http://www.thesite.com/images/test.gif"
$check = fopen("$url", "rb")

if ($check)
{
//eval template when image does exist
}
else
{
//eval template for image does not exist
}


I think that should work...someone correct me if I'm wrong. :)

Gio~Logist
08-07-2005, 01:54 AM
and what variable will i use to make sure this works?
also, where in member.php should i put this?

PS: I dont know if this helps but i'm just trying to make it so that it shows a couple of the member's photos from vbgarage, in profile.

Danny= Always has been able to help me, thanks alot! I am pretty sure that your vbSpace will be extremely successful.

Guest190829
08-07-2005, 01:57 AM
Well I don't know how vbgarage works, you'd probably have to run a query to pull all the member's photos, or the path to the photos.

Gio~Logist
08-07-2005, 02:00 AM
If you can IM me at HipHopGround on AIM we can talk there, also if you can't help me do it directly with vbgarage, it'd be appreciated if you can just answer my other Q about what would i put in the template to pull up the image and where in member.php should i put the code. Again, it would probably be easier for you to contact me via AIM for a more direct and fast conversation, as we both do not have much time.

Guest190829
08-07-2005, 02:15 AM
Well right now I don't have time, I'll try to contact you tomorrow night, since that's the only time I will be free.

Gio~Logist
08-07-2005, 02:22 AM
ok that sounds good..... i need to send you another PM so stay on to receive it