SMFShop - Shop MOD

Started by SMFHacks.com Team, December 27, 2004, 06:46:17 AM

Previous topic - Next topic

Daniel15

#700
I just wanted to say that I'm working on the next version of SMFShop :D It should be available soon!

Quote from: totenmaske on November 22, 2005, 03:05:07 AM
Hello All,

My shop seems to be working fine with the following exceptions.


  • When starting topics or replying to threads...credits are credited to members twice (X2)!
  • When purchasing items the system gives the purchaser 2 of the same item but only in Firefox (not IE)?!
  • These two problems could be related.  When I edit a board the following field is listed twice "Count Shop Points - Members will receive Shop credits for posting in this forum."
Check for duplicate code sections in Post.php and ManageBoards.php... Actually, it would be best to check for duplicate sections in all of the files SMFShop edits (see the .xml file in the ZIP for the file names).

QuoteHow do I upgrade when its not installed
Don't worry about it. Just install the upgrade package. It should work fine :D

QuoteI'd also recommend to Daniel to use "realName" instead of "memberName" to display names.
OK, in the next release I'll use realName as opposed to memberName.

Daniel15, former Customisation team member, resigned due to lack of time. I still love everyone here :D.
Go to smfshop.com for SMFshop support, do NOT email or PM me!

Bigguy

Ok I did what you said and upgraded to the new version without problem. I have just cleared my error log before I did the install. (Sorry for all the screenshots) Heres one more pic maybe this will help figure out whats going on.


ArkServer

I Still cant install it using the attachment in the first post. Can anony give me a sql dump of the shop?

tX

Quote from: daniel15 on November 25, 2005, 05:50:16 AM
I just wanted to say that I'm working on the next version of SMFShop :D It should be available soon!

Quote from: totenmaske on November 22, 2005, 03:05:07 AM
Hello All,

My shop seems to be working fine with the following exceptions.


  • When starting topics or replying to threads...credits are credited to members twice (X2)!
  • When purchasing items the system gives the purchaser 2 of the same item but only in Firefox (not IE)?!
  • These two problems could be related.  When I edit a board the following field is listed twice "Count Shop Points - Members will receive Shop credits for posting in this forum."
Check for duplicate code sections in Post.php and ManageBoards.php... Actually, it would be best to check for duplicate sections in all of the files SMFShop edits (see the .xml file in the ZIP for the file names).

QuoteHow do I upgrade when its not installed
Don't worry about it. Just install the upgrade package. It should work fine :D

QuoteI'd also recommend to Daniel to use "realName" instead of "memberName" to display names.
OK, in the next release I'll use realName as opposed to memberName.



cool cool cool!!!! I hope it installed easy on a RC1 board. :) I cant wait, I'm setting up a new forum soon and it'll be cool to try this.

Foreverpurple

ANyone know if I uninstall the Shop and the reinstall it, will my members lose their money??

kadhumia_flo

I have a new theme, and i want it to have the amount of credit one has with the post, just like my old theme

Please advise
1) If I uninstall and reinstall , will everones credit be reset? If NO, go to 4
2) Is there another way? If Yes go to number 4
3) is there anthing else? If NO press Alt+F4
4) Thanks, now reply and tell me

Bigguy

Yes I do believe they will.

Quote from: Foreverpurple on November 26, 2005, 06:06:02 AM
ANyone know if I uninstall the Shop and the reinstall it, will my members lose their money??

WedgeTalon

Quote from: kadhumia_flo on November 26, 2005, 07:36:10 AM
I have a new theme, and i want it to have the amount of credit one has with the post, just like my old theme

Please advise
1) If I uninstall and reinstall , will everones credit be reset? If NO, go to 4

I would bet that if you backed up the database, un/re-install, then restore the database, that they will keep the amounts.

Also, couldn't you just manually edit the new theme in the right spot to show it? Seems to me lke that would be easiest. :-\

Foreverpurple

Quote from: Bigguy on November 26, 2005, 10:32:43 AM
Yes I do believe they will.

