Vbulletin 4.X Integration with Sourcebans! FINALLY HERE!
1 Attachment(s)
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!
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 :D 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: http://i229.photobucket.com/albums/e...4Sep271846.gif http://i229.photobucket.com/albums/e...3Sep271845.gif http://i229.photobucket.com/albums/e...2Sep271845.gif http://i229.photobucket.com/albums/e...1Sep271844.gif 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 |
Re: Vbulletin 4.X Integration with Sourcebans! FINALLY HERE!
Re-uploaded file, had to fix a comment that was made in there. Please re-download.
|
Re: Vbulletin 4.X Integration with Sourcebans! FINALLY HERE!
Sounds awesome. I havn't tested it, but thats great!
|
Re: Vbulletin 4.X Integration with Sourcebans! FINALLY HERE!
Quote:
|
Re: Vbulletin 4.X Integration with Sourcebans! FINALLY HERE!
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(); Original |
Re: Vbulletin 4.X Integration with Sourcebans! FINALLY HERE!
well i think if you add extra flags, they will probably stay. dont know though.
|
Re: Vbulletin 4.X Integration with Sourcebans! FINALLY HERE!
1 Attachment(s)
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:
|
Re: Vbulletin 4.X Integration with Sourcebans! FINALLY HERE!
Hey anyone got any idea what this error means when I run the task manager job from vbulletin??
Quote:
|
Re: Vbulletin 4.X Integration with Sourcebans! FINALLY HERE!
Quote:
|
Re: Vbulletin 4.X Integration with Sourcebans! FINALLY HERE!
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?
|
Re: Vbulletin 4.X Integration with Sourcebans! FINALLY HERE!
Hi there!
Hopefully someone could help me as I would really like to use this integration for our community, but can't seem to get this working. I have copied over the file "CServerRcon.php" from my sourcebans install dir/includes/ " to my vbulliten install dir/includes/cron directory I have uploaded the "vbtosourcebans.php.text renaming it to "vbtosourcebans.php" to my vbulliten install dir/includes/cron directory I have edited the "vbtosourcebans.php" file to include my database remote IP, Username, Password, admin ID, and my custom field ID that I created for STEAM ID: I created a cron through vb to run "vbtosourcebans.php" as required. But I don't get how this works? or is not working? I have the same versions of vb and SB as everyone else who says it is working fine. What am I missing? would appreciate the help., Thanks!:shock: |
Re: Vbulletin 4.X Integration with Sourcebans! FINALLY HERE!
Anyone able to do this for Invision Board?!? Thanks in advance.
|
Re: Vbulletin 4.X Integration with Sourcebans! FINALLY HERE!
I will post a tutorial soon with more customizations at www.FragToss.com
|
Re: Vbulletin 4.X Integration with Sourcebans! FINALLY HERE!
Fixed my error!
But, if someone updates their custom STEAMID field, does it automatically update SB? |
Re: Vbulletin 4.X Integration with Sourcebans! FINALLY HERE!
There's a minor problem in the script. When checking to remove an admin, it checks if his secondary groups (supposed to be '$user_additional_groups'), but the array containing his second groups isn't created until further down in the script, so it will always remove him from sourcebans if his primary group isn't one of the groups with admin. I haven't finished looking through it, but I believe you have it set up so that it will re-add him to sourcebans before the end of the script anyway.
Awesome work on this, Geit, and thank you very much, bouncer, for releasing it! |
Re: Vbulletin 4.X Integration with Sourcebans! FINALLY HERE!
IM having a realli weird problem were normal members on my VB are being added? vb group ID 2..
Here is my "vbtosourcebans.php" PHP Code:
|
Re: Vbulletin 4.X Integration with Sourcebans! FINALLY HERE!
Confirmed to work with 3.8.
|
Re: Vbulletin 4.X Integration with Sourcebans! FINALLY HERE!
Quote:
|
Re: Vbulletin 4.X Integration with Sourcebans! FINALLY HERE!
If anyone is looking for this to work with XenForo, we are currently testing a sync that does work but has a few slight bugs we hope to iron out this week/end. Thanks!
|
Re: Vbulletin 4.X Integration with Sourcebans! FINALLY HERE!
I'm using the Vbulletin to sorcebans cronjob.
Hwo ever when ever I run the cronjob myself i get this error. Code:
Warning: stream_set_timeout(): supplied argument is not a valid stream resource in [path]/includes/cron/CServerRcon.php on line 50 PHP Code:
PHP Code:
I'm running vbulletin 4.1.3 Sourceban 1.4.8 php version 5.2.16 Any help would be greatly appreciated. |
Re: Vbulletin 4.X Integration with Sourcebans! FINALLY HERE!
[IMG]http://img824.**************/img824/4775/scrrenshot.th.jpg[/IMG]
Uploaded with ************** Quote:
So I ran the cron job myself on the forums and got the error above in the quoted text. |
Re: Vbulletin 4.X Integration with Sourcebans! FINALLY HERE!
this is what I get when I try to run the cronjob
Table 'site.sb_admins' doesn't exist "Site" being the name of the database of my vbulletin |
Re: Vbulletin 4.X Integration with Sourcebans! FINALLY HERE!
got it working, and it deleted all my admins in the sourcebans database...
|
Re: Vbulletin 4.X Integration with Sourcebans! FINALLY HERE!
Sorry for the slight bump but...
I have tried to install this but I am presented with this error: Code:
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in [path]/includes/cron/vbulletintosourcebans.php on line 167 [code] Code:
$res = $vbulletin->db->query_read("SELECT `user`.`userid` as userid, `usergroupid`, `membergroupids`, `username`, `email`, `".$steamid_custom_field."` FROM ". TABLE_PREFIX ."user LEFT JOIN `". TABLE_PREFIX ."userfield` ON `user`.`userid`=`userfield`.`userid`"); //Select all users from the Vbulletin Database |
Re: Vbulletin 4.X Integration with Sourcebans! FINALLY HERE!
The query doesn't return any results. Try printing the query and run it yourself to see where it goes wrong.
|
Re: Vbulletin 4.X Integration with Sourcebans! FINALLY HERE!
Thx. Works fine on my Website
|
Re: Vbulletin 4.X Integration with Sourcebans! FINALLY HERE!
For anyone using XenForo, please check our version of this mod:
http://xenforo.com/community/threads...ns-sync.18870/ Pretty much the same setup with a few more features and easy organization via XenForo. |
Re: Vbulletin 4.X Integration with Sourcebans! FINALLY HERE!
Quote:
|
Re: Vbulletin 4.X Integration with Sourcebans! FINALLY HERE!
Quote:
|
Re: Vbulletin 4.X Integration with Sourcebans! FINALLY HERE!
Nice work!
|
Re: Vbulletin 4.X Integration with Sourcebans! FINALLY HERE!
Will this work with sourcebans 1.4.8?
|
Re: Vbulletin 4.X Integration with Sourcebans! FINALLY HERE!
There was no database structure change in 1.4.8, so yes.
|
Re: Vbulletin 4.X Integration with Sourcebans! FINALLY HERE!
Need a bit of help setting-up the right path for cron job. I am getting this error.
"No such file or directory" Path I am using is home/XXX/public_html/my site.com/includes/cron/vbtosourcebans.php vbulletin version 4.1.5 Source bans version 1.4.8 |
Re: Vbulletin 4.X Integration with Sourcebans! FINALLY HERE!
Are you sure that path is correct? It would make more sense if the path were like this:
Code:
home/user/my site.com/public_html/ Code:
/home/XXX/public_html/my site.com/includes/cron/vbtosourcebans.php |
Re: Vbulletin 4.X Integration with Sourcebans! FINALLY HERE!
Yeah your right, but that is where most of them go that are ran from cron. The path is wrong, it didn't work lol.. I was hoping that someone who knows the right path could post it. ;)
|
Re: Vbulletin 4.X Integration with Sourcebans! FINALLY HERE!
Quote:
Quote:
What does your cronjob look like? And what happens when you execute it manually? |
Re: Vbulletin 4.X Integration with Sourcebans! FINALLY HERE!
I know what my file path is but, the sourcebans.php script has a set file path, witch I set the files where they were supposed to go and also from my first post I gave my path, so you really don't have to be a "psychic".. ;)
I don't know how to run it manually, I have ran it through the main control panel. |
Re: Vbulletin 4.X Integration with Sourcebans! FINALLY HERE!
Quote:
|
Re: Vbulletin 4.X Integration with Sourcebans! FINALLY HERE!
Thanks 8088, but I have it working now. The problem was trying to run the script in website control panel cronjob. When I needed to run it in vbulletin scheduled task manager.. I guess, I didn't look at the instructions clearly but thank you for your help..
|
Re: Vbulletin 4.X Integration with Sourcebans! FINALLY HERE!
sorry for necro post. but i am hireing a person to set this up on my vbulletin site :)
you can contact me here via pm, skype or add me on steam! Steam add: focus591 Skype: henrikkroko Hope to hear from you! |
All times are GMT -4. The time now is 08:36. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.