PDA

View Full Version : Forum Supporters - Profile Field...


Mr L
03-02-2003, 10:03 AM
Hi,

I wonder if anyone can help...

I want to do a quick and easy mod using a custom profile field where I put in an entry of a graphic for forums supporters and use IMG code to display it in the postbit.

If that field is empty, I don't want to display an invalid and non-existant graphic.

Could anyone help me with this simple error checking, that is unfortunatly beyond me.

Thanks in advance.

Harvey.

Xenon
03-02-2003, 10:13 AM
create that field, than add into admin/functions.php
getpostbit section:

if (trim($post[fieldX])!="") {
$post[supportimg] = "<img src=\"$post[fieldX]\">";
} else {
$post[supportimg] = "";
}

and then put $post[supportimg] into the postbit template :)

Mr L
03-02-2003, 10:32 AM
Xenon,

That was perfect. Thank you for your time on this, works a treat!

Cheers.

Harvey.

Xenon
03-02-2003, 10:33 AM
:)
you're welcome :)

EchoHype.com
03-02-2003, 02:37 PM
nice job xenon :D