Jump to content

(e32) Points Per Download


(e) Eric

Recommended Posts

%7Boption%7D



File Name: (e32) Points Per Download

File Submitter: (e) Eric

File Submitted: 14 Aug 2011

File Category: User and Social Engagement

Supported Versions: IP.Board 3.2.x, IP.Board 3.3.x, IP.Board 3.4.x



Award/Charge Points Per Download/File-Upload/File-Comment. An ibEconomy Plug-in.

This REQUIRES IPB 3.2, IP.Downloads, and ibEconomy 2.0.1.

Main Settings:

  • On/Off
  • Use ibEconomy Group Percentage Adjustment?
  • Color Selector for Price Tag
  • Default Points Per New Download/Add File/File Comment
  • Enable File-Specific Point Costs?
  • Allow File-Uploaders to Receive the Point Proceeds

Group/File Settings:
  • Group Allowed?
  • Group Allowed to Input Custom Point Costs Per File?
  • Download Category point-per-download value
  • Download Category point-per-add value
  • Download Category point-per-comment value



here to download this file

Link to comment
Share on other sites

  • Replies 74
  • Created
  • Last Reply

YW!

Updated to version Beta 2.


What's New in Version 0.0.2 (See full changelog)

  • Added another hook which displays point cost on Confirm Download page (need to enable category disclaimer for this to work)
  • Allow for multiple files in the same download (divides cost by number of files)
  • New setting to choose to highlight the cost of the file (with color selector)
Link to comment
Share on other sites

That change in Beta 2 For downloads with more than one file is incorrect. It counts uploaded screenshots as well, so items with screenshots are cheaper than they should be. I'm at work so I can't upload a fixed version now, but I'll release Beta 3 tonight which should fix it. In the meantime, you probably want to hold off on enabling it on live boards, since the price shown will be more than the actual price charged.

Link to comment
Share on other sites

Let's try this again :3

Hmm. I have my downloads set so it costs 25 points to download something. I also have it set so that the uploader receives the points. Whenever I download my own files, I lose 8 points. Am I missing anything or is that supposed to happen?

Link to comment
Share on other sites

The way the logic works currently is that it only gives the points to the uploader if the uploader input a specific amount for that file. If the cost of the download is based on either the default download setting or the default category-specific download setting, then it charges anyone who downloads it, regardless of any other factors.

So, where is that 25 points coming from?

Also, does that download have multiple files?

Also, does your group have something other than 0 for the Forum Points Percentage setting?

Link to comment
Share on other sites


So, where is that 25 points coming from?



-25 points set for all categories in Download Category Point Values.


Also, does that download have multiple files?



No, it only has 1 file.


Also, does your group have something other than 0 for the Forum Points Percentage setting?



My group is set to 0 for points percentage.


The way the logic works currently is that it only gives the points to the uploader if the uploader input a specific amount for that file. If the cost of the download is based on either the default download setting or the default category-specific download setting, then it charges anyone who downloads it, regardless of any other factors.



Hmm. I haven't set any file specific costs yet so they're all set to the default based on the category which is -25. I'm still trying to think of where the -8 comes from.

Also: File-Uploaders to Receive Points is set to Yes.
Link to comment
Share on other sites

K, I setup my test board with those exact specs but it is charging me the proper amount (25).

Did you upgrade to Beta 3? Cause it sounds like that file you are downloading has 2 screenshots and you are using Beta 2 and experiencing that bug I mentioned above that Beta 3 fixes. If you did upgrade to Beta 3, did you reimport the hook?

Link to comment
Share on other sites


K, I setup my test board with those exact specs but it is charging me the proper amount (25).



Did you upgrade to Beta 3? Cause it sounds like that file you are downloading has 2 screenshots and you are using Beta 2 and experiencing that bug I mentioned above that Beta 3 fixes. If you did upgrade to Beta 3, did you reimport the hook?



Wow. Didn't notice the new beta version. I ended up downloading Beta 2 and I guess moments later you ended uploading Beta 3. Haha.

That fixed it. Sorry for the trouble.
Link to comment
Share on other sites

Only if that setting is enabled AND if the setting above is also enabled AND if the download has a specific cost associated with it.

To put it another way, the only way the points go to the uploader is if the uploader set the price and you've enabled that Points Go To Uploader setting. :) Otherwise (price is based on the default cost or the default category cost) the points are simply removed from the downloader.

Link to comment
Share on other sites

  • 3 weeks later...

Does the user see the price tag on the download?



It could be a permission thing, make sure the user group is allowed to participate in Points Per Download. Also make sure they can access ibEconomy of course.



Hello, thank you for response. Just double checked all permissions even loged in different users accounts they see price, when they pressing download on next page they see price but for some reason it doesn't clear there balance and same thing with seller it is not adding funds on his account. Anything else to check?
You can see it here: http://www.creativestation.ru/index.php?app=downloads&showfile=14
CSmoney
Thank you.
Link to comment
Share on other sites


It says I don't have access to that link.



Does it charge the proper amount of points if the item doesn't have a custom cost, and instead the item's price is set based on the category or based on the default dl price (in settings)?



Ok, I found the problem. If I entering 0 in this field - Points Per Download (How many points to download? Leave at 0 to disable. (overridden by specific download category values if other than 0)) then ppd is disabled, but if I entering 1 everything work perfect. BUT, I need free files too, if I entering 1 to this field system automatically overrides all prices that was free to 1 point. Is any way I can do free and paid files?

Thank you!
Link to comment
Share on other sites

Hmm, interesting scenario. Off the top of my head I can't think of an elegant solution, however, this would work. Set the default download cost to a very small number, such as .000001. That way it isn't zero, so that check is passed, and it is so small that it will round to 0.00.

Link to comment
Share on other sites


Hmm, interesting scenario. Off the top of my head I can't think of an elegant solution, however, this would work. Set the default download cost to a very small number, such as .000001. That way it isn't zero, so that check is passed, and it is so small that it will round to 0.00.



yep, now it works perfect for me. Thank you for good advise!
Link to comment
Share on other sites

Hello, Some issues with this system again. Here is what IPB support team found:

Conversation:
Hello, there some database errors when users trying to download some files not everything. Some files they can download with out errors.
Here the list where it showing error when you will try to download:

http://www.creatives...ads&showfile=16
http://www.creatives...ads&showfile=19
http://www.creatives...ads&showfile=13
and etc

*****************************
Hello,
The error is being caused by your ibEconomy application. Please disable that application and downloads should work again.


| hooks/ibEconomyDLsDoDownload_798bce074a6c18468f9594280a532804.php | [ibEconomyMySQL].updateMemberPts | 99 |

Date: Mon, 05 Sep 2011 16:52:05 +0000 Error: 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '0E-7 WHERE member_id = 2' at line 1 IP Address: 174.102.149.23 - /index.php?app=downloads&module=display&section=download&do=do_download&hash=899471f174655873406ff711a5f7e75d&id=212 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- mySQL query error: UPDATE pfields_content SET eco_points = eco_points+1,0E-7 WHERE member_id = 2 .--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------. | File | Function | Line No. | |----------------------------------------------------------------------------+-------------------------------------------------------------------------------+-------------------| | ips_kernel/classDb.php | [db_main_mysql].update | 1029 | '----------------------------------------------------------------------------+-------------------------------------------------------------------------------+-------------------' | hooks/ibEconomyDLsDoDownload_798bce074a6c18468f9594280a532804.php | [ibEconomyMySQL].updateMemberPts | 99 | '----------------------------------------------------------------------------+-------------------------------------------------------------------------------+-------------------' | admin/applications_addon/ips/downloads/modules_public/display/download.php | [ibEconomyDLsDoDownload]._doDownload | 115 | '----------------------------------------------------------------------------+-------------------------------------------------------------------------------+-------------------' | admin/sources/base/ipsController.php | [public_downloads_display_download].doExecute | 302 | '----------------------------------------------------------------------------+-------------------------------------------------------------------------------+-------------------' ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Date: Mon, 05 Sep 2011 16:52:20 +0000 Error: 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '0E-7 WHERE member_id = 2' at line 1 IP Address: 174.102.149.23 - /index.php?app=downloads&module=display&section=download&do=do_download&hash=1c85b6a74e773f323622a9c0f91a6c07&id=204 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- mySQL query error: UPDATE pfields_content SET eco_points = eco_points+1,0E-7 WHERE member_id = 2 .--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------. | File | Function | Line No. | |----------------------------------------------------------------------------+-------------------------------------------------------------------------------+-------------------| | ips_kernel/classDb.php | [db_main_mysql].update | 1029 | '----------------------------------------------------------------------------+-------------------------------------------------------------------------------+-------------------' | hooks/ibEconomyDLsDoDownload_798bce074a6c18468f9594280a532804.php | [ibEconomyMySQL].updateMemberPts | 99 | '----------------------------------------------------------------------------+-------------------------------------------------------------------------------+-------------------' | admin/applications_addon/ips/downloads/modules_public/display/download.php | [ibEconomyDLsDoDownload]._doDownload | 115 | '----------------------------------------------------------------------------+-------------------------------------------------------------------------------+-------------------' | admin/sources/base/ipsController.php | [public_downloads_display_download].doExecute | 302 | '----------------------------------------------------------------------------+-------------------------------------------------------------------------------+-------------------' ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Date: Mon, 05 Sep 2011 16:54:30 +0000 Error: 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '0E-7 WHERE member_id = 2' at line 1 IP Address: 174.102.149.23 - /index.php?app=downloads&module=display&section=download&do=do_download&hash=590766cd2deeeb24f9d8f849ac6b72f7&id=218 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- mySQL query error: UPDATE pfields_content SET eco_points = eco_points+1,0E-7 WHERE member_id = 2 .--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------. | File | Function | Line No. | |----------------------------------------------------------------------------+-------------------------------------------------------------------------------+-------------------| | ips_kernel/classDb.php | [db_main_mysql].update | 1029 | '----------------------------------------------------------------------------+-------------------------------------------------------------------------------+-------------------' | hooks/ibEconomyDLsDoDownload_798bce074a6c18468f9594280a532804.php | [ibEconomyMySQL].updateMemberPts | 99 | '----------------------------------------------------------------------------+-------------------------------------------------------------------------------+-------------------' | admin/applications_addon/ips/downloads/modules_public/display/download.php | [ibEconomyDLsDoDownload]._doDownload | 115 | '----------------------------------------------------------------------------+-------------------------------------------------------------------------------+-------------------' | admin/sources/base/ipsController.php | [public_downloads_display_download].doExecute | 302 | '----------------------------------------------------------------------------+-------------------------------------------------------------------------------+-------------------'






-Collin S.

Invision Power Services, Inc.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...