Quote:
Originally Posted by kh99
Yeah, that will work if the variable isn't set at all when there's no number.
|
Thanks for your help man.. Its for a vb plugin im coding n00b coder.. Very much appreciated.
--------------- Added [DATE]1347032342[/DATE] at [TIME]1347032342[/TIME] ---------------
one more question...
how would i go about adding the if/else in this
Code:
$template_hook['forumhome_above_forums'] .= "".
I think i got it i will post back if it worked
--------------- Added [DATE]1347034575[/DATE] at [TIME]1347034575[/TIME] ---------------
nope i tried this ty u guys for you patience with me..
Code:
$template_hook['forumhome_above_forums'] .= "".if (isset($shirtid)) {
echo $itemshirt;
}
else
{
echo "put a shirt on";
}."
</div>"; }
--------------- Added [DATE]1347036110[/DATE] at [TIME]1347036110[/TIME] ---------------
okay so i give up here is my plugin Whats wrong here????
Code:
$shirtid = "". $decode[items][shirt][id] ."";
$itemshirt = "<a href=\"http://www.wowhead.com/item=".$shirtid."\" rel=\"item=".$shirtid."\"><img class=\"wowequipimg\" src=\"".$bliziconurl."/".$shirticon.".jpg\"></a>";
if (isset($shirtid)) {
$template_hook['forumhome_above_forums'] .= "". $itemshirt ."";
}
else
{
$template_hook['forumhome_above_forums'] .= "put a shirt on";
}
--------------- Added [DATE]1347036382[/DATE] at [TIME]1347036382[/TIME] ---------------
Getting Close i can feel it...
im not getting any errors but
This works! I tested
Code:
if (isset($shirtid)) {
$template_hook['forumhome_above_forums'] .= "". $itemshirt ."";
}
This isnt though
Code:
else
{
$template_hook['forumhome_above_forums'] .= "put a shirt on";
}
I just get an X missing image icon instead of displaying the above msg
--------------- Added [DATE]1347036765[/DATE] at [TIME]1347036765[/TIME] ---------------
End Result Which works!!!!
Code:
if ($shirtid == NULL) {
$template_hook['forumhome_above_forums'] .= "". $missingshirt ."";
}
else
{
$template_hook['forumhome_above_forums'] .= "". $itemshirt ."";
}