Quote from: Foreverpurple on November 26, 2005, 06:06:02 AM
ANyone know if I uninstall the Shop and the reinstall it, will my members lose their money??

Well turns out there's not an uninstall option anyhow.

liljdude

help!!!

ok so i am having problems installing my this mod... everytime i click apply it says success all the way down and when i check to see if it is installed it does not work what am i doing wrong... i am kind of new to smf but i like the software just having problems anyone wanna help me either reply or pm me

Saku

Quote from: Brian on February 27, 2005, 01:41:19 AM
Here is what I did to modify the removetopic.php and post.php to prevent users from editing and deleting posts to get credits.

removetopic.php


// Decrease the post counts.
if ($decreasePostCount)
{
$requestMembers = db_query("
SELECT m.ID_MEMBER, COUNT(m.ID_MSG) AS posts
FROM {$db_prefix}messages AS m, {$db_prefix}boards AS b
WHERE m.ID_TOPIC $condition
AND b.ID_BOARD = m.ID_BOARD
AND m.icon != 'recycled'
AND b.countPosts = 0
GROUP BY m.ID_MEMBER", __FILE__, __LINE__);




if (mysql_num_rows($requestMembers) > 0)
{
while ($rowMembers = mysql_fetch_assoc($requestMembers))

{
     //BEGIN Shop MOD 0.2 code
        $result = db_query("UPDATE {$db_prefix}members
                            SET money = money - {$modSettings['shopPointsPerPost']}
                            WHERE ID_MEMBER = {$rowMembers['ID_MEMBER']}
                            LIMIT 1", __FILE__, __LINE__);
        //END SHOP MOD

updateMemberData($rowMembers['ID_MEMBER'], array('posts' => 'posts - ' . $rowMembers['posts']));
}
}
mysql_free_result($requestMembers);



}




// Only decrease post counts.
else
db_query("
UPDATE {$db_prefix}topics
SET numReplies = numReplies - 1
WHERE ID_TOPIC = $row[ID_TOPIC]
LIMIT 1", __FILE__, __LINE__);

db_query("
UPDATE {$db_prefix}boards
SET numPosts = numPosts - 1
WHERE ID_BOARD = $row[ID_BOARD]
LIMIT 1", __FILE__, __LINE__);

// If the poster was registered and the board this message was on incremented
// the member's posts when it was posted, decrease his or her post count.
if (!empty($row['ID_MEMBER']) && $decreasePostCount && empty($row['countPosts']))

{
updateMemberData($row['ID_MEMBER'], array('posts' => '-'));
               //BEGIN Shop MOD 0.2 code
        $result = db_query("UPDATE {$db_prefix}members
                            SET money = money - {$modSettings['shopPointsPerPost']}
                            WHERE ID_MEMBER = {$ID_MEMBER}
                            LIMIT 1", __FILE__, __LINE__);
        //END SHOP MOD
}

// Only remove posts if they're not recycled.





post.php


// Lock and or sticky the post.
if ((isset($_POST['sticky']) && !empty($modSettings['enableStickyTopics'])) || isset($_POST['lock']) || isset($_REQUEST['poll']))
{
if (isset($_POST['sticky']) && !empty($modSettings['enableStickyTopics']))
$setString = 'isSticky = ' . (int) $_POST['sticky'];
else
$setString = '';

if (isset($_POST['lock']) && $setString != '')
$setString .= ', locked = ' . (int) $_POST['lock'];
elseif (isset($_POST['lock']))
$setString = 'locked = ' . (int) $_POST['lock'];

if (isset($_REQUEST['poll']) && $setString != '')
$setString .= ", ID_POLL = $ID_POLL";
elseif (isset($_REQUEST['poll']))
$setString = "ID_POLL = $ID_POLL";

db_query("
UPDATE {$db_prefix}topics
SET $setString
WHERE ID_TOPIC = $topic
LIMIT 1", __FILE__, __LINE__);
}

// Might've changed the subject/poster.
updateLastMessages($board);

$newTopic = false;

        //BEGIN Shop MOD 0.2 code
        $result = db_query("UPDATE {$db_prefix}members
                            SET money = money - {$modSettings['shopPointsPerPost']}
                            WHERE ID_MEMBER = {$ID_MEMBER}
                            LIMIT 1", __FILE__, __LINE__);
        //END SHOP MOD


}



how can i do that with SMF 1.1 RC1, my members spam and delete theirs posts to get credit
thanks

Gigerm-Unit

please make a version where it works on all themes check my site it only works on default please make one that works for all even if the button does not match.
As we walk to the valley of the dead we gain power of a gun of doom made by god and designed by lucifer we use it to destroy everything good or evil.

houston

Quote from: Gigerm-Unit on November 28, 2005, 10:00:56 PM
please make a version where it works on all themes check my site it only works on default please make one that works for all even if the button does not match.

That would be a lot of work. If you want to edit all your themes you need to do it manually. Just follow the .xml files in the mod and do only the edits that change files within the themes directory(i.e. classic,default, and any other theme that you may have installed.). everything else the the xml file changes (i.e. anything in the sources directory that it modifies) would only have to be done once,

Remember always make backups first befrore you do any manual modifications

desistyle

How should i uninstall this mod i am running 1.05 smf and when i now try to uninstall this mod it says

An Error Has Occurred!
This package cannot be uninstalled, because there is no uninstaller!

Please contact the mod author for more information.


Can someone help please

Saku

Quote from: Sakuragi on November 28, 2005, 07:24:57 PM
Quote from: Brian on February 27, 2005, 01:41:19 AM
Here is what I did to modify the removetopic.php and post.php to prevent users from editing and deleting posts to get credits.

removetopic.php


// Decrease the post counts.
if ($decreasePostCount)
{
$requestMembers = db_query("
SELECT m.ID_MEMBER, COUNT(m.ID_MSG) AS posts
FROM {$db_prefix}messages AS m, {$db_prefix}boards AS b
WHERE m.ID_TOPIC $condition
AND b.ID_BOARD = m.ID_BOARD
AND m.icon != 'recycled'
AND b.countPosts = 0
GROUP BY m.ID_MEMBER", __FILE__, __LINE__);




if (mysql_num_rows($requestMembers) > 0)
{
while ($rowMembers = mysql_fetch_assoc($requestMembers))

{
     //BEGIN Shop MOD 0.2 code
        $result = db_query("UPDATE {$db_prefix}members
                            SET money = money - {$modSettings['shopPointsPerPost']}
                            WHERE ID_MEMBER = {$rowMembers['ID_MEMBER']}
                            LIMIT 1", __FILE__, __LINE__);
        //END SHOP MOD

updateMemberData($rowMembers['ID_MEMBER'], array('posts' => 'posts - ' . $rowMembers['posts']));
}
}
mysql_free_result($requestMembers);



}




// Only decrease post counts.
else
db_query("
UPDATE {$db_prefix}topics
SET numReplies = numReplies - 1
WHERE ID_TOPIC = $row[ID_TOPIC]
LIMIT 1", __FILE__, __LINE__);

db_query("
UPDATE {$db_prefix}boards
SET numPosts = numPosts - 1
WHERE ID_BOARD = $row[ID_BOARD]
LIMIT 1", __FILE__, __LINE__);

// If the poster was registered and the board this message was on incremented
// the member's posts when it was posted, decrease his or her post count.
if (!empty($row['ID_MEMBER']) && $decreasePostCount && empty($row['countPosts']))

{
updateMemberData($row['ID_MEMBER'], array('posts' => '-'));
               //BEGIN Shop MOD 0.2 code
        $result = db_query("UPDATE {$db_prefix}members
                            SET money = money - {$modSettings['shopPointsPerPost']}
                            WHERE ID_MEMBER = {$ID_MEMBER}
                            LIMIT 1", __FILE__, __LINE__);
        //END SHOP MOD
}

// Only remove posts if they're not recycled.





post.php


// Lock and or sticky the post.
if ((isset($_POST['sticky']) && !empty($modSettings['enableStickyTopics'])) || isset($_POST['lock']) || isset($_REQUEST['poll']))
{
if (isset($_POST['sticky']) && !empty($modSettings['enableStickyTopics']))
$setString = 'isSticky = ' . (int) $_POST['sticky'];
else
$setString = '';

if (isset($_POST['lock']) && $setString != '')
$setString .= ', locked = ' . (int) $_POST['lock'];
elseif (isset($_POST['lock']))
$setString = 'locked = ' . (int) $_POST['lock'];

if (isset($_REQUEST['poll']) && $setString != '')
$setString .= ", ID_POLL = $ID_POLL";
elseif (isset($_REQUEST['poll']))
$setString = "ID_POLL = $ID_POLL";

db_query("
UPDATE {$db_prefix}topics
SET $setString
WHERE ID_TOPIC = $topic
LIMIT 1", __FILE__, __LINE__);
}

// Might've changed the subject/poster.
updateLastMessages($board);

$newTopic = false;

        //BEGIN Shop MOD 0.2 code
        $result = db_query("UPDATE {$db_prefix}members
                            SET money = money - {$modSettings['shopPointsPerPost']}
                            WHERE ID_MEMBER = {$ID_MEMBER}
                            LIMIT 1", __FILE__, __LINE__);
        //END SHOP MOD


}



how can i do that with SMF 1.1 RC1, my members spam and delete theirs posts to get credit
thanks
Any one can help me??

Bug : You must modify the name of dointerest.php, if not the members can add the interests when they want.
http://www.site.com/forum/Sources/shop/dointerest.php

Gigerm-Unit

can
Quote from: desistyle on November 29, 2005, 12:45:40 AM
How should i uninstall this mod i am running 1.05 smf and when i now try to uninstall this mod it says

An Error Has Occurred!
This package cannot be uninstalled, because there is no uninstaller!

Please contact the mod author for more information.


Can someone help please
anyone please tell me a way to uninstall this?
As we walk to the valley of the dead we gain power of a gun of doom made by god and designed by lucifer we use it to destroy everything good or evil.

Luistov

ok i downloaded SMFShop 1.3 Fresh. i uploaded the .zip 2 my package manager, i clicked on apply mod. this is what it tells me

Installation Readme

Please read this WHOLE readme before starting installation!

This MOD will add a Forum Shop to your Forum (similar to IBStore for Invision Board).

This is the FRESH INSTALL package. If you've installed SMFShop 1.2, please download the SMFShop 1.2 to 1.3 update package instead!

Changes in 1.3:
* You can now choose what forums members gain points in! This was a frequently requested addition.
* Admins can now change a member's money in the bank (as well as in pocket)
* Email an Admin item fixed (yet another problem was discovered!)
* Link to DanSoft Australia was changed to new URL

To edit any of the text in the shop (for example, if you want to call it 'Store' rather than 'Shop', or 'Money Storage' rather than 'Bank'), open the 'Themes/default/languages/Shop.english.php' file and look around.

!!!!!!!IMPORTANT!!!!!!!!!!! READ BEFORE INSTALLING!!!!!
Please read the following BEFORE you install.

If you get a 'Internal Server Error' message while installing (this happens rarely, but does happen), do the following:
1. Proceed with installation until "Internal Server Error" page appears. LEAVE THIS PAGE AS IS.
2. FTP into your account. Look for the folder which has been chmodded to 777. This is typically the root folder of your forum. (eg. /public_html/forums)
3. CHMOD the directory back to 755.
4. Refresh the "Internal Server Error" page. You may need to : a) IE - hold CTRL and press Refresh; b) Firefox - hold SHIFT and press Reload.

!!!!!!!IMPORTANT!!!!!!!!!!!

(c) 2005 DanSoft Australia - hxxp:www.dansoftaustralia.net/ [nonactive]
Version: 1.3 (Build 6)
Release Date: 24th September 2005



Install Actions for archive SMFShop_111.3_FRESH_INSTALL.zip:
Installing this package will perform the following actions:  Type Action Description
1. Extract File ./Sources/shop/items/AddToPostCount.php  
2. Extract File ./Sources/shop/items/ChangeDisplayName.php  
3. Extract File ./Sources/shop/items/ChangeOtherTitle.php  
4. Extract File ./Sources/shop/items/ChangeUsername.php  
5. Extract File ./Sources/shop/items/ChangeUserTitle.php  
6. Extract File ./Sources/shop/items/EmailAdmin.php  
7. Extract File ./Sources/shop/items/filedownload.php  
8. Extract File ./Sources/shop/items/IncreaseKarma.php  
9. Extract File ./Sources/shop/items/IncreaseTimeLoggedIn.php  
10. Extract File ./Sources/shop/items/RandomMoney.php  
11. Extract File ./Sources/shop/items/Rock.php  
12. Extract File ./Sources/shop/items/Steal.php  
13. Extract File ./Sources/shop/items/testitem.php  
14. Extract File ./Sources/shop/items/testitem2.php  
15. Extract File ./Sources/shop/items/ChangeOtherTitle.php  
16. Extract File ./Sources/shop/items/DecreasePost.php  
17. Extract File ./Sources/shop/item_images/Airplane.gif  
18. Extract File ./Sources/shop/item_images/Bear.gif  
19. Extract File ./Sources/shop/item_images/blank.gif  
20. Extract File ./Sources/shop/item_images/Boardarrow.gif  
21. Extract File ./Sources/shop/item_images/Breadandbutter.gif  
22. Extract File ./Sources/shop/item_images/Claspknife.gif  
23. Extract File ./Sources/shop/item_images/Clip.gif  
24. Extract File ./Sources/shop/item_images/Compactdiscs.gif  
25. Extract File ./Sources/shop/item_images/Controller.gif  
26. Extract File ./Sources/shop/item_images/Darkbeer.gif  
27. Extract File ./Sources/shop/item_images/Dousojin.gif  
28. Extract File ./Sources/shop/item_images/Dutchoven.gif  
29. Extract File ./Sources/shop/item_images/Dxtwoburner.gif  
30. Extract File ./Sources/shop/item_images/Figure.gif  
31. Extract File ./Sources/shop/item_images/Filefolder.gif  
32. Extract File ./Sources/shop/item_images/Fish.gif  
33. Extract File ./Sources/shop/item_images/Fishingtackle.gif  
34. Extract File ./Sources/shop/item_images/Flyingobject.gif  
35. Extract File ./Sources/shop/item_images/Gamepad.gif  
36. Extract File ./Sources/shop/item_images/Hamburger.gif  
37. Extract File ./Sources/shop/item_images/iBook.gif  
38. Extract File ./Sources/shop/item_images/Icecream.gif  
39. Extract File ./Sources/shop/item_images/IronDevil.gif  
40. Extract File ./Sources/shop/item_images/Kettle.gif  
41. Extract File ./Sources/shop/item_images/Lantern.gif  
42. Extract File ./Sources/shop/item_images/Lighterfluid.gif  
43. Extract File ./Sources/shop/item_images/Makecoffee.gif  
44. Extract File ./Sources/shop/item_images/Markers.gif  
45. Extract File ./Sources/shop/item_images/Moneys.gif  
46. Extract File ./Sources/shop/item_images/Peas.gif  
47. Extract File ./Sources/shop/item_images/Percolator.gif  
48. Extract File ./Sources/shop/item_images/Scotchtape.gif  
49. Extract File ./Sources/shop/item_images/Tent.gif  
50. Extract File ./Sources/shop/item_images/Titaniummug.gif  
51. Extract File ./Sources/shop/item_images/Tomatoes.gif  
52. Extract File ./Sources/shop/item_images/Toypiano.gif  
53. Extract File ./Sources/shop/item_images/Train.gif  
54. Extract File ./Sources/shop/item_images/Tree.gif  
55. Extract File ./Sources/shop/item_images/Truck.gif  
56. Extract File ./Sources/shop/item_images/Videocassettes.gif  
57. Extract File ./Sources/shop/item_images/Wheel.gif  
58. Extract File ./Sources/shop/item_images/Woodenpuzzle.gif  
59. Extract File ./Sources/shop/item_images/Woodentoy.gif  
60. Extract File ./Sources/shop/item_engine.php  
61. Extract File ./Sources/shop/ShopAdmin.php  
62. Extract File ./Sources/shop/Shop.php  
63. Extract File ./Sources/shop/dointerest.php  
64. Extract File Themes/default/images/english/shop.gif  
65. Extract File Themes/default/languages/Shop.english.php  
66. Extract File Themes/default/ShopAdmin.template.php  
67. Extract File Themes/default/Shop.template.php  
68. Execute Modification ./index.php Success
69. Execute Modification ./Sources/Post.php Success
70. Execute Modification ./Sources/Subs.php Success
71. Execute Modification ./Sources/ManageBoards.php Success
72. Execute Modification ./Themes/default/ManageBoards.template.php Success
73. Execute Modification ./Themes/default/Display.template.php Success
74. Execute Modification ./Themes/default/index.template.php Success
75. Execute Code installScript.php



FTP Information Required
Some of the files this package needs to modify are not writable. This needs to be changed by logging into FTP and chmoding the files.
FTP Server: Port: localhost  
Username:   XXXX
Password:   XXXXXX
Local path to SMF: public_html/forums

after i enterall my FTP information, i click on the Proceed button. it takes me back 2 the same page. IDK what 2 do anymore. I need help


Ceroscuro

I actually don't see the "FRESH" install anywhere... anyone got a link?

greyknight17

Quote from: Dark Zero on December 03, 2005, 01:34:44 PM
I actually don't see the "FRESH" install anywhere... anyone got a link?
Get it from the Mods Page  :)

Bigguy

#719
I really need help with this mod. I`m getting alot of errors from it. These are some of the errors i`m getting from it.

EDIT: Umm, I have just looked at this file and the last line in it is like 350 or something, there is no lines after that so there cant be a line 936 is this why there is an error ??

    
QuoteToday at 09:12:16 PM
Apply Filter: Only show the error messages of this IP address *******      Apply Filter: Only show the error messages of this session 511940c7ee4f8d357bac0ffa41591f6a
Apply Filter: Only show the error messages of this URL http://www.mywworld.com/smf/index.php?board=67.0
Apply Filter: Only show the errors with the same message
8: Undefined index: shop
File: /home/****/public_html/smf/Themes/cold/MessageIndex.template.php (eval?)
Line: 936
   
Apply Filter: Only show the error messages of this member zvez    Today at 09:12:26 PM
Apply Filter: Only show the error messages of this IP address ********      Apply Filter: Only show the error messages of this session 511940c7ee4f8d357bac0ffa41591f6a
Apply Filter: Only show the error messages of this URL http://www.mywworld.com/smf/index.php
Apply Filter: Only show the errors with the same message
8: Undefined index: shop
File: /home/***/public_html/smf/Themes/cold/BoardIndex.template.php (eval?)
Line: 936
   
Apply Filter: Only show the error messages of this member Bigguy    Today at 09:12:58 PM
Apply Filter: Only show the error messages of this IP address *******      Apply Filter: Only show the error messages of this session 766b2a4ada7a4a46400d2b8d91ccaba8
Apply Filter: Only show the error messages of this URL http://www.mywworld.com/smf/index.php
Apply Filter: Only show the errors with the same message
8: Undefined index: shop
File: /home/****/public_html/smf/Themes/cold/MessageIndex.template.php (eval?)
Line: 936

Advertisement: