MyBB Central

Full Version: MYPS Attachment Cost
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
[attachment=419]License is GNU/GPL attached inside extras folder.

Plugin Name: MYPS Attachment Cost
Plugin Author: Jesse Labrocca
Plugin Website: http://www.MybbCentral.com
Plugin Version: 1.0
Plugin Mybb Compatibility: 1.2
Plugin File Edits: None
Plugin File Uploads: 1
Plugin Description: This plugin gives the ability to charge myps for downloads.

Features:
1. Ability to enable/disable
2. Attachment owner doesn't get charged
3. Setting so that the cost can go to the attachment owner
4. Max cost for an attachment
5. Exemptions in settings for usergroup, forumid, and attachment type

Installation

1. Upload the file from the zip

root/inc/plugins/myps_attachcost.php

2. Login to your admincp and ACTIVATE the plugin (MYPS Attachment Cost) in the plugin manager.

3. You will see the new menu item called "MYPS Attachment" in your settings. Alter them to suit your needs.

The rest is self explantory.

It does NOT have language support. It is hard coded english. However it should be self explanatory for any language.

Demo: http://www.hackforums.net
OK, let me see if I'm understanding this. The person uploading an attachment can set a cost that he/she will get if anyone downloads it? So any member of the forum can upload and put a cost and that member will get the myps points? If so, that's really cool! Big Grin

Are admins and supermods exempt from "paying"?
Yes Jude...you got it right. You can also set a MAX cost so that people can't charge 5000. And you can set lots of exemptions such as groups, forum ids, or attachment types. If you don't want regular members to be able to charge for downloads you can also exempt that too.

Smile

It's a simple and yet effective plugin imho.
thanks labrocca this is good mod
Wow! Can't wait to try it out. I like that it only affects the thread in question and not every thread in a particular forum. Great job! Big Grin
Yeah I always try to minimize the impact my plugins make. I think I am at an advantage that when I create a plugin I actually NEED it for use. Some authors make plugins just to make them but aren't considering practical application. I may not be the best coder but I get one hell of a job done and I also thoroughly test my plugins pretty hardcore. I spent about 12 hours on this one and there isn't even a lot of code. It was just getting small parts just right and the functionality how I wanted it without intruding too much on mybb. Some authors are going to have one hell of a time when 1.4 comes out and many of their plugins break because they made overly complex ones.

Anyways...big rant... Smile
Awesome. Smile So far works great for me.

I've been wanting something like this for a long time!

labrocca Wrote:Yeah I always try to minimize the impact my plugins make. I think I am at an advantage that when I create a plugin I actually NEED it for use. Some authors make plugins just to make them but aren't considering practical application. I may not be the best coder but I get one [censored] of a job done and I also thoroughly test my plugins pretty hardcore. I spent about 12 hours on this one and there isn't even a lot of code. It was just getting small parts just right and the functionality how I wanted it without intruding too much on mybb. Some authors are going to have one [censored] of a time when 1.4 comes out and many of their plugins break because they made overly complex ones.

Anyways...big rant... Smile
Anyone rarely gets any errors with your plugins, since you test them so well. Big Grin
LOL...yeah, I've been wanting this for so long, that I'm having trouble thinking how to implement it! ;-) I am having so much fun with all the new things that can be done with MYPS now!

Many thanks to Labrocca (and Lex) for all their hard work.

I have tested this on my site. It works fine, but I do have a concern. Though it doesn't deduct points for downloading an image, it still allows an amount to be applied to an image when it's uploaded, and it shows that it will cost that amount to download the image (even though it is not deducted). Is there a way for it to cancel out that "cost" so my members won't think they have to pay for an image? Great otherwise! Big Grin

Oops, I just found something else. The max applies to Admin as well? Shouldn't we be exempt from the max allowed for regular members?
Yeah...I have to really consider a better way to implement that whole area. It was a burden to get it to look that nice. Smile

Hmm...I thought if an extension was exempt it made the cost 0. Hmm...maybe not. I will add that.
Yes, it does look nice! Great job! I'll just look forward to admin not having to abide by the max allowed for others. Wink

edit: Well, I went into your plugin and fixed that myself. I also looked to see why the image cost still shows. The only place I found that will change the wrong amount is when the user enters an amount higher than the max. I did find the code where it won't charge for an image but not where it would change it to zero if there was an amount entered.

It was fun figuring out how to change the permissions though. Tongue
Pages: 1 2
Reference URL's