AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Snippets and Tutorials (https://forums.alliedmods.net/forumdisplay.php?f=112)
-   -   Vbulletin 4.X Integration with Sourcebans! FINALLY HERE! (https://forums.alliedmods.net/showthread.php?t=139212)

bouncer 09-27-2010 19:07

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!
  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 :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

bouncer 09-27-2010 19:16

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.

NoS 09-27-2010 22:34

Re: Vbulletin 4.X Integration with Sourcebans! FINALLY HERE!
 
Sounds awesome. I havn't tested it, but thats great!

KyleS 09-28-2010 02:02

Re: Vbulletin 4.X Integration with Sourcebans! FINALLY HERE!
 
Quote:

Originally Posted by NoS (Post 1310327)
Sounds awesome. I havn't tested it, but thats great!


Peace-Maker 09-28-2010 12:16

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();
to the rehashing part to get it working;)

Original

bouncer 09-28-2010 15:55

Re: Vbulletin 4.X Integration with Sourcebans! FINALLY HERE!
 
well i think if you add extra flags, they will probably stay. dont know though.

Geit 09-28-2010 16:14

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:

Originally Posted by Peace-Maker (Post 1310625)
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.

bouncer 10-18-2010 20:04

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:

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

psychonic 10-18-2010 20:09

Re: Vbulletin 4.X Integration with Sourcebans! FINALLY HERE!
 
Quote:

Originally Posted by bouncer (Post 1328903)
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.

bouncer 10-18-2010 20:12

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?

welcome 11-15-2010 17:27

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:

SmackDaddy 11-18-2010 17:26

Re: Vbulletin 4.X Integration with Sourcebans! FINALLY HERE!
 
Anyone able to do this for Invision Board?!? Thanks in advance.

bouncer 11-18-2010 17:27

Re: Vbulletin 4.X Integration with Sourcebans! FINALLY HERE!
 
I will post a tutorial soon with more customizations at www.FragToss.com

daleGEND 12-19-2010 21:36

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?

Invader Amoto 03-11-2011 02:00

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!

wtfaatp 03-15-2011 05:44

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:

<?php
//THIS CODE IS INTENDED FOR USE AS A VBULLETIN 4 CRON SCRIPT, IT REQUIRES THE VBULLETIN GLOBAL VAR PROVIDED BY CRONMANAGER.PHP - YOU MAY EMULATE THIS FUNCTIONALITY BY INCLUDING THE VBULLETIN GLOBAL.PHP
//RECCOMENDED SCHEDULE IS EVERY 30 MINUTES TO 1 HOUR
// ############################# VARIABLES ################################
mysql_pconnect("******""root""*****"); //MYSQL information for the SourceBans/Vbulletin Database
$db_sourcebans "sourcebans"//Database name for SourceBans
$steamid_custom_field "field11"//The custom field id for the users SteamID, it is reccomended that you only let the user set their steamid on signup or you may have people changing their steamid's and giving other people admin.
define("DB_PREFIX""sb"); //Table Prefix for SourceBans
$groups_with_admin = array(19,18,13,15,16,17); // Comma delimited list of  vBulletin groups with admin.
$ban_site_url "http://98.224.170.160.com/bans"//URL to the Sourcebans installation, no trailing forward slash
$clan_name "[mFc.] Middle Fingah Click"// Name of your clan
$pm_from_userid=1//The vBulletin UserID to send the PM from
$pm_from_user_text="wtfaatp";    //The vBulletin Username to send the PM from

// ######################## SET PHP ENVIRONMENT ###########################
mysql_select_db($db_sourcebans);
mysql_set_charset('utf8');
require 
"CServerRcon.php"//This file can be found in Sourcebans_web/includes/ and must be located in the same folder as this script.
error_reporting(E_ALL & ~E_NOTICE); //Prevents "Notices" From showing up
if (!is_object($vbulletin->db)) // Checks if the vbulletin database is accessiable, otherwise exit the script.
{
    exit;
}
$vbulletin->db->hide_errors(); // Hide Database errors from Vbulletin

// ############################ FUNCTIONS ################################
function encrypt_password($password$salt='SourceBans'// If you use a different salt for your sourcebans installation, Change this.
{
    return 
sha1(sha1($salt $password));
}    
function 
getRandomPassword($length ""//Returns a random alphanumeric string of the specified length, 32 chars if unspecified
{    
    
$code md5(uniqid(rand(), true));
    if (
$length != "") return substr($code0$length);
    else return 
$code;
}
function 
AddAdmin($sourcebans_group_web$sourcebans_group_server$sourcebans_group_server_name$sourcebans_group_server_access$username$email$steamid$userid)
{
    
$password getRandomPassword(8); // Generate a password for the user
    
$res2 mysql_query("SELECT `aid`, `group_id` FROM ".DB_PREFIX."_admins LEFT JOIN ".DB_PREFIX."_admins_servers_groups ON ".DB_PREFIX."_admins.aid=".DB_PREFIX."_admins_servers_groups.admin_id WHERE user='".mysql_real_escape_string($username)."'") or die(mysql_error()); //A quick query so we can check to see if the admin is already an admin and whether they've been promoted or not
    
$row2 mysql_fetch_assoc($res2); // Fetch the result from the previous query
    
mysql_query("INSERT INTO ".DB_PREFIX."_admins(user, authid, password, gid, email, srv_group)
                VALUES ('"
.mysql_real_escape_string($username)."','".mysql_real_escape_string($steamid)."','".encrypt_password($password)."',".$sourcebans_group_web.",'".mysql_real_escape_string($email)."','".mysql_real_escape_string($sourcebans_group_server_name)."') ON DUPLICATE KEY UPDATE srv_group='".mysql_real_escape_string($sourcebans_group_server_name)."', gid='".$sourcebans_group_web."'") or die(mysql_error()); // Add the admin to the SourceBans database or, if they already exist, update their group data.
    
if(mysql_affected_rows() > 0//Check if the last query affected any rows, did it change anything or add a new admin? If no, skip.
    
{
        
$res3 mysql_query("SELECT `aid` FROM ".DB_PREFIX."_admins WHERE user='".mysql_real_escape_string($username)."'") or die(mysql_error()); // Select the users AdminID
        
$row3 mysql_fetch_assoc($res3);// Fetch the result from the previous query
        
mysql_query("DELETE FROM ".DB_PREFIX."_admins_servers_groups WHERE admin_id='".$row3['aid']."'") or die(mysql_error());//Delete the users admin group data from the table
        
mysql_query("INSERT IGNORE INTO ".DB_PREFIX."_admins_servers_groups(admin_id, group_id, srv_group_id, server_id) VALUES (".$row3['aid'].",".$sourcebans_group_server.",".$sourcebans_group_server_access.", -1)") or die(mysql_error()); //Add back their new data.
        
        //This next bit handles the PMs, the promotion/demotion will only work if your "highest power" admin group is the first id and the "lowest power" is the last id. i.e - Managers = GID1, Council = GID2, Admins = GID3, Members = GID4, Recruits = GID5
        
if(mysql_num_rows($res2) == 0)
        {
            
SendPM($userid$username$sourcebans_group_server_name$password0); //Send the user a message with their password and username telling them that they've been added to the system.
        
}
        elseif (
$sourcebans_group_server $row2['group_id'])
        {
            
SendPM($userid$username$sourcebans_group_server_name$password1); //Tell the user that they have been promoted in sourcebans.
        
}
        elseif (
$sourcebans_group_server $row2['group_id'])
        {
            
SendPM($userid$username$sourcebans_group_server_name$password2); //Tell the user that they have been demoted in sourcebans.
        
}
    }
}
function 
SendPM($pm_userid$pm_username$pm_group_name$pm_password$text// Send a PM to the user, there is an actual datamanager API in vB for this, but it wasn't working reliable so I fell back on this method
{
    global 
$vbulletin$ban_site_url$clan_name$pm_from_userid$pm_from_user_text;
    switch(
$text//The messages, pretty self explanatory which is which.
    
{
        case 
0:
            
$pm_text_title="Added to Sourcebans";
            
$pm_text="[CENTER][IMG]".$ban_site_url."/images/logos/sb-large.png[/IMG]
                        [/CENTER]
                        [LEFT][FONT=Garamond][SIZE=4]Hello "
.$pm_username.",

                        You have been added as a "
.$pm_group_name." to the ".$clan_name." admin system. Please find below the details required to login to the admin web panel, you will be able to access in-game admin automatically.

                        Username: [B]"
.$pm_username."[/B]
                        Password: [B]"
.$pm_password."[/B]

                        You can use this information to login into your new account at: "
.$ban_site_url."/index.php?p=login

                        It is HIGHLY recommended for security reasons that you change your password to something memorable once you login. If you have any questions please contact me about any problems.

                        Many thanks,
                        "
.$pm_from_user_text."
                        [/SIZE][/FONT][/LEFT]"
;
            break;
        case 
1:
            
$pm_text_title="Promoted in Sourcebans";
            
$pm_text="[CENTER][IMG]".$ban_site_url."/images/logos/sb-large.png[/IMG]
                        [/CENTER]
                        [LEFT][FONT=Garamond][SIZE=4]Hello "
.$pm_username.",

                        Congratulations! You have been promoted to a "
.$pm_group_name." on the ".$clan_name." admin system. Your login details are the same as before.

                        You can use this information to login into your account at: "
.$ban_site_url."/index.php?p=login

                        If you have any questions please contact me about any problems.

                        Many thanks,
                        "
.$pm_from_user_text."
                        [/SIZE][/FONT][/LEFT]"
;
            break;
        case 
2:
            
$pm_text_title="Demoted in Sourcebans";
            
$pm_text="[CENTER][IMG]".$ban_site_url."/images/logos/sb-large.png[/IMG]
                        [/CENTER]
                        [LEFT][FONT=Garamond][SIZE=4]Hello "
.$pm_username.",

                        We are afraid that you have been demoted to a "
.$pm_group_name." on the ".$clan_name." admin system. Your login details are the same as before.

                        You can use this information to login into your account at: "
.$ban_site_url."/index.php?p=login

                        If you have any questions please contact me about any problems.

                        Many thanks,
                        "
.$pm_from_user_text."
                        [/SIZE][/FONT][/LEFT]"
;
            break;
        case 
3:
            
$pm_text_title="Removed from Sourcebans";
            
$pm_text="[CENTER][IMG]".$ban_site_url."/images/logos/sb-large.png[/IMG]
                        [/CENTER]
                        [LEFT][FONT=Garamond][SIZE=4]Hello "
.$pm_username.",

                        We are afraid that you have been removed from the "
.$clan_name." admin system. 

                        If you have any questions please contact me about any problems.

                        Many thanks,
                        "
.$pm_from_user_text."
                        [/SIZE][/FONT][/LEFT]"
;
            break;
    }
    
$botpermissions['adminpermissions'] = 6;
    
$pmdm =& datamanager_init('PM'$vbulletinERRTYPE_ARRAY);
    
$pmdm->overridequota true;
    
$pmdm->set('fromuserid'$pm_from_userid);
    
$pmdm->set('fromusername'$pm_from_userid_text);
    
$pmdm->set_info('receipt'$vbulletin->GPC['receipt']);            //false    
    
$pmdm->set_info('savecopy'$vbulletin->GPC['savecopy']);     //false
    
$pmdm->set('allowsmilie'$vbulletin->GPC['allowsmilie']);    //true
    
$pmdm->set('title'$pm_text_title);
    
$pmdm->set('message'$pm_text);
    
$pmdm->set_recipients($pm_username$botpermissions);
    
$pmdm->set('dateline'TIMENOW);

    
$pmdm->pre_save();
    if (empty(
$pmdm->errors))
    {
            
$pmdm->save();
    }
    else
    {
        echo 
"<hr><b><font color=red>PM was not sent, Reason:</font></b><pre>";
        
print_r($pmdm->errors);
        echo 
"</pre><hr> ";
    }
    unset(
$pmdm);
}
// ########################################################################
// ######################### START MAIN SCRIPT ############################
// ########################################################################
$res $vbulletin->db->query_read("SELECT `username`, `user`.`userid` as userid, `usergroupid`, `membergroupids`, `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
while($row mysql_fetch_assoc($res))
{
    
// CLEANUP OLD/INVALID ADMINS
    
$res2 mysql_query("SELECT `aid` FROM ".DB_PREFIX."_admins WHERE user='".$row['username']."'") or die(mysql_error()); //Check if the user has a sourcebans account
    
$row2 mysql_fetch_assoc($res2);
    if (
mysql_num_rows($res2)>&& !in_array($row['usergroupid'], $groups_with_admin)) //If yes, and they are not in one of the admin groups defined above then...
    
{
        
$additionaluser=false;
        for(
$i 0$i count($user_additional_groups); $i ++) //Check if they are marked as an additional user to any of the admin groups defined above
        
{
            if (
in_array($user_additional_groups[$i], $groups_with_admin))
            {
                
$additionaluser=true;
                break;
            }
        }
        if(
$additionaluser == false// If they aren't remove them from SourceBans.
        
{
            
mysql_query("DELETE FROM ".DB_PREFIX."_admins_servers_group WHERE admin_id='".$row2['aid']."'");
            
mysql_query("DELETE FROM ".DB_PREFIX."_admins WHERE aid='".$row2['aid']."'");
            
SendPM($row['userid'], $row['username'], "None""None"3); //Send a PM telling them that they've been removed from sourcebans
        
}
    }
    
    
// PRIMARY USERGROUP ADMIN CONTROL
    
    
if (in_array($row['usergroupid'], $groups_with_admin)) //If the user is in a primary group defined as an admin, then add/edit them as such.
    
{
        switch(
$row['usergroupid']) 
        {    
            case 
16//Group ID from vBulletin
                //AddAdmin(Sourcebans Web GroupID, Sourcebans Admin GroupID, Sourcebans Admin Group Name (Must be EXACT), Sourcebans Server GroupID, $row['username'], $row['email'], $row[$steamid_custom_field], $row['userid'])
                
AddAdmin(11"Leaders"1$row['username'], $row['email'], $row[$steamid_custom_field], $row['userid']);
                break;
            case 
18:
                
AddAdmin(12"Vice-Founders"1$row['username'], $row['email'], $row[$steamid_custom_field], $row['userid']);
                break;
            case 
15:
                
AddAdmin(23"H-Exec"1$row['username'], $row['email'], $row[$steamid_custom_field], $row['userid']);
                break;
            case 
17:
                
AddAdmin(24"Admins"1$row['username'], $row['email'], $row[$steamid_custom_field], $row['userid']);
                break;
            case 
13:
                
AddAdmin(26"Members"1$row['username'], $row['email'], $row[$steamid_custom_field], $row['userid']);
                break;
            case 
19:
                
AddAdmin(25"Donators"1$row['username'], $row['email'], $row[$steamid_custom_field], $row['userid']);
                break;
        }
        continue;
    }
    
    
// ADDITIONAL USERGROUP ADMIN CONTROL
    
if (strlen ($row['membergroupids']) > 0){
    
$user_additional_groups=explode(","$row['membergroupids']);
    }
    
    for(
$i 0$i count($user_additional_groups); $i ++) //If the user is in a secondary group defined as an admin, then add/edit them as such, same format as above.
    
{
        if (
in_array($user_additional_groups[$i], $groups_with_admin))
        {
            switch(
$user_additional_groups[$i]) 
            {    
            case 
16//Group ID from vBulletin
                //AddAdmin(Sourcebans Web GroupID, Sourcebans Admin GroupID, Sourcebans Admin Group Name (Must be EXACT), Sourcebans Server GroupID, $row['username'], $row['email'], $row[$steamid_custom_field], $row['userid'])
                
AddAdmin(11"Leaders"1$row['username'], $row['email'], $row[$steamid_custom_field], $row['userid']);
                break;
            case 
18:
                
AddAdmin(12"Vice-Founders"1$row['username'], $row['email'], $row[$steamid_custom_field], $row['userid']);
                break;
            case 
15:
                
AddAdmin(23"H-Exec"1$row['username'], $row['email'], $row[$steamid_custom_field], $row['userid']);
                break;
            case 
17:
                
AddAdmin(24"Admins"1$row['username'], $row['email'], $row[$steamid_custom_field], $row['userid']);
                break;
            case 
13:
                
AddAdmin(26"Members"1$row['username'], $row['email'], $row[$steamid_custom_field], $row['userid']);
                break;
            case 
19:
                
AddAdmin(25"Donators"1$row['username'], $row['email'], $row[$steamid_custom_field], $row['userid']);
                break;
            }
            continue;
        }
    }
}
//REHASH SERVERS, DOES NOT REQUIRE EDITING
$res mysql_query("SELECT ip, port, rcon FROM ".DB_PREFIX."_servers WHERE enabled=1") or die(mysql_error());
while(
$row mysql_fetch_assoc($res))
{
    if (
strlen($row['rcon']) > 0)
    {
        
$rcon = new CServerRcon($row['ip'], $row['port'], $row['rcon']);
        if(!
$rcon->Auth())
        {
            continue;
        }
        
$rcon->rconCommand("sm_rehash");
        unset(
$rcon);
    }
}
?>


casvdry 03-19-2011 03:58

Re: Vbulletin 4.X Integration with Sourcebans! FINALLY HERE!
 
Confirmed to work with 3.8.

casvdry 03-19-2011 04:00

Re: Vbulletin 4.X Integration with Sourcebans! FINALLY HERE!
 
Quote:

Originally Posted by wtfaatp (Post 1433488)
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:

$groups_with_admin = array(19,18,13,15,16,17); 


You need to change these #'s to match the #'s of your usergroup ID's.

daleGEND 04-11-2011 09:56

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!

wtfaatp 04-12-2011 18:15

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

Warning: fwrite(): supplied argument is not a valid stream resource in [path]/includes/cron/CServerRcon.php on line 71

Warning: fwrite(): supplied argument is not a valid stream resource in [path]/includes/cron/CServerRcon.php on line 71

Warning: stream_set_timeout(): supplied argument is not a valid stream resource in [path]/includes/cron/CServerRcon.php on line 50

Warning: fwrite(): supplied argument is not a valid stream resource in [path]/includes/cron/CServerRcon.php on line 71

Warning: fwrite(): supplied argument is not a valid stream resource in [path]/includes/cron/CServerRcon.php on line 71
Done

This is my vbtosourcebans.php
PHP Code:

<?php
//THIS CODE IS INTENDED FOR USE AS A VBULLETIN 4 CRON SCRIPT, IT REQUIRES THE VBULLETIN GLOBAL VAR PROVIDED BY CRONMANAGER.PHP - YOU MAY EMULATE THIS FUNCTIONALITY BY INCLUDING THE VBULLETIN GLOBAL.PHP
//RECCOMENDED SCHEDULE IS EVERY 30 MINUTES TO 1 HOUR
// ############################# VARIABLES ################################
mysql_pconnect("***""***""***"); //MYSQL information for the SourceBans/Vbulletin Database
$db_sourcebans "***"//Database name for SourceBans
$steamid_custom_field "field11"//The custom field id for the users SteamID, it is reccomended that you only let the user set their steamid on signup or you may have people changing their steamid's and giving other people admin.
define("DB_PREFIX""sb"); //Table Prefix for SourceBans
$groups_with_admin = array(6,9,10,11,12,13); // Comma delimited list of  vBulletin groups with admin.
$ban_site_url "http://www.mfc4life.com/bans"//URL to the Sourcebans installation, no trailing forward slash
$clan_name "Middle Fingah Click"// Name of your clan
$pm_from_userid=1//The vBulletin UserID to send the PM from
$pm_from_user_text="wtfaatp";    //The vBulletin Username to send the PM from

// ######################## SET PHP ENVIRONMENT ###########################
mysql_select_db($db_sourcebans);
mysql_set_charset('utf8');
require 
"CServerRcon.php"//This file can be found in Sourcebans_web/includes/ and must be located in the same folder as this script.
error_reporting(E_ALL & ~E_NOTICE); //Prevents "Notices" From showing up
if (!is_object($vbulletin->db)) // Checks if the vbulletin database is accessiable, otherwise exit the script.
{
    exit;
}
$vbulletin->db->hide_errors(); // Hide Database errors from Vbulletin

// ############################ FUNCTIONS ################################
function encrypt_password($password$salt='SourceBans'// If you use a different salt for your sourcebans installation, Change this.
{
    return 
sha1(sha1($salt $password));
}    
function 
getRandomPassword($length ""//Returns a random alphanumeric string of the specified length, 32 chars if unspecified
{    
    
$code md5(uniqid(rand(), true));
    if (
$length != "") return substr($code0$length);
    else return 
$code;
}
function 
AddAdmin($sourcebans_group_web$sourcebans_group_server$sourcebans_group_server_name$sourcebans_group_server_access$username$email$steamid$userid)
{
    
$password getRandomPassword(8); // Generate a password for the user
    
$res2 mysql_query("SELECT `aid`, `group_id` FROM ".DB_PREFIX."_admins LEFT JOIN ".DB_PREFIX."_admins_servers_groups ON ".DB_PREFIX."_admins.aid=".DB_PREFIX."_admins_servers_groups.admin_id WHERE user='".mysql_real_escape_string($username)."'") or die(mysql_error()); //A quick query so we can check to see if the admin is already an admin and whether they've been promoted or not
    
$row2 mysql_fetch_assoc($res2); // Fetch the result from the previous query
    
mysql_query("INSERT INTO ".DB_PREFIX."_admins(user, authid, password, gid, email, srv_group)
                VALUES ('"
.mysql_real_escape_string($username)."','".mysql_real_escape_string($steamid)."','".encrypt_password($password)."',".$sourcebans_group_web.",'".mysql_real_escape_string($email)."','".mysql_real_escape_string($sourcebans_group_server_name)."') ON DUPLICATE KEY UPDATE srv_group='".mysql_real_escape_string($sourcebans_group_server_name)."', gid='".$sourcebans_group_web."'") or die(mysql_error()); // Add the admin to the SourceBans database or, if they already exist, update their group data.
    
if(mysql_affected_rows() > 0//Check if the last query affected any rows, did it change anything or add a new admin? If no, skip.
    
{
        
$res3 mysql_query("SELECT `aid` FROM ".DB_PREFIX."_admins WHERE user='".mysql_real_escape_string($username)."'") or die(mysql_error()); // Select the users AdminID
        
$row3 mysql_fetch_assoc($res3);// Fetch the result from the previous query
        
mysql_query("DELETE FROM ".DB_PREFIX."_admins_servers_groups WHERE admin_id='".$row3['aid']."'") or die(mysql_error());//Delete the users admin group data from the table
        
mysql_query("INSERT IGNORE INTO ".DB_PREFIX."_admins_servers_groups(admin_id, group_id, srv_group_id, server_id) VALUES (".$row3['aid'].",".$sourcebans_group_server.",".$sourcebans_group_server_access.", -1)") or die(mysql_error()); //Add back their new data.
        
        //This next bit handles the PMs, the promotion/demotion will only work if your "highest power" admin group is the first id and the "lowest power" is the last id. i.e - Managers = GID1, Council = GID2, Admins = GID3, Members = GID4, Recruits = GID5
        
if(mysql_num_rows($res2) == 0)
        {
            
SendPM($userid$username$sourcebans_group_server_name$password0); //Send the user a message with their password and username telling them that they've been added to the system.
        
}
        elseif (
$sourcebans_group_server $row2['group_id'])
        {
            
SendPM($userid$username$sourcebans_group_server_name$password1); //Tell the user that they have been promoted in sourcebans.
        
}
        elseif (
$sourcebans_group_server $row2['group_id'])
        {
            
SendPM($userid$username$sourcebans_group_server_name$password2); //Tell the user that they have been demoted in sourcebans.
        
}
    }
}
function 
SendPM($pm_userid$pm_username$pm_group_name$pm_password$text// Send a PM to the user, there is an actual datamanager API in vB for this, but it wasn't working reliable so I fell back on this method
{
    global 
$vbulletin$ban_site_url$clan_name$pm_from_userid$pm_from_user_text;
    switch(
$text//The messages, pretty self explanatory which is which.
    
{
        case 
0:
            
$pm_text_title="Added to Sourcebans";
            
$pm_text="[CENTER][IMG]".$ban_site_url."/images/logos/sb-large.png[/IMG]
                        [/CENTER]
                        [LEFT][FONT=Garamond][SIZE=4]Hello "
.$pm_username.",

                        You have been added as a "
.$pm_group_name." to the Middle Fingah Click admin system. Please find below the details required to login to the admin web panel, you will be able to access in-game admin automatically.

                        Username: [B]"
.$pm_username."[/B]
                        Password: [B]"
.$pm_password."[/B]

                        You can use this information to login into your new account at: "
.$ban_site_url."

                        It is HIGHLY recommended for security reasons that you change your password to something memorable once you login. If you have any questions please contact me or any other Manager with your query.

                        Many thanks,
                        "
.$pm_from_user_text."
                        [/SIZE][/FONT][/LEFT]"
;
            break;
        case 
1:
            
$pm_text_title="Promoted in Sourcebans";
            
$pm_text="[CENTER][IMG]".$ban_site_url."/images/logos/sb-large.png[/IMG]
                        [/CENTER]
                        [LEFT][FONT=Garamond][SIZE=4]Hello "
.$pm_username.",

                        Congratulations! You have been promoted to a "
.$pm_group_name." on the ".$clan_name." admin system. Your login details are the same as before.

                        You can use this information to login into your account at: "
.$ban_site_url."/index.php?p=login

                        If you have any questions please contact me via [email protected] or PM.

                        Many thanks,
                        "
.$pm_from_user_text."
                        [/SIZE][/FONT][/LEFT]"
;
            break;
        case 
2:
            
$pm_text_title="Demoted in Sourcebans";
            
$pm_text="[CENTER][IMG]".$ban_site_url."/images/logos/sb-large.png[/IMG]
                        [/CENTER]
                        [LEFT][FONT=Garamond][SIZE=4]Hello "
.$pm_username.",

                        We are afraid that you have been demoted to a "
.$pm_group_name." on the ".$clan_name." admin system. Your login details are the same as before.

                        You can use this information to login into your account at: "
.$ban_site_url."

                        If you have any questions please contact me via [email protected] or PM.

                        Many thanks,
                        "
.$pm_from_user_text."
                        [/SIZE][/FONT][/LEFT]"
;
            break;
        case 
3:
            
$pm_text_title="Removed from Sourcebans";
            
$pm_text="[CENTER][IMG]".$ban_site_url."/images/logos/sb-large.png[/IMG]
                        [/CENTER]
                        [LEFT][FONT=Garamond][SIZE=4]Hello "
.$pm_username.",

                        We are afraid that you have been removed from the "
.$clan_name." admin system. 

                        If you have any questions please contact me via [email protected] or PM.

                        Many thanks,
                        "
.$pm_from_user_text."
                        [/SIZE][/FONT][/LEFT]"
;
            break;
    }
    
$botpermissions['adminpermissions'] = 2;
    
$pmdm =& datamanager_init('PM'$vbulletinERRTYPE_ARRAY);
    
$pmdm->overridequota true;
    
$pmdm->set('fromuserid'$pm_from_userid);
    
$pmdm->set('fromusername'$pm_from_userid_text);
    
$pmdm->set_info('receipt'$vbulletin->GPC['receipt']);            //false    
    
$pmdm->set_info('savecopy'$vbulletin->GPC['savecopy']);     //false
    
$pmdm->set('allowsmilie'$vbulletin->GPC['allowsmilie']);    //true
    
$pmdm->set('title'$pm_text_title);
    
$pmdm->set('message'$pm_text);
    
$pmdm->set_recipients($pm_username$botpermissions);
    
$pmdm->set('dateline'TIMENOW);

    
$pmdm->pre_save();
    if (empty(
$pmdm->errors))
    {
            
$pmdm->save();
    }
    else
    {
        echo 
"<hr><b><font color=red>PM was not sent, Reason:</font></b><pre>";
        
print_r($pmdm->errors);
        echo 
"</pre><hr> ";
    }
    unset(
$pmdm);
}
// ########################################################################
// ######################### START MAIN SCRIPT ############################
// ########################################################################
$res $vbulletin->db->query_read("SELECT `username`, `user`.`userid` as userid, `usergroupid`, `membergroupids`, `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
while($row mysql_fetch_assoc($res))
{
    
// CLEANUP OLD/INVALID ADMINS
    
$res2 mysql_query("SELECT `aid` FROM ".DB_PREFIX."_admins WHERE user='".$row['username']."'") or die(mysql_error()); //Check if the user has a sourcebans account
    
$row2 mysql_fetch_assoc($res2);
    if (
mysql_num_rows($res2)>&& !in_array($row['usergroupid'], $groups_with_admin)) //If yes, and they are not in one of the admin groups defined above then...
    
{
        
$additionaluser=false;
        for(
$i 0$i count($user_additional_groups); $i ++) //Check if they are marked as an additional user to any of the admin groups defined above
        
{
            if (
in_array($user_additional_groups[$i], $groups_with_admin))
            {
                
$additionaluser=true;
                break;
            }
        }
        if(
$additionaluser == false// If they aren't remove them from SourceBans.
        
{
            
mysql_query("DELETE FROM ".DB_PREFIX."_admins_servers_group WHERE admin_id='".$row2['aid']."'");
            
mysql_query("DELETE FROM ".DB_PREFIX."_admins WHERE aid='".$row2['aid']."'");
            
SendPM($row['userid'], $row['username'], "None""None"3); //Send a PM telling them that they've been removed from sourcebans
        
}
    }
    
    
// PRIMARY USERGROUP ADMIN CONTROL
    
    
if (in_array($row['usergroupid'], $groups_with_admin)) //If the user is in a primary group defined as an admin, then add/edit them as such.
    
{
        switch(
$row['usergroupid']) 
        {    
                case 
6:
                    
AddAdmin(11"Leaders"3$row['username'], $row['email'], $row[$steamid_custom_field], $row['userid']);
                    break;
                case 
9:
                    
AddAdmin(11"Leaders"3$row['username'], $row['email'], $row[$steamid_custom_field], $row['userid']);
                    break;
                case 
10:
                    
AddAdmin(22"Head Council"3$row['username'], $row['email'], $row[$steamid_custom_field], $row['userid']);
                    break;
                case 
11:
                    
AddAdmin(24"Council"3$row['username'], $row['email'], $row[$steamid_custom_field], $row['userid']);
                    break;
                case 
12:
                    
AddAdmin(26"Members"3$row['username'], $row['email'], $row[$steamid_custom_field], $row['userid']);
                    break;
                case 
13:
                    
AddAdmin(05"Donators"3$row['username'], $row['email'], $row[$steamid_custom_field], $row['userid']);
                    break;
        }
        continue;
    }
    
    
// ADDITIONAL USERGROUP ADMIN CONTROL
    
if (strlen ($row['membergroupids']) > 0){
    
$user_additional_groups=explode(","$row['membergroupids']);
    }
    
    for(
$i 0$i count($user_additional_groups); $i ++) //If the user is in a secondary group defined as an admin, then add/edit them as such, same format as above.
    
{
        if (
in_array($user_additional_groups[$i], $groups_with_admin))
        {
            switch(
$user_additional_groups[$i]) 
            {    
                case 
6:
                    
AddAdmin(11"Leaders"3$row['username'], $row['email'], $row[$steamid_custom_field], $row['userid']);
                    break;
                case 
9:
                    
AddAdmin(11"Leaders"3$row['username'], $row['email'], $row[$steamid_custom_field], $row['userid']);
                    break;
                case 
10:
                    
AddAdmin(22"Head Council"3$row['username'], $row['email'], $row[$steamid_custom_field], $row['userid']);
                    break;
                case 
11:
                    
AddAdmin(24"Council"3$row['username'], $row['email'], $row[$steamid_custom_field], $row['userid']);
                    break;
                case 
12:
                    
AddAdmin(26"Members"3$row['username'], $row['email'], $row[$steamid_custom_field], $row['userid']);
                    break;
                case 
13:
                    
AddAdmin(05"Donators"3$row['username'], $row['email'], $row[$steamid_custom_field], $row['userid']);
                    break;
            }
            continue;
        }
    }
}
//REHASH SERVERS, DOES NOT REQUIRE EDITING
$res mysql_query("SELECT ip, port, rcon FROM ".DB_PREFIX."_servers WHERE enabled=1") or die(mysql_error());
while(
$row mysql_fetch_assoc($res))
{
    if (
strlen($row['rcon']) > 0)
    {
        
$rcon = new CServerRcon($row['ip'], $row['port'], $row['rcon']);
        if(!
$rcon->Auth())
        {
            continue;
        }
        
$rcon->rconCommand("sm_rehash");
        unset(
$rcon);
    }
}
?>

Any my cserverrcon.php
PHP Code:

<?php
/**
 * =============================================================================
 * Send and receive RCON packets
 * 
 * @author SteamFriends Development Team
 * @version 1.0.0
 * @copyright SourceBans (C)2007 SteamFriends.com.  All rights reserved.
 * @package SourceBans
 * @link http://www.sourcebans.net
 * 
 * @version $Id: CServerRcon.php 117 2008-08-21 17:17:54Z peace-maker $
 * =============================================================================
 */

class CServerRcon
{
  private 
$password;
  private 
$_sock null;
  private 
$_id 0;
  private 
$isfsock true;

  const 
SERVERDATA_EXECCOMMAND 02;
  const 
SERVERDATA_AUTH 03;
  const 
SERVERDATA_RESPONSE_VALUE 00;
  const 
SERVERDATA_AUTH_RESPONSE 02;

  function 
CServerRcon ($address$port$password)
  {
    
$this->password $password;

    try
    {
      if (
defined('BIND_IP') && function_exists('socket_create') && function_exists('socket_bind'))
      {
        
$this->isfsock false;
        
$this->_sock socket_create(AF_INETSOCK_STREAMSOL_TCP);

        
socket_set_option($this->_sockSOL_SOCKETSO_REUSEADDR1);
        
socket_bind($this->_sockBIND_IP);

        
socket_connect($this->_sock$address$port);

        
socket_set_option($this->_sockSOL_SOCKETSO_SNDTIMEO, array("sec"=>2"usec"=>0));
        
socket_set_option($this->_sockSOL_SOCKETSO_RCVTIMEO, array("sec"=>2"usec"=>0));
      }
      else
      {
        
$this->_sock = @fsockopen($address$port$errno$errstr2);
        
stream_set_timeout($this->_sock2);
      }
    }
    catch (
Exception $err) { }
  }
    
  public function 
Auth ()
  {
    
$PackID $this->_Write(CServerRcon::SERVERDATA_AUTH,$this->password);
    
$ret $this->_PacketRead();

    return (isset(
$ret[1]['ID']) && $ret[1]['ID'] == -1)?0:1;
  }

  private function 
_Write($cmd$s1=''$s2='')
  {
    
$id = ++$this->_id;
    
$data pack("VV",$id,$cmd).$s1.chr(0).$s2.chr(0);
    
$data pack("V",strlen($data)).$data;

    if (
$this->isfsock)
      
fwrite($this->_sock$datastrlen($data));
    else
      
socket_write($this->_sock$datastrlen($data));

    return 
$id;
  }

  private function 
_sock_read($size)
  {
    if (
$this->isfsock)
      return @
fread($this->_sock$size);
    else
      return 
socket_read($this->_sock$size);
  }

  private function 
_PacketRead()
  {
    
$retarray = array();

    while (
$size $this->_sock_read(4)) 
    {
      
$size unpack('V1Size',$size);

      if (
$size["Size"] > 4096)
        
$packet "\x00\x00\x00\x00\x00\x00\x00\x00".$this->_sock_read(4096);
      else 
        
$packet $this->_sock_read($size["Size"]);

      
array_push($retarray,unpack("V1ID/V1Reponse/a*S1/a*S2",$packet));
    }

    return 
$retarray;
  }

  public function 
Read()
  {
    
$Packets $this->_PacketRead();

    foreach(
$Packets as $pack
    {
      if (isset(
$ret[$pack['ID']])) 
      {
        
$ret[$pack['ID']]['S1'] .= $pack['S1'];
        
$ret[$pack['ID']]['S2'] .= $pack['S1'];
      }
      else
      {
        
$ret[$pack['ID']] = array('Reponse' => $pack['Reponse'],
                                  
'S1' => $pack['S1'],
                                  
'S2' =>    $pack['S2'],);
      }
    }

    return 
$ret;
  }

  public function 
sendCommand($command)
  {
    
//$command = '"'.trim(str_replace(' ','" "', $command)).'"';
    
$this->_Write(CServerRcon::SERVERDATA_EXECCOMMAND,$command,'');
  }

  public function 
rconCommand($command)
  {
      
$this->sendCommand($command);
      
$ret $this->Read();
      return 
$ret[2]['S1'];
  }
}


I'm running
vbulletin 4.1.3
Sourceban 1.4.8
php version 5.2.16


Any help would be greatly appreciated.

Xp3r7 05-01-2011 09:48

Re: Vbulletin 4.X Integration with Sourcebans! FINALLY HERE!
 
[IMG]http://img824.**************/img824/4775/scrrenshot.th.jpg[/IMG]

Uploaded with **************

Quote:

vBulletin to SourceBans


Warning: include_once([path]/./includes/cron/vbtosourcebans.php) [function.include-once]: failed to open stream: No such file or directory in [path]/admincp/cronadmin.php on line 113

Warning: include_once() [function.include]: Failed opening '[path]/./includes/cron/vbtosourcebans.php' for inclusion (include_path='.:/usr/local/php5/lib/php') in [path]/admincp/cronadmin.php on line 113
Done
Installed this last night on my forums (vB 4.1.3) and I woke up to my surprise and found no admins in my Sourcebans.

So I ran the cron job myself on the forums and got the error above in the quoted text.

nismoskyline86 05-15-2011 05:07

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

nismoskyline86 05-15-2011 05:16

Re: Vbulletin 4.X Integration with Sourcebans! FINALLY HERE!
 
got it working, and it deleted all my admins in the sourcebans database...

Jonzky 06-14-2011 19:20

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
This is the code at on line 166/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
The forum I tried running this on VB 4.1.1, also as far as I am aware I have done no 'major' changes to the code.

8088 06-15-2011 17:05

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.

dbs1989 06-20-2011 09:23

Re: Vbulletin 4.X Integration with Sourcebans! FINALLY HERE!
 
Thx. Works fine on my Website

daleGEND 08-14-2011 21:27

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.

KyleS 08-15-2011 07:20

Re: Vbulletin 4.X Integration with Sourcebans! FINALLY HERE!
 
Quote:

Originally Posted by daleGEND (Post 1532724)
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.

Whoa your timing is beyond impeccable. Thanks!

daleGEND 08-15-2011 08:58

Re: Vbulletin 4.X Integration with Sourcebans! FINALLY HERE!
 
Quote:

Originally Posted by KyleS (Post 1532913)
Whoa your timing is beyond impeccable. Thanks!

Happy to be of Service :)

Peace-Maker 08-15-2011 09:51

Re: Vbulletin 4.X Integration with Sourcebans! FINALLY HERE!
 
Nice work!

IcEWoLF 08-21-2011 17:19

Re: Vbulletin 4.X Integration with Sourcebans! FINALLY HERE!
 
Will this work with sourcebans 1.4.8?

Peace-Maker 08-21-2011 17:42

Re: Vbulletin 4.X Integration with Sourcebans! FINALLY HERE!
 
There was no database structure change in 1.4.8, so yes.

SanMan 09-20-2011 22:43

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

8088 09-21-2011 17:48

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/
Either way, that path is relative. You should make it absolute if you don't know where the cron starts:
Code:

/home/XXX/public_html/my site.com/includes/cron/vbtosourcebans.php
Also, you should not store the file in a publicly accessible place (i.e. outside public_html).

SanMan 09-21-2011 18:45

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. ;)

8088 09-21-2011 18:48

Re: Vbulletin 4.X Integration with Sourcebans! FINALLY HERE!
 
Quote:

Originally Posted by SanMAn (Post 1560482)
Yeah your right, but that is where most of them go that are ran from cron.

That's really bad.
Quote:

I was hoping that someone who knows the right path could post it. ;)
Uhm...it's your server, your file, your path. We are not psychic. How can you not know the path to a file that YOU put there?

What does your cronjob look like? And what happens when you execute it manually?

SanMan 09-22-2011 20:19

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.

8088 09-24-2011 20:36

Re: Vbulletin 4.X Integration with Sourcebans! FINALLY HERE!
 
Quote:

Originally Posted by SanMAn (Post 1561129)
from my first post I gave my path, so you really don't have to be a "psychic".. ;)

That path was a) relative and b) apparently wrong. Meanwhile, 'what does your cronjob look like?' remains unanswered.

SanMan 09-26-2011 16:52

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..

bobthebuilder 03-02-2012 04:34

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.