Raised This Month: $51 Target: $400
 12% 

Release Donation Control 3.1.0 [over 1000 donations served!]


Post New Thread Reply   
 
Thread Tools Display Modes
nineteeneleven
Veteran Member
Join Date: Nov 2010
Old 11-02-2013 , 01:50   Re: Donor Control
Reply With Quote #81

Quote:
Originally Posted by nineteeneleven View Post
I'm doing the rewrite on this now.

Fixing the resolution of Steam ids.

Adding an option for 2 tiers of donors.

Stripping Nfo support

Fixing time stamps

Adding proper admin login system

Changing over to mysqli

PayPal sandbox support

Add support if sourcebans database and donor database are on different servers


If you guys want anything else now is the time to ask
Quote:
Originally Posted by StayOx View Post


and SteamID on format: steamcommunity.com/id/<username> or <number> is not recognized and the error invalid SteamID is shown.

maybe you skipped over that?
__________________

Last edited by nineteeneleven; 11-02-2013 at 01:51.
nineteeneleven is offline
StayOx
SourceMod Donor
Join Date: Jun 2012
Location: Gliese 581g
Old 11-02-2013 , 07:37   Re: Donor Control
Reply With Quote #82

the only thing I did not understand was:

PHP Code:
//GET THIS INFORMATION FROM YOUR sb_admins_servers_groups TABLE
//match the admin_id column with a donor from your aid column in your
//sb_admins table, use that information. This information handles
//which server donors will have privledges.
$group_id "0";
$srv_group_id "0";
$server_id "0"
it is essential for Donor Control work?
StayOx is offline
nineteeneleven
Veteran Member
Join Date: Nov 2010
Old 11-02-2013 , 10:29   Re: Donor Control
Reply With Quote #83

Yes if you don't enter that information it will not add the donor to sourcebans
__________________
nineteeneleven is offline
StayOx
SourceMod Donor
Join Date: Jun 2012
Location: Gliese 581g
Old 11-02-2013 , 11:37   Re: Donor Control
Reply With Quote #84

Quote:
Originally Posted by nineteeneleven View Post
Yes if you don't enter that information it will not add the donor to sourcebans

I'm very confused on this part of the setup, do not know what the $ group_id, srv_group_id, server_id I should add to config.php

my sb_admins_servers_groups TABLE




EDIT:

this informations

PHP Code:
$group_id "0";
$srv_group_id "0";
$server_id "0"
are in which group?
group: "All Servers" (here table sb_groups) or "Donor" (here table sb_srvgroups)


note: I'm using Soucebans 1.4.10
Attached Thumbnails
Click image for larger version

Name:	bansdb.png
Views:	435
Size:	50.5 KB
ID:	127407  

Last edited by StayOx; 11-02-2013 at 11:49.
StayOx is offline
nineteeneleven
Veteran Member
Join Date: Nov 2010
Old 11-02-2013 , 13:20   Re: Donor Control
Reply With Quote #85

You need to find the 'aid' of a donor in your sb_admins table and match it to the admin_id in the groups table.
__________________
nineteeneleven is offline
StayOx
SourceMod Donor
Join Date: Jun 2012
Location: Gliese 581g
Old 11-02-2013 , 15:23   Re: Donor Control
Reply With Quote #86

Quote:
Originally Posted by nineteeneleven View Post
You need to find the 'aid' of a donor in your sb_admins table and match it to the admin_id in the groups table.

I do not own any donor yet, because I'm setting up to start using the "Donor Control"

to give privileges to users to my VIP I created a "Server Admin Group" named "Donor" and added flags "ao"

And my servers are divided into 4 "Servers Group"

All Servers
Counter-Strike
Left 4 Dead 2
Team Fortress 2

I imagine the Donor Control works as follows:

the user visits the webpage to make a donation then pay using paypal and the script automatically sends a query to the database of SourceBans adding SteamID and User Name to group "Donor"

this is correct?


I really can not understand the part below the setting

PHP Code:
//GET THIS INFORMATION FROM YOUR sb_admins_servers_groups TABLE
//match the admin_id column with a donor from your aid column in your
//sb_admins table, use that information. This information handles
//which server donors will have privledges.
$group_id "0";
$srv_group_id "0";
$server_id "0"
which table I find the information for?

