You are very welcome!
Ok, I have added the tinsurance count so members can see how much they have left (This only show the particular member and noone else)
in shop.template.php find:
<b>',$txt['shop_money_in_pocket'],': </b>',$context['shop_money'],'<br />
',$context['shop_money_in_bank'],'<br />
add after:
';<b>',$txt['shop_money_in_pocket'],': </b>',$context['shop_money'],'<br />
',$context['shop_money_in_bank'],'<br />';
if ($context['shop_shieldleft'] > 5){
echo'
<b>',$txt['shop_insurance'],':</b> ',$context['shop_shieldleft'],'<br />';
}
elseif ($context['shop_shieldleft'] >1 && $context['shop_shieldleft'] < 5){
echo'
<font color="red">',$txt['shop_insurance_low'],'</font><br />
<b>',$txt['shop_insurance'],':</b> ',$context['shop_shieldleft'],'<b> ',$txt['shop_insurance_left'],'</b><br />';
}
else{
echo'
<font color="red">',$txt['shop_insurance_none'],'</font><br />
<b>',$txt['shop_insurance'],':</b> ',$context['shop_shieldleft'],'<b> ',$txt['shop_insurance_left'],'</b><br />';
}
echo'
in shop.php find:
// The current member's money
$result = db_query("SELECT money, moneyBank
add after:
, insurance
find:
$context['shop_money_bank'] = formatMoney($row['moneyBank']);
add after:
$context['shop_shieldleft'] = $row['insurance'];
add these strings to the shop.english.php
$txt['shop_insurance'] = "Dragon Shield";
$txt['shop_insurance_low'] = "Your Dragon Shield is getting low! You may want to stock up!";
$txt['shop_insurance_none'] = "You have no Dragon Shield...Be Warned, this makes you a target for those that like to steal!";
$txt['shop_insurance_left'] = "Remaining";
make sure to change them to reflect what you call the insurance on your forum.
this will display their current amount left as well as change what message displays based on how much they have left