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

Vbulletin 4.X Integration with Sourcebans! FINALLY HERE!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
bouncer
Veteran Member
Join Date: Apr 2009
Old 09-27-2010 , 19:07   Vbulletin 4.X Integration with Sourcebans! FINALLY HERE!
Reply With Quote #1

Ever wanted to get your Vbulletin 4.X hooked up with Sourcebans 1.4.7 (Only 1.4.7 currently supported)?

Well this php script does the following!
  1. Copies vbulletin members from specific usergroups to specific sourcebans WEB AND SERVER ADMIN GROUPS
  2. Sends PM to the vbulletin user once an account has been created for him on sourcebans
  3. Includes a random generated password and his login username (which they can then change)
  4. Copies the following: Email, Username, Steam ID
  5. Sends PM to vbulletin user when he has been promoted or demoted through vbulletin usergroups

This script auto-detects when someone is promoted or demoted on your vbulletin site. This is a very handy script for those of large communities who want to use sourcebans and vbulletin together.

You define the usergroup ids on vbulletin and their rank names as well as the sourcebans matching web and server admin group ids. The script then copies users to their respective usergroups.

NOTE!:
"CServerRcon.php"; //This file can be found in Sourcebans_web/includes/ and must be COPIED and pasted in the same location as this php script lies.

Put the php script in your-vbulletin-directory/includes/cron and put that file in the same directory.

Add the cron job to your task manager through VBULLETIN. This php script is made to be run through vbulletin only.

It is recommended you run the cron job every half hour to an hour. Or however you would like depending on the number of users your vbulletin forum holds.

This has only been tested on 4.0.7 and with sourcebans 1.4.7. Therefore it should work on all vb 4.X versions. Older versions haven't been tested.

Known bugs:
NONE

Credits: [GM] Geit User's Website For coding the php script
[B-O-G][M]Mr. Bouncer Website For requesting the script

Please let me know if you have any issues with this php script. I have long waited to create this and finally got it. Even though I paid Geit to code it, I feel it is necessary to share it as many communities have always begged for this. Well now it's possible

PM IMAGES ON VBULLETIN:









Be sure to remove the .txt at the end of the filename!

All the information on what needs to be edited is commented in the filename, simply look through it and input your SOURCEBANS mysql user and pass at the top and edit all necessary usergroup informations.
Also make sure you edit the field ID for your profile field for steam id. You have to create a Profile Field on your site for the steam id. It is recommended that you require this profile field filled out upon registration. Otherwise people will be able to edit their steam ids and give admin to those who aren't supposed to have it. In this case in the php file, the field id is : field5
Attached Files
File Type: txt vbulletintosourcebans.php.txt (13.3 KB, 1089 views)
__________________



Last edited by bouncer; 09-27-2010 at 19:31.
bouncer is offline
bouncer
Veteran Member
Join Date: Apr 2009
Old 09-27-2010 , 19:16   Re: Vbulletin 4.X Integration with Sourcebans! FINALLY HERE!
Reply With Quote #2

Re-uploaded file, had to fix a comment that was made in there. Please re-download.
__________________


bouncer is offline
NoS
Senior Member
Join Date: Nov 2006
Old 09-27-2010 , 22:34   Re: Vbulletin 4.X Integration with Sourcebans! FINALLY HERE!
Reply With Quote #3

Sounds awesome. I havn't tested it, but thats great!
NoS is offline
KyleS
SourceMod Plugin Approver
Join Date: Jul 2009
Location: Segmentation Fault.
Old 09-28-2010 , 02:02   Re: Vbulletin 4.X Integration with Sourcebans! FINALLY HERE!
Reply With Quote #4

Quote:
Originally Posted by NoS View Post
Sounds awesome. I havn't tested it, but thats great!
KyleS is offline
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 09-28-2010 , 12:16   Re: Vbulletin 4.X Integration with Sourcebans! FINALLY HERE!
Reply With Quote #5

Thanks for sharing this. Great job!

If you really want this script to be used by other communities, you should extract all the custom variables to the top of the script into the config area. Like an own var $vbSteamID = 'field5'; for everyone to easily edit instead of having to run through the whole script.

I still have to notice, that this script is only a one-way solution. So no change done via the sourcebans webpanel is permanent, but only lasts until the script is ran again. So it's not a complete bridge, but at least it's quite helpful.

I strongly recommend to use/modify the SendRconSilent() function in /includes/system-functions.php to handle any errors occuring with rcon.
At least add
Code:
$rcon->Auth();
to the rehashing part to get it working;)

Original
__________________
Peace-Maker is offline
bouncer
Veteran Member
Join Date: Apr 2009
Old 09-28-2010 , 15:55   Re: Vbulletin 4.X Integration with Sourcebans! FINALLY HERE!
Reply With Quote #6

well i think if you add extra flags, they will probably stay. dont know though.
__________________


bouncer is offline
Geit
Senior Member
Join Date: Oct 2009
Location: Home
Old 09-28-2010 , 16:14   Re: Vbulletin 4.X Integration with Sourcebans! FINALLY HERE!
Reply With Quote #7

Update to the script attached, Managed to get the vBulletin private message data manager working properly after doing some debugging on my local install, so sending PM's now generates email notifications and the script doesn't require MYSQL information for both databases.
Added some escaping to variable input, just in case.
Did as suggested above and moved the variables that can vary per install into their own variables at the top of the script.
Changed the Server Rehash so it now uses the Auth function from CServerRcon.

Quote:
Originally Posted by Peace-Maker View Post
I still have to notice, that this script is only a one-way solution. So no change done via the sourcebans webpanel is permanent, but only lasts until the script is ran again. So it's not a complete bridge, but at least it's quite helpful.
I had a think about this, and I couldn't think of doing it any other way really. - As Bouncer has said, If you were to set custom permissions for a user, they would always be preserved, the only thing that the script is supposed to change when a user is promoted is their Web Group, Server Group and Server Access Group.
Attached Files
File Type: txt vbtosourcebans.php.txt (14.0 KB, 761 views)

Last edited by Geit; 09-28-2010 at 19:28. Reason: Another version
Geit is offline
bouncer
Veteran Member
Join Date: Apr 2009
Old 10-18-2010 , 20:04   Re: Vbulletin 4.X Integration with Sourcebans! FINALLY HERE!
Reply With Quote #8

Hey anyone got any idea what this error means when I run the task manager job from vbulletin??

Quote:
Vbulletin to Sourcebans

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 ''Respectin''' at line 1
__________________


bouncer is offline
psychonic

BAFFLED
Join Date: May 2008
Old 10-18-2010 , 20:09   Re: Vbulletin 4.X Integration with Sourcebans! FINALLY HERE!
Reply With Quote #9

Quote:
Originally Posted by bouncer View Post
Hey anyone got any idea what this error means when I run the task manager job from vbulletin??
It means you have an error in your SQL syntax near ''Respectin'' at line 1.
psychonic is offline
bouncer
Veteran Member
Join Date: Apr 2009
Old 10-18-2010 , 20:12   Re: Vbulletin 4.X Integration with Sourcebans! FINALLY HERE!
Reply With Quote #10

Well I didn't edit any files or anything that has to do with this at all. And how would I find out which file to edit?
__________________


bouncer 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 11:33.


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