PDA

View Full Version : store post bit add on's


sabret00the
04-03-2003, 09:02 AM
ok so i got excited and done this


switch ($username_postbit)
{
case ("$post[glow]!="" AND $post[italic]=="1" AND $post[fcolour]!="")":
eval("\$storeextraglow = \"".gettemplate('store_extra_glow_italic_fcolour')."\";");
break;
case ("$post[glow]!="" AND $post[italic]=="1" AND $post[fcolour]!="")":
eval("\$storeextraglow = \"".gettemplate('store_extra_glow_italic_fcolour')."\";");
break;
case ("$post[glow]!="" AND $post[fcolour]!="")":
eval("\$storeextraglow = \"".gettemplate('store_extra_glow_fcolour')."\";");
break;
case "($post[italic]=="1" AND $post[fcolour]!="")":
eval("\$storeextraglow = \"".gettemplate('store_extra_italic_fcolour')."\";");
break;
case "($post[glow]!="" AND $post[italic]=="1")":
eval("\$storeextraglow = \"".gettemplate('store_extra_glow_italic')."\";");
break;
case "($post[glow]!="")":
eval("\$storeextraglow = \"".gettemplate('store_extra_glow')."\";");
break;
case "($post[fcolour]!="")":
eval("\$storeextraglow = \"".gettemplate('store_extra_fcolour')."\";");
break;
case "($post[italic]=="1")":
echo("$storeextraglow="<i>$post[username]</i>");
break;
default:
echo("$storeextraglow="$post[username]");
}


before remembering i don't know php, iwas basically just trying to optimize the code and make it easier to add-on add-on's such as rainbow font colour, overline & underline, etc, etc.

i duno was my idea poop, or did i do good?

would there be an easier way of doing it?

Xenon
04-03-2003, 02:11 PM
i don't see what this code should do, you have a swicht username statement on the first line but none of the cases looks like a username....

but i don't know the hack itself, maybe that's the structure and the vars are just bad labeled.

sabret00the
04-03-2003, 07:01 PM
yep it's bad labelling by me, what it's mean to do is switch the way the username in the postbit is displayed