Author Topic: Insurance (Still needs work!)  (Read 57394 times)

Offline TechnoDragon

Re: Insurance (Still needs work!)
« Reply #60 on: March 17, 2007, 12:23:09 am »
i'll see what I can do...the items I already released were the ones I modified on my site....didn't want them to be protected from EVERYTHING! LOL
Don't tell me to get into shape...I have a shape...It is round!


Offline xfollowthereaperx

Re: Insurance (Still needs work!)
« Reply #61 on: March 20, 2007, 10:21:51 am »
TechnoDragon, has anyone on your forums successfully used "robthebank" because it doesn't seem it let me successfully do it

Offline TechnoDragon

Re: Insurance (Still needs work!)
« Reply #62 on: March 21, 2007, 03:26:53 pm »
well if you mean it failed...that is because of the extremely low percentage chance of success...if you mean there is an error if there is success  Iwill look at my code and if there is an issue I will post up the corrected item
Don't tell me to get into shape...I have a shape...It is round!


Offline perplexed

Re: Insurance (Still needs work!)
« Reply #63 on: April 10, 2007, 10:38:26 pm »
I would like protection against some items but is this item finalised?   I downloaded and installed it via package manager, but nothing shows in the add/edit/delete shop item page.  Does something have to be done manually?

Also does it tell you who the person stealing the money, the karma, etc is?  That would be good to know.
Estne volumen in toga, an solum tibi libet me videre?

Offline TechnoDragon

Re: Insurance (Still needs work!)
« Reply #64 on: April 11, 2007, 02:01:25 pm »
it should show up in the items list so that you can add it to the shop to buy...if not try checking your server to make sure iot was uploaded.  I can't remember if I added a PM to these versions or not.  Most likely not, because it would require manual changes to the files for the board you want it posted to.
Don't tell me to get into shape...I have a shape...It is round!


Offline ibexy

Re: Insurance (Still needs work!)
« Reply #65 on: July 07, 2007, 07:35:24 am »
I have the insurance working fine but I would like to display the insurance value in the message window just below the post count. Someone please. How can I show the insurace value in the message window just below the post count?


Offline Dr.Vista

Re: Insurance (Still needs work!)
« Reply #66 on: August 12, 2007, 01:08:15 am »
Where Do I Download The Pakage,or how do i install it :tickedoff:

Offline feildmaster

Re: Insurance (Still needs work!)
« Reply #67 on: August 12, 2007, 02:38:27 am »
ok, you can download an installable package HERE

This will do everything for you so all you'll have to do is add the item to your shop through the admin panel!

that answer your question vista?

I have the insurance working fine but I would like to display the insurance value in the message window just below the post count. Someone please. How can I show the insurace value in the message window just below the post count?
Well, you don't WANT other people to know how much insurance they have... Otherwise they wouldn't waste their items on the person. That is why i wont help you make it show. =)

Offline Str8up-Nate

Re: Insurance (Still needs work!)
« Reply #68 on: October 10, 2007, 01:27:12 pm »
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:
Code: [Select]
<b>',$txt['shop_money_in_pocket'],': </b>',$context['shop_money'],'<br />
',$context['shop_money_in_bank'],'<br />
add after:
Code: [Select]
';<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:
Code: [Select]
// The current member's money
$result = db_query("SELECT money, moneyBank
add after:
Code: [Select]
, insurance
find:
Code: [Select]
$context['shop_money_bank'] = formatMoney($row['moneyBank']);
add after:
Code: [Select]
$context['shop_shieldleft'] = $row['insurance'];
add these strings to the shop.english.php
Code: [Select]
$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

What Version Is This For? I Need Help I Have SMF Shop 3.0 and SMF Version 1.1.3
Please Help Me Add This

Offline feildmaster

Re: Insurance (Still needs work!)
« Reply #69 on: October 21, 2007, 08:05:40 am »
use the link at my above post

Offline Str8up-Nate

Re: Insurance (Still needs work!)
« Reply #70 on: October 22, 2007, 07:45:41 am »
no i mean i cant find those parts in the files??? there not there??? (shop.php, and the shop.template.php) where you say look for these Parts and add after or before there on in the code at all  please help me :)

Offline Str8up-Nate

1.1.3 - 1.1.4 Insurance Meter.
« Reply #71 on: January 22, 2008, 01:07:53 pm »
~!~Add a Meter On Your Shop Home Page To Tell You How Many Insurance's You Have Left.~!~

-All Credit Goes To Feildmaster - He Gave Me These Edits I'm Just Posting Them For Everyone Else.

These Codes Have been Tested By Me On SMF 3.0 Shop And These SMF Versions:
1. 1.1.3
2. 1.1.4

Here Are The Code Edits...



Open... Sources/Load.php



Find...
Code: [Select]
// Begin SMFShop MOD Version New Version
'money' => isset($user_settings['money']) ? $user_settings['money'] : '',
'moneyBank' => isset($user_settings['moneyBank']) ? $user_settings['moneyBank'] : '',
// End SMFShop MOD

Add After...
Code: [Select]
'insurance' => isset($user_settings['insurance']) ? $user_settings['insurance'] : '',



Find...
Code: [Select]
mem.buddy_list, mg.onlineColor AS member_group_color, IFNULL(mg.groupName, '') AS member_group,
pg.onlineColor AS post_group_color, IFNULL(pg.groupName, '') AS post_group, mem.is_activated, mem.shop_nameStyle, mem.money,

Add At End...
Code: [Select]
     
mem.insurance,



Find...
Code: [Select]
// Begin SMFShop MOD Version New Version
'money' => $profile['money'],
// End SMFShop MOD

Add After...
Code: [Select]
'insurance' => $profile['insurance'],



Find....
Code: [Select]
'money' => &$user_info['money'],

Add After...
Code: [Select]
'insurance' => &$user_info['insurance'],



Save Load.php...



Open Themes/default/shop.templete.php...



Find...
Code: [Select]
', sprintf($txt['shop_currently_have1'], formatMoney($context['user']['money'])), ($modSettings['shopBankEnabled'] ? sprintf($txt['shop_currently_have2'], formatMoney($context['user']['moneyBank'])) : ''), '
<br /><br />';

Add After...
Code: [Select]
echo 'Insurance Left: ', $context['user']['insurance'] > 5? $context['user']['insurance'] : ($context['user']['insurance'] > 0 ? '<font color="red">'.$context['user']['insurance'].', you might want to consider buying more.</font>' : '<font color="red">NONE! Buy more from the shop!</font>');



Save Themes/default/shop.templete.php...


Congrats On The New Meter
-All Credit Goes To Feildmaster - He Gave Me These Edits I'm Just Posting Them For Everyone Else.
« Last Edit: March 03, 2008, 11:15:30 am by Str8up-Nate »

Offline brianjw

Re: Insurance (Still needs work!)
« Reply #72 on: May 19, 2008, 11:16:05 am »
Does anyone have a copy of this mod that they could provide here? TechnoDragon shut down his website so the download link no longer works. He suspended his own site with his own hosting company because he didn't have any time to maintain it.

Thanks,
brianjw

Offline bfeo

Re: Insurance (Still needs work!)
« Reply #73 on: August 25, 2008, 10:23:32 am »
Wait so is

http://www.daniel15.com/forum/index.php/topic,620.msg7595.html#msg7595

The entire mod, or just the insurance meter?  Where can I find the latest codes together?  I'd like to install this one.

Offline bfeo

Re: Insurance (Still needs work!)
« Reply #74 on: August 30, 2008, 01:54:43 am »
I'm just gonna bump this.
« Last Edit: August 30, 2008, 03:13:07 am by bfeo »