AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   SourceBans / SourceBans++ (https://forums.alliedmods.net/forumdisplay.php?f=152)
-   -   Release Donation Control 3.1.0 [over 1000 donations served!] (https://forums.alliedmods.net/showthread.php?t=221742)

nineteeneleven 07-25-2013 20:29

Donation Control 3.1.0 [over 1000 donations served!]
 
3.1.0 is out!



This is aimed at people who use Sourcebans to assign custom flags for donor perks.


Features
  • Automatically add/remove donors from Sourcebans.
  • Automatically fetch donors Steam IDs (with Player Analytics plugin).
  • Will accept any form of Steam ID. (community url, community name, STEAM_x:x:xxxxxx)
  • People can also donate for other players.
  • Automatically calculate expiration dates
  • Full Admin control panel where you can edit users, enter users manually, search for users, ect.
  • Email you when users have donated.
  • Email thank you notice to donors.
  • Automatically refreshes admin cache on all servers you have connected to sourcebans!
  • Small widget to put on your front page
  • Top 10 and previous months donors widget
  • Multi language support
  • Custom Chat Colors support. allows donors to choose their chat color and name color during checkout.
  • Allow donors to log into the panel, and change their colors at will. (optional)
  • Unlimited donor groups.
  • Bootstrap for the admin section and donate.php
  • per-group minimum donation requirement.
  • Configurable date format
  • Optional Expiration email reminder to donors
  • Terms and conditions area on main donate page


Demo Site
http://nineteeneleven.info/dev_dc/admin/

user/pass demo/demo

Requirements
PHP 5.4 with PDO. (use 2.1.5 if you dont have the MySQL PDO driver)
Apache
MySQL
Crontab

Install instructions
:
http://nineteeneleven.info/dc_manual.html

Bitbucket
https://bitbucket.org/brewskii187/donations-control

Heres some screenshots of the set up.

http://nineteeneleven.info/screenshots/donation-control/



PLEASE READ THE MANUAL THOROUGHLY BEFORE ASKING FOR SUPPORT.

Support

This thread

IRC - kablowsion.com:6667 (6697 ssl) #19projects

Download

FlyingMongoose 07-26-2013 02:01

Re: Donor Control
 
Nice work, I hope you get a chance to turn it into an SB2 plugin ;).

nineteeneleven 07-26-2013 19:13

Re: Donor Control
 
Sb2 should be easy, but I'm gonna wait for the public release.

Trosty 07-26-2013 19:33

Re: Donor Control
 
Awesome man:) thanks. I will take it tomorrow and i want to make a design for that page an i will publish here...

iHacked 07-26-2013 20:43

Re: Donor Control
 
Would be awesome when you add PayPal support.

nineteeneleven 07-26-2013 20:49

Re: Donor Control
 
I started on PayPal today.

Also I fixed a bug that caused repeat donors to get an error.

Trosty 07-27-2013 07:28

Re: Donor Control
 
you will release paypal support this weekend?

nineteeneleven 07-27-2013 10:52

Re: Donor Control
 
Quote:

Originally Posted by Trosty (Post 1999764)
you will release paypal support this weekend?


More than most likely, im 90% though it.

but I must say... PayPal sandbox, sucks.

Paypal will be fully automated and require no input from an admin.

nineteeneleven 07-27-2013 19:24

Re: Donor Control
 
PayPal support added in V1.3!

If you find any bugs let me know, because I will be using NFO donations.

I did test it in sandbox pretty thoroughly.

When using PayPal. It is 100% automated.

ReZy 07-28-2013 02:42

Re: Donor Control
 
Err.. How do you add this? No expertise in HTML, CSS, FTP, or anything related to websites (actually just a little..) So do you mind assisting me in this?

Steam: hijacker252
Skype: vengancezero

If you can.

samsah 07-28-2013 09:26

Re: Donor Control
 
Tested paypal, works ok.
Only thing I could not manage to work is how to give donator access to all servers. Now it's giving access only one server :/
And how to change donation currency USD -> EUR?

iHacked 07-28-2013 10:02

Re: Donor Control
 
Will test the Donor Control tomorrow :D

nineteeneleven 07-28-2013 10:30

Re: Donor Control
 
v1.3.1
-added different currency support
-fixed dates being wrong when amount is not divisible by 5.
-made sourcebans optional

nineteeneleven 07-28-2013 10:33

Re: Re: Donor Control
 
Quote:

Originally Posted by samsah (Post 2000563)
Tested paypal, works ok.
Only thing I could not manage to work is how to give donator access to all servers. Now it's giving access only one server :/
And how to change donation currency USD -> EUR?

Add me on steam

samsah 07-29-2013 03:46

