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.


Messages - JRSofty

Pages: 1 2 [3]
31
Items / Re: 'Profile Image' item
« on: August 10, 2006, 10:07:02 pm »
I believe the file you are looking for is the Display.template.php file.

I would suggest running a search in your text editor for "Flag:" without the quotes and that should take you to where the code sits. Then just move it to where you want and change the word Flag to something else.

32
General SMFShop Discussion / Re: question
« on: August 10, 2006, 05:33:16 pm »
Normally you will install the image in the following directory

Themes/{Theme Name}/images/{language}

Replace {Theme Name} with the name of your theme. For example classic, or default (or the name of your custom theme).

Replace {language} with the language that your button is. For example english


33
Items / Re: Add Bank Interest for a user.
« on: August 07, 2006, 04:11:57 pm »
Yeah Time is my problem as well ;)

I'll see if I can get it packaged.

Quick question about the dointerest.php script. In your script you have this statement if(!isset($_SERVER['HTTP_HOST'])). Is this required for a CRONJOB to operate correctly?

I'm just wondering because it seems none of the CRONJOB places that I've seen on the net seem to work for my dointerest.php call.

34
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.

35
General SMFShop Discussion / Re: How to uninstall after updates?
« on: August 01, 2006, 06:55:37 pm »
The reason I had to drop the forum wasn't because of SMFShop. Apparently some of the other packages I had installed made a major mess of some of my SMF Core files. I have finally determined the PM Online Moderators and Administrators on Message Report package does not play well with SMFShop. With PM Online Moderators installed SMFShop only gives me a white screen when a user accesses the shop. However, once removed the SMFShop works just fine.

I would suggest that someone place a mention in the read me that these two do not work well together.

36
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?

37
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.

38
General SMFShop Discussion / Re: How to uninstall after updates?
« on: July 31, 2006, 10:39:45 pm »
Hmm It looks like I'm going to back up my topics and users and drop the whole forum and re-install :(

39
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 2 [3]