What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal
RebornBuddy Forums

Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

[BuddyCon] Self Hosting

thalord

Community Developer
Joined
Apr 24, 2011
Messages
651
Same as BuddyCon but with own Hosting support

TODO: write more infos here ^^

Git: https://github.com/buddycon/BuddyCon-Server


A very nice PDF with installation instructions was written by crypt3x. Thanks for that ;):

To add Server:
The Plugin already sent that (you use BuddyCon1?). you need to add a server column to the bot table. And then in the ApiController.php add
ApiController::$dataArr['server'] =$_POST['server'];
after line 82

And change that:
PHP:
                $sql = 'SELECT id,do,wantscreen FROM bot WHERE user_id = :user AND name = :name';
                $command=$connection->createCommand($sql);
                $command->bindValue(":user",$user_id);
                $command->bindValue(":name",$_POST['name']);
to that:
PHP:
                $sql = 'SELECT id,do,wantscreen FROM bot WHERE user_id = :user AND name = :name AND server = :server';
                $command=$connection->createCommand($sql);
                $command->bindValue(":user",$user_id);
                $command->bindValue(":name",$_POST['name']);
                $command->bindValue(":server",$_POST['server']);
warning: After that the old bots will not be updated (if you doenst add the server to every bot in the bot table manually)

Then at /views/bot/index.php
Add:
array('name'=>'server', 'header'=>'Server'),
after line 34.
That should do it!
 

Attachments

Last edited:
i still will marrie you :) (u know what mean ;))
Very very nice, i'll try it tomorrow :)
 
Getting this error, did everything correct via the manual.


Code:
 The table "user" for active record class "User" cannot be found in the database.

/home/sites/site744/web/hb/buddycon/yii/framework/yiilite.php(7786)

7774 class CActiveRecordMetaData
7775 {
7776     public $tableSchema;
7777     public $columns;
7778     public $relations=array();
7779     public $attributeDefaults=array();
7780     private $_model;
7781     public function __construct($model)
7782     {
7783         $this->_model=$model;
7784         $tableName=$model->tableName();
7785         if(($table=$model->getDbConnection()->getSchema()->getTable($tableName))===null)
7786             throw new CDbException(Yii::t('yii','The table "{table}" for active record class "{class}" cannot be found in the database.',
7787                 array('{class}'=>get_class($model),'{table}'=>$tableName)));
7788         if($table->primaryKey===null)
7789         {
7790             $table->primaryKey=$model->primaryKey();
7791             if(is_string($table->primaryKey) && isset($table->columns[$table->primaryKey]))
7792                 $table->columns[$table->primaryKey]->isPrimaryKey=true;
7793             else if(is_array($table->primaryKey))
7794             {
7795                 foreach($table->primaryKey as $name)
7796                 {
7797                     if(isset($table->columns[$name]))
7798                         $table->columns[$name]->isPrimaryKey=true;
 
Getting this error, did everything correct via the manual.


Code:
 The table "user" for active record class "User" cannot be found in the database.

/home/sites/site744/web/hb/buddycon/yii/framework/yiilite.php(7786)

7774 class CActiveRecordMetaData
7775 {
7776     public $tableSchema;
7777     public $columns;
7778     public $relations=array();
7779     public $attributeDefaults=array();
7780     private $_model;
7781     public function __construct($model)
7782     {
7783         $this->_model=$model;
7784         $tableName=$model->tableName();
7785         if(($table=$model->getDbConnection()->getSchema()->getTable($tableName))===null)
7786             throw new CDbException(Yii::t('yii','The table "{table}" for active record class "{class}" cannot be found in the database.',
7787                 array('{class}'=>get_class($model),'{table}'=>$tableName)));
7788         if($table->primaryKey===null)
7789         {
7790             $table->primaryKey=$model->primaryKey();
7791             if(is_string($table->primaryKey) && isset($table->columns[$table->primaryKey]))
7792                 $table->columns[$table->primaryKey]->isPrimaryKey=true;
7793             else if(is_array($table->primaryKey))
7794             {
7795                 foreach($table->primaryKey as $name)
7796                 {
7797                     if(isset($table->columns[$name]))
7798                         $table->columns[$name]->isPrimaryKey=true;
But you putted buddy.sql in your db?
 
i created 2 already, both didn't work.

could you maybe upload a main.php with the db name buddycon, maybe i put it in the wrong position
 
'db'=>array(
'connectionString' => 'mysql:host=localhost;dbname=database',
'emulatePrepare' => true,
'username' => 'user',
'password' => 'pass',
'charset' => 'utf8',
),

RED: Database name

so for a server where the db name is buddycon it would be
'connectionString' => 'mysql:host=localhost;dbname=buddycon',
 
I have the site located on a subdomain of the real site.
'connectionString' => 'mysql:host=localhost;dbname=buddycon', Does that need to be different then?
 
I have the site located on a subdomain of the real site.
'connectionString' => 'mysql:host=localhost;dbname=buddycon', Does that need to be different then?
normally not. localhost is the ip of the server. And it seems that not the connectiong is the problem its just a db where is no table user ...
 
Nevermind, got it working now.

I used capital letters in my db password, after i changed that it worked perfectly.

thanks
 
Any clues if i can setup this on a free webhost? Someone knows one or have i to buy webspace?
 
Meh, installed fine etc... but upon login it says
Incorrect username or password hmm
 
Meh, installed fine etc... but upon login it says
Incorrect username or password hmm
You created a new user @ index.ph?r=user/create?
If you have i have too look at it ... mybe sent me your url per pm
 
You created a new user @ index.ph?r=user/create?
If you have i have too look at it ... mybe sent me your url per pm

Crap, that fixed it...

I tried logging in with my buddycon.eu acc but had to make a new one since db is on my server =]

Ty for ur fast response.
 
Parse error: syntax error, unexpected T_FUNCTION in **/BuddyCon/protected/views/bot/index.php on line 21

User creation was working fine. Also created the api key, but the bot index isn't working :(
 
Parse error: syntax error, unexpected T_FUNCTION in **/BuddyCon/protected/views/bot/index.php on line 21

User creation was working fine. Also created the api key, but the bot index isn't working :(
Could you post the line? Im on a different version
 
- 3079220 -

edit: 2 bots, 4 failures (4 entries)
Error?! Please post this to the author: 11 - 16308 -
Error?! Please post this to the author: 9 - 3079408 -
Error?! Please post this to the author: 12 - 16308 -
Error?! Please post this to the author: 10 - 3079408 -


seems to be a plugin issue. the plugin "disables" itself in the HB gui, but is still enabled. so you cannot disable it.
 
Last edited:
Back
Top