Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - JRSofty

Pages: [1]
1
I saw this PHP Class posted here http://www.phpclasses.org/browse/package/3787.html

And I thought maybe it would be an idea for working around the cronjob issue. Cronjobs aren't always user friendly and something internally based might be the trick.

Currently I'm a bit busy with the SMFBot project so I really don't have the time to check the feasibility to convert this class into an SMFShop Mod. But I figure someone might be willing to take a look at it.

2
Items / Personal Interest Rates Item Available.
« on: March 27, 2007, 10:19:20 pm »
How would you like to give your users a chance to better their interest rates?

Now you can with the Personal Interest Rate project for SMFShop found here: http://intresthike.dev.dansoftaustralia.net/

Version 1.1 only adds the capability of personal interest rates and one item for buying increases.

Version 1.2 RC1 is currently out that gives two items. The original for buying an increase and the second one allows you to gamble for a better increase (administrator can set the values of both items). As well as allowing you to see your own personal interest rate bonus that it added on top of the bank interest.

I'm currently looking for people who are interested in testing the RC1 and giving me some feed back.

Enjoy

3
General SMFShop Discussion / Some Ideas I'm kicking around...
« on: March 23, 2007, 05:23:45 pm »
I've got several ideas I'm kicking around in my head for enhancement mods, and items for SMFShop was wondering if anyone would be interested in having something like these in their shop system.

1. Multiple Bank Accounts. You could have different bank accounts and different interest rates for each?
2. Rob the Bank item.
3. Steal Item. Don't just steal some money take something from their inventory (really surprised no one thought of this yet).

If you like any of these ideas let me know. I'll see if I can get a project started on Daniel's development site and start building them.

4
I was wondering if this is possible and if not can it be possible in the future.

Basically I would like to give the user a chance to buy say 3 times change other user's display name (if there are three in stock, and they have enough money). The current way of buying the item and then going back and buying it again and then going back and buying it a third time really seems to be a bit of a waste.

5
General SMFShop Discussion / Bug Report: SMF 3.0 on SMF 1.1
« on: January 19, 2007, 04:08:11 pm »
When attempting to edit an already existing item so that it is in a category I get an Error saying Hacking Attempt.

The item in question was an Email the Admin item. The error happened when I submitted the form.

6
General SMFShop Discussion / Idea for next release/version of SMFShop
« on: August 02, 2006, 10:35:15 pm »
How about making a setting where members receive some shop money when they register.

7
General SMFShop Discussion / No Title when in Shop Admin area.
« on: August 01, 2006, 06:51:51 pm »
When I'm working inside the Shop's Admin area instead of seeing "Manage Shop" or "Add Items" in the title bar of my browser I only see the URL.

Is there a way to fix this so that it looks a little nicer?

8
Items / Add Bank Interest for a user.
« on: August 01, 2006, 06:16:08 pm »
Ok this one is really tricky. I have no way of packaging it however I'm willing to let anyone who want's to take a shot of including it into the Shop system to do so.

Requirements are of course that you use SMFShop (I originally designed it under 2.0 however it still works under 2.2) You will need to have a way to change the database as you will need to create a new column in the members table. You will also need to change the dointerest.php file a little bit.

Step 1. Create a new column in the smf_members (or what ever prefix you are using) table called 'bankInterest'. It should be an integer and the default should be 0 as this would not allow modification of the standard bank interest that is part of the SMFShop system.

Step 2. Place this script into the Sources/shop/items directory:
Code: [Select]
<?php
/**********************************************\
| SMFSHOP (Shop MOD for Simple Machines Forum) |
|         (c) 2005 DanSoft Australia           |
|      http://www.dansoftaustralia.com/        |
\**********************************************/

//File: AddToInterest.php
//      Item (takes additional fields when adding to Admin panel)

//VERSION: 1.0 
//DATE: 13th February 2006
//AUTHOR: JRSofty Programming

class item_AddToInterest extends itemTemplate {
    function 
getItemDetails() {
        
$this->name "Add xxx to Interest Rate";
        
$this->desc "Increase your Interest Rate by xxx";
        
$this->price 100;
        
        
$this->require_input false;
        
$this->can_use_item true;
    }
    
    
//this is the best bit of this item. When you add the item into the admin panel, you
    //can set additional variables (up to 4). Make sure to call them info1, info2, info3
    //and info4.
    
function getAddInput() {
        return 
"Amount to change Interest Rate by: <input type='text' name='info1' value='1'>";
    }

    
//the additional parameters (see 'getAddInput' above) are in the '$item_info array.
    //make sure to make it global (like shown here) otherwise you won't be able to access
    //it's contents. THE ARRAY IS 1-BASED (eg. 1 IS THE FIRST ITEM) NOT 0-BASED!
    
function onUse() {
        global 
$db_prefix$ID_MEMBER$item_info;

        
$result db_query("UPDATE {$db_prefix}members
                            SET bankInterest = bankInterest + 
{$item_info[1]}
                            WHERE ID_MEMBER = 
{$ID_MEMBER}",
                            
__FILE____LINE__);
        return 
"Successfully added {$item_info[1]} to interest!";
        
        
//echo $item_info[1];
        
die("dead");
    }

}

?>

Step 3: Here is the dointerest.php that I use so that the interest increase is picked up from the member's row in the table and added to the bank interest.
Code: [Select]
<?php



include ('../../SSI.php');

$request db_query("SELECT `ID_MEMBER`, `bankInterest` 
FROM 
{$db_prefix}members",__FILE__,__LINE__);

while((
$row mysql_fetch_array($request)) !== false){

$interest_rate = ($modSettings['shopInterest'] + $row['bankInterest']) / 100;
db_query("UPDATE {$db_prefix}members
SET moneyBank = moneyBank + (moneyBank*
{$interest_rate}) WHERE `ID_MEMBER` = ".$row['ID_MEMBER'], __FILE____LINE__);

echo 
$row['ID_MEMBER'] . " Interest added at " $interest_rate " ".date("d/m/Y h:i:s A")."<br>";

}


?>

Known issues:
When you enter the Shop your updated or changed Interest rate does not display. It only displays what the SMFShop System Interest is set. Other than that it seems to work ok.

If anyone would like to package this please feel free (or if Daniel15 would like to include it in his next version that is also fine :D) the only thing I ask is that my name remain in place in the code.

9
General SMFShop Discussion / How to uninstall after updates?
« on: July 31, 2006, 10:05:29 pm »
Hi,

It seems another package has broken my SMFShop and I would like to uninstall - re-install. However I originally installed a fresh 2.0 version and have upgraded once to 2.1 and then to 2.2 and now when I attempt to uninstall it won't let me because the packages for 2.1 and 2.2 have no uninstall items.

I'm using SMF 1.1 RC2


Pages: [1]