PDA

View Full Version : Assistance Hiding Gif


Bane
23 Mar 2001, 15:28
Bear with me, as I sometimes don't make much sense.

I have created a custom field, settable by admin/mod only, and would like to have the Post and Member information show a .gif with the name of the field. I accomplised this by using

<img src="{ imagesfolder }/$post[field5].gif">

Now my problem is, if the field is blank, it shows a large red blank image x. Which I must say is quite counterproductive to my needs.

So what I need is a way to hide this if the field is blank. but I am not sure how to go about this. I'm guessing I need to edit the showthread.php and member.php files, but I'm not sure where or how. I tried a little tampering but was unsuccessful.

23 Mar 2001, 16:59
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



In showthread.php, find


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------


and add my code directly below that.
In member.php, find


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



and add my code directly below that.

HTH :)

Edit: *smacking my head vigorously* I forgot. Add $customfield5 where you want it to appear in the showthread templates (postbit, etc.) and the member profile templates (getinfo, etc.).

24 Mar 2001, 10:16
I get a parse error.. Is VB displaying something different in the code?

24 Mar 2001, 16:30
I made another boo-boo. :) I changed the code in the post above - just replace what I had given you before with what's there now. Should work now. :D

24 Mar 2001, 18:33
Appreciate the help tubedogg :) Thanks a bunch