Re: Donor Control
 
Quote:

You must be using a Sourcebans server group to assign server access for your VIPs.

In sourcebans, go to admin panel > groups >add group> for group name use 'All servers' group type 'server group'
then go to admin panel >servers and edit each server and add them to the 'all servers' group
then make a new donor and use the 'all servers' group. Take the information in the database for the user you just created
This gives access to all servers but not any flags which are required to get perks.
There is still manual work to add flags or put donor in Server Admin Group that has flags.

nineteeneleven 07-29-2013 06:25

Re: Donor Control
 
Quote:

Originally Posted by samsah (Post 2001180)
This gives access to all servers but not any flags which are required to get perks.
There is still manual work to add flags or put donor in Server Admin Group that has flags.


correct, ill add that to the op

nineteeneleven 07-29-2013 14:22

Re: Donor Control
 
1.3.3 update released,

This solves issues if PayPal sends the IPN twice.

You must run this SQL query on your donations database if updating from a previous version.
Code:

ALTER TABLE donors
  ADD txn_id varchar(128);


FlyingMongoose 07-29-2013 22:36

Re: Donor Control
 
Quote:

Originally Posted by nineteeneleven (Post 1999506)
Sb2 should be easy, but I'm gonna wait for the public release.

Doesn't hurt to learn the API at least, but that's your prerogative I'm just glad people are willing to support SB2 now that it looks like it's going to have a release :).

nineteeneleven 07-30-2013 09:27

Re: Re: Donor Control
 
Quote:

Originally Posted by FlyingMongoose (Post 2001823)
Doesn't hurt to learn the API at least, but that's your prerogative I'm just glad people are willing to support SB2 now that it looks like it's going to have a release :).

Ah I didn't realize that the sb2 web panel had an api. I'll have to find the documentation for it.

Thanks

FlyingMongoose 07-30-2013 13:34

Re: Donor Control
 
Quote:

Originally Posted by nineteeneleven (Post 2002105)
Ah I didn't realize that the sb2 web panel had an api. I'll have to find the documentation for it.

Thanks

SB2 is built on the Yii framework, and the plugin system isn't too hard to use.

https://github.com/GameConnect/SourceBans <-- the github for SB2

https://github.com/GameConnect/SourceBans/tree/Feed <-- The feed plugin I have no time to finish (to see some basic usage)

https://github.com/GameConnect/Sourc...ee/master/docs <-- The docs

Pull requests are usually accepted :)

I'm hoping the plugin API and Yii Framework API will make supporting your plugin to the web panel that much easier. That was the goal in the web plugin interface.

DJ Tsunami 07-30-2013 14:24

Re: Donor Control
 
The documentation is live on http://docs.sourcebans.net and http://docs.sourcebans.net/api if you want to start learning, but of course they are unfinished. There is now also the partially working Steam Community Bans plugin which you can use as an example.

nineteeneleven 07-30-2013 15:12

Re: Donor Control
 
the documentation looks pretty strait forward.

I dont know much about Yii framework, anything special I would need to know about it?

DJ Tsunami 07-30-2013 16:16

Re: Donor Control
 
I listed its main features on the development overview page. Basically it's object-oriented, uses the MVC pattern, ActiveRecord as ORM, I18N, theming and much more. They also have a guide with examples for a bunch of its features, and all of its classes are extensively documented in our API reference.

deFenSor 08-11-2013 09:26

Re: Donor Control
 
Can you please add option for sourcebans prefix?

nineteeneleven 08-12-2013 11:11

Re: Donor Control
 
Quote:

Originally Posted by deFenSor (Post 2010736)
Can you please add option for sourcebans prefix?


I take it your not using sb_

ozgaming 08-15-2013 08:33

Re: Donor Control
 
do you have a paypal account we can donate too? This is brilliant thanks

captaindeterprimary 08-15-2013 11:59

Re: Donor Control
 
Quote:

Originally Posted by ozgaming (Post 2013677)
do you have a paypal account we can donate too? This is brilliant thanks

http://nineteeneleven.info/ Its at the bottom of his page.

nineteeneleven 08-15-2013 21:37

Re: Donor Control
 
Quote:

Originally Posted by ozgaming (Post 2013677)
do you have a paypal account we can donate too? This is brilliant thanks

Quote:

Originally Posted by vman315 (Post 2013859)
http://nineteeneleven.info/ Its at the bottom of his page.


yep, its right there :fox:


anyway i released a quick update, only file thats changed really is show_donations.php and donate.php

1.3.4 will automatically hide expired donors in the admin panel, with an option to show them. and I also change the regular expression to show only printable characters, instead of striping all non a-z 0-9 chars.
also sorts users by expiration date now
next update will have a login system so you no longer need htaccess, and ill do the prefix support.