PHP Code:
$group_id "0";         - table name and column where I find this information?
$srv_group_id "0";   - table name and column where I find this information?
$server_id "0";        - table name and column where I find this information
and may be of any admin? because we still do not own donors.
StayOx is offline
Dr_Knuckles
AlliedModders Donor
Join Date: Mar 2005
Location: SW Florida
Old 11-02-2013 , 16:01   Re: Donor Control
Reply With Quote #87

Make someone a donor temporarily and look them up in the list there and use their info.
__________________
Dr_Knuckles is offline
StayOx
SourceMod Donor
Join Date: Jun 2012
Location: Gliese 581g
Old 11-02-2013 , 17:42   Re: Donor Control
Reply With Quote #88

Quote:
Originally Posted by Dr_Knuckles View Post
Make someone a donor temporarily and look them up in the list there and use their info.
ok thanks for tip, I add a donor via "Manual Entry" and the result is:




AND




and now where in I add this info here?

PHP Code:
$group_id "0";
$srv_group_id "0";
$server_id "0"
Attached Thumbnails
Click image for larger version

Name:	sb_admins_servers_groups.png
Views:	391
Size:	33.4 KB
ID:	127424   Click image for larger version

Name:	sb_admins.png
Views:	403
Size:	33.5 KB
ID:	127425  
StayOx is offline
nineteeneleven
Veteran Member
Join Date: Nov 2010
Old 11-02-2013 , 18:32   Re: Donor Control
Reply With Quote #89

put this script in the root directory of you donations folder, and run it. enter your test donors steam id in the box. it will return the values you need.

PHP Code:

<?php
define
('NineteenEleven'TRUE);
require_once 
'includes/config.php';

if (isset(
$_POST['steamid_user'])) {
  
$steamid $_POST['steamid_user'];
  
$mysqli = new mysqli(DB_HOST,DB_USER,DB_PASS,$SB_DB_NAME);
 

  
$result $mysqli->query("SELECT aid FROM sb_admins WHERE `authid` ='".$steamid."';")or die($mysqli->error);

if(
$result){
  
$row $result->fetch_array(MYSQLI_ASSOC);
  
$aid $row['aid'];
}

unset(
$result);
 
$result $mysqli->query("SELECT * FROM sb_admins_servers_groups WHERE `admin_id` ='".$aid."';")or die($mysqli->error);

if (
$result->num_rows >= 1) {
    
$row $result->fetch_array(MYSQLI_ASSOC);
      
$group_id2 $row['group_id'];
      
$srv_group_id2 $row['srv_group_id'];
      
$server_id2 $row['server_id'];
  }

  echo 
"group_id: {$group_id2} <br />";
  echo 
"srv_group_id: {$srv_group_id2} <br />";
  echo 
"server_id: {$server_id2} <br />";
}else{

  print(
"<!DOCTYPE html>");
  print(
"<html>");
  print(
"<body>");
  print(
"<center>");
  print(
"<input type=\"submit\" form=\"donate_form\" />");
  print(
"<form action=\"setup.php\" method=\"POST\" id=\"donate_form\">");
  print(
"<label for=\"paypaloption1\">Steam ID:<br /></label><input type=\"text\" id=\"paypaloption1\" name=\"steamid_user\" required=\"true\" id=\"id-box\" placeholder=\"SteamID of donor\" required=\"true\" size=\"30\"></p>");
  print(
"<div id='infobox'>");
  print(
"</div>");
  print(
"</form>");
  print(
"</center>");
  print(
"</body>");
  print(
"</html>");
}
?>
__________________
nineteeneleven is offline
StayOx
SourceMod Donor
Join Date: Jun 2012
Location: Gliese 581g
Old 11-02-2013 , 19:11   Re: Donor Control
Reply With Quote #90

lol the gods do not want me to use your Donor Control

Sorry we were unable to get your Steam ID.
Either you entered an invalid Steam ID, or the Steam community is down.
Please check and make sure you entered a valid Steam ID and try again.
Click here to go back

and tables

HTML Code:
cache
donors
player_tracker
should be in a database named "donations" correct?

EDIT:

Ok steam online again:

I m use the script and the result is this after adding this a User via "Manual Entry"

group_id: 0
srv_group_id: 0
server_id: 0

I go check the page "Donor List" and sourcebans Group and the user was added correctly.


Now I m try check the information of my steamid and the result is:

group_id: 1
srv_group_id: 7
server_id: -1

Last edited by StayOx; 11-02-2013 at 20:08.
StayOx is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:36.


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