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

Offline xfollowthereaperx

Re: Insurance (Still needs work!)
« Reply #30 on: February 22, 2007, 01:50:55 pm »
:\

So, it didn't work? :(

Offline TechnoDragon

Re: Insurance (Still needs work!)
« Reply #31 on: February 22, 2007, 02:03:07 pm »
are you sure you didn't already add the insurance field to your member table?
Don't tell me to get into shape...I have a shape...It is round!


Offline xfollowthereaperx

Re: Insurance (Still needs work!)
« Reply #32 on: February 22, 2007, 02:04:47 pm »
No, it's still giving me errors   :'(



Quote
Unknown column 'insurance' in 'field list'
File: /hosted/subs/ulmb.com/p/o/powerspike/public_html/forums/Sources/shop/items/Insurance.php
Line: 39

Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 1.1.2, while your database is at version 1.1. The above error might possibly go away if you execute the latest version of upgrade.php.

Offline TechnoDragon

Re: Insurance (Still needs work!)
« Reply #33 on: February 24, 2007, 07:48:25 am »
ok, mediumint 10 default is zero
Don't tell me to get into shape...I have a shape...It is round!


Offline xfollowthereaperx

Re: Insurance (Still needs work!)
« Reply #34 on: February 24, 2007, 07:49:23 am »
I got the item to work, now I need to edit in the codes for the items that I would like to prevent.

If I get them to work, I'll put them in a Zip and host them for everyone

Offline xfollowthereaperx

Re: Insurance (Still needs work!)
« Reply #35 on: February 24, 2007, 07:57:49 am »
Can you do me a favor and post another example item that works with insurance, and if you already coded all of the items with the new insurance code, could you please post them?

Thanks, it looks as if you made it so that the items STILL can be unsuccessful, but if they are successful, and the member has insurance, the item still does nothing. Very awesome idea, I wouldn't have thought of it.

Thanks a lot

Offline TechnoDragon

Re: Insurance (Still needs work!)
« Reply #36 on: February 24, 2007, 07:58:07 am »
Well, that opackage you downloaded from me already has the steal item edited...as for mass use items (like aramageddon or rob the bank) i already have those figured out how to make them work!
Don't tell me to get into shape...I have a shape...It is round!


Offline xfollowthereaperx

Re: Insurance (Still needs work!)
« Reply #37 on: February 24, 2007, 07:59:02 am »
Is the steal item the updated version without the bug in it?

Offline TechnoDragon

Re: Insurance (Still needs work!)
« Reply #38 on: February 24, 2007, 07:59:46 am »
it has been working perfectly for me...though i suppose i could zip up all of the items i have edited and post them here...
Don't tell me to get into shape...I have a shape...It is round!


Offline xfollowthereaperx

Re: Insurance (Still needs work!)
« Reply #39 on: February 24, 2007, 08:00:22 am »
it has been working perfectly for me...though i suppose i could zip up all of the items i have edited and post them here...

PLEASE DO IT  :D

Offline TechnoDragon

Re: Insurance (Still needs work!)
« Reply #40 on: February 24, 2007, 08:04:36 am »
Ok, just added a zip file to my downloads section at my site that hass ALL of the items i have edited to work with insursurance...as well as a few other extras in them...

I have modified them to also post a new topic to the forum when used...though you will have to modify them to insert your own board id...
This line is what tells it what board to post to:
Code: [Select]
$topicOptions['board'] = 127; //SHOP history forum  Mine is #98  You need to create this then use it's ID number
Don't tell me to get into shape...I have a shape...It is round!


Offline xfollowthereaperx

Re: Insurance (Still needs work!)
« Reply #41 on: February 24, 2007, 08:06:32 am »
Ok, just added a zip file to my downloads section at my site that hass ALL of the items i have edited to work with insursurance...as well as a few other extras in them...

I have modified them to also post a new topic to the forum when used...though you will have to modify them to insert your own board id...
This line is what tells it what board to post to:
Code: [Select]
$topicOptions['board'] = 127; //SHOP history forum  Mine is #98  You need to create this then use it's ID number
So if I don't add that code the item will still work perfectly fine?

Thanks a bunch, sorry for bugging you  :P

Offline TechnoDragon

Re: Insurance (Still needs work!)
« Reply #42 on: February 24, 2007, 08:07:35 am »
actually that line is already in each of those files you are/have downloaded you'll have to modify it to a different board id (unless you already have a board id of 127)  lol
Don't tell me to get into shape...I have a shape...It is round!


Offline xfollowthereaperx

Re: Insurance (Still needs work!)
« Reply #43 on: February 24, 2007, 08:18:09 am »
Codes, meaning items? Okay, I'll edit it out  ::)


Thanks a lot
I'll make the first post have all of the information anyone would need to add this item to their forum

Offline Daniel15

Re: Insurance (Still needs work!)
« Reply #44 on: February 24, 2007, 08:52:34 am »
Wow, great idea, I may implement something similar in a future version of SMFShop :).

Just a note, I'm very strict about the SMF Coding Guidelines now... it's best to make sure your code follows the coding guidelines (see http://custom.simplemachines.org/mods/guidelines.php) :)

Also, to whoever invented the SMFShop logging stuff:
Quote
Code: [Select]
require_once($sourcedir . '/Subs-Post.php');
$topicOptions['board'] = 127; //SHOP history forum  Mine is #98  You need to create this then use it's ID number
$topicOptions['id']=0; //NEW topic
$msgOptions['subject'] = "I am a Thief {$user_info['username']}"; //Subject
$msgOptions['body'] = "{$user_info['username']} just used a sticky hand and stole {$steal_amount} from ".$_POST['stealfrom']; //Message area
  $msgOptions['icon'] = 'exclamation';
$posterOptions['id']=$ID_MEMBER; //Current user's ID
createPost(&$msgOptions, &$topicOptions, &$posterOptions); //create the post using the SMF posting function

SMFShop 3.0 has a Shop-Subs.php file... It may be worth creating a function called ShopLog() or similar, and placing the code in there. Then, reduce the code in the SMFShop item to a single function call :).
I may have logging in a future version, but unfortunately, school is taking up all my free time at the moment :(
« Last Edit: February 24, 2007, 08:56:15 am by Daniel15 »