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 - TimeVortex

Pages: [1]
1
General SMFShop Discussion / SMFShop for SMF 2.0 Beta 4 and RC1
« on: August 29, 2008, 07:15:38 am »
Hi all,

After upgrading one of my forums from SMF 1.1.5 to SMF 2.0 Beta 4, I lost the shop mod in the process. As I understand Daniel didn't have time to port it himself, I decided to do so myself.

I'm attaching the package. Please note this will not work for any version below SMF 2.0 Beta 4. This includes SMF 1.1.8 and SMF 2.0 Beta 3.1 Public!

Notable changes:
  • Rewrote all queries to confirm to SMF 2.0's new database abstraction layer.
  • Added a new install script that will upgrade any existing shop data.
  • Moved the interest adding to a scheduled task, removing the necessity of a cronjob.

Now, I may be posting this here, and will be monitoring this topic for a few days, but I really don't have time to fully support it. To my knowledge it all works and I'm using it to full satisfaction on my own forum, so I'm rooting on Daniel releasing it officially.

I realise SMF 2.0 Beta 4 is currently only available for charter members, but since they already have it, a public release probably won't be too far away. Please don't ask for support of SMF 2.0 beta 3.1. Thanks.

TimeVortex



Changelog

Update 16th April 2009 (version 3.1.4):
Fixed another bug reported in this topic.

Update 6th April 2009 (version 3.1.3):
Fixed the bugs reported in this very topic. Sorry it took me so long to reply!

Update 6th February 2009 (version 3.1.2):
Added a version that fully supports SMF 2.0 RC1 (smfshop312_only_for_smf_20_rc1.zip). Users that wish to use it on an (outdated!) 2.0 beta 4 install can still download the smfshop31.zip package.

2
Bugs / Bug in trade centre
« on: December 23, 2007, 07:02:39 pm »
One of my users found a bug in the SMFshop mod: when he bought an item in the trade centre, the shop always said he bought it from me (user #1), whilst in fact he had bought it from someone completely different.

Since it didn't seem to be fixed in the SVN trunk, I tracked this down to a query in Shop-Trade.php, line 89-95:

Code: [Select]
$result = db_query("
SELECT it.name, inv.tradecost, inv.trading, inv.ownerid, m.realName,
m.emailAddress
FROM {$db_prefix}shop_inventory AS inv, {$db_prefix}shop_items AS it,
{$db_prefix}members AS m
WHERE inv.id = {$_GET['id']} AND inv.itemid = it.id
LIMIT 1", __FILE__, __LINE__);


I replaced it with:
Code: [Select]
$result = db_query("
SELECT it.name, inv.tradecost, inv.trading, inv.ownerid, m.realName,
m.emailAddress
FROM {$db_prefix}shop_inventory AS inv, {$db_prefix}shop_items AS it
INNER JOIN {$db_prefix}members AS m ON inv.ownerid = m.ID_MEMBER
WHERE inv.id = {$_GET['id']} AND inv.itemid = it.id
LIMIT 1", __FILE__, __LINE__);

And that fixed it.

Pages: [1]