ozgaming 08-17-2013 03:28

Re: Donor Control
 
Quote:

Parse error: syntax error, unexpected T_CASE in /home/*/public_html/*/admin/scripts/manual_entry_submit.php on line 100
getting that error when I try and do a manual entry.

Pickles47 08-17-2013 06:08

Re: Donor Control
 
Quote:

Originally Posted by ozgaming (Post 2015181)
Parse error: syntax error, unexpected T_CASE in /home/*/public_html/*/admin/scripts/manual_entry_submit.php on line 100

I believe there are two errors. I fixed them by changing two lines.

PHP Code:

89.                                if(!$debug){queryServers('sm_reloadadmins');}
90.                        }
91.        

Delete line 91.

Also needs a closing bracket on line 142.
PHP Code:

header("Location: ../show_donations.php");}
?> 

If this is incorrect please tell and I will delete/modify post. Also I had a problem with donors not being assigned to servers and the database entries in sb_admins_servers_groups being incorrect. Should have been 1 1 -1 and not 4 8 -1 which is what I am seeing in phpmyadmin.

What all would need to changed to have this working in sourcebans 2?

ozgaming 08-17-2013 06:52

Re: Donor Control
 
I believe it worked, but it doesn't assign a server group to them.

Pickles47 08-17-2013 07:25

Re: Donor Control
 
Quote:

Originally Posted by ozgaming (Post 2015299)
I believe it worked, but it doesn't assign a server group to them.

Again, not sure but I just saw this line and changed it. Is now correctly adding them to server group.

PHP Code:

86. $sb_sql2 "INSERT INTO `{$SB_DB_NAME}` . `sb_admins_servers_groups` (admin_id,group_id,srv_group_id,server_id) VALUES('{$admin_id}', '4', '8', '-1');"

change to:

PHP Code:

86. $sb_sql2 "INSERT INTO `{$SB_DB_NAME}` . `sb_admins_servers_groups` (admin_id,group_id,srv_group_id,server_id) VALUES('{$admin_id}', '{$group_id}', '{$srv_group_id}', '{$server_id}');"

The whole script below.
Spoiler

ozgaming 08-17-2013 07:32

Re: Donor Control
 
made the changes, haven't tested but will assume it works. Thanks again for your help

ozgaming 08-17-2013 09:03

Re: Donor Control
 
Quote:

Originally Posted by nineteeneleven (Post 2014261)
also sorts users by expiration date now
next update will have a login system so you no longer need htaccess, and ill do the prefix support.

Nice update, just need to point out nineteeneleven that when it gets to 2014 it puts it up the top with expiration date, not at the bottom. Thanks again

nineteeneleven 08-17-2013 12:31

Re: Donor Control
 
the line 91 edit was correct, but the closing bracked on line 143 is incorrect. thats not needed.

A closing bracked on line 64 is needed
PHP Code:

60    if(SOURCEBANS){
61           mysql_select_db($SB_DB_NAME
62                or die("<p>Unable to select the database"$SB_DB_NAME ": "mysql_error() . "</p>");
63            $sb_pw "1fcc1a43dfb4a474abb925f54e65f426e932b59e";
64        

The line 86 edit was also correct, thanks.

heres the script

Spoiler

nineteeneleven 08-17-2013 12:40

Re: Donor Control
 
as far as the ordering goes, I used SQL to do the ordering. it gonna be a pain in the balls to change because I will need to change the way that the dates are stored in the database to fix it.

DJ Tsunami 08-18-2013 06:17

Re: Donor Control
 
Well you should convert them to DATE/DATETIME fields or UNIX timestamps anyway if you want to properly deal with dates. STR_TO_DATE() will convert your existing dates easily.

nineteeneleven 08-18-2013 19:18

Re: Donor Control
 
Thanks, yeah I was foolish to store them the way I did.

Snaggle 08-18-2013 19:35

Re: Donor Control
 
After I enter the SteamID and it asks to verify the player, when they click Donate it takes them to a page that just says
PHP Code:

Resource id #5 

and that's it. It won't proceed any further but it's still adding that player to the database.

nineteeneleven 08-18-2013 20:32

Re: Re: Donor Control
 
Quote:

Originally Posted by Snaggle (Post 2016680)
After I enter the SteamID and it asks to verify the player, when they click Donate it takes them to a page that just says
PHP Code:

Resource id #5 

and that's it. It won't proceed any further but it's still adding that player to the database.

Can you send me a link?

Are you using the player tracker plugin?

If not make sure u set it to false in the Web panel


All times are GMT -4. The time now is 08:41.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.