Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> PHP
Author Message
viper155
Regular
Regular



Joined: Feb 18, 2006
Posts: 99

PostPosted: Mon Mar 22, 2010 11:27 pm Reply with quote

I bought Cometchat the other day but I can't seem to get it to work on my phpnuke site. Has anyone out there been able to get it working?
[ Only registered users can see links on this board! Get registered or login! ]


Last edited by viper155 on Tue Mar 23, 2010 9:05 pm; edited 1 time in total 
View user's profile Send private message Visit poster's website
viper155







PostPosted: Tue Mar 23, 2010 8:54 pm Reply with quote

Issue resolved.
 
botanicar
New Member
New Member



Joined: Apr 15, 2006
Posts: 1

PostPosted: Sat Jun 12, 2010 5:34 pm Reply with quote

viper155 wrote:
Issue resolved.

Can you send PM how you fix it?

Regards
 
View user's profile Send private message
prekill
Worker
Worker



Joined: Oct 22, 2005
Posts: 201

PostPosted: Mon Aug 01, 2011 1:04 pm Reply with quote

did you edit the integration.php?

Can you please share?
 
View user's profile Send private message
killing-hours
RavenNuke(tm) Development Team



Joined: Oct 01, 2010
Posts: 438
Location: Houston, Tx

PostPosted: Mon Aug 01, 2011 6:57 pm Reply with quote

The instructions are fairly simple and straight forward.

Here are the instructions:
[ Only registered users can see links on this board! Get registered or login! ]

If you still have issues... I might be able to help you. (Have installed it on my web email client)

*** NOTE *** If you plan on having HEAVY traffic using it... make sure to set a cron job to clear the messages at an interval or your database with become massive with messages. Just an FYI

_________________
Money is the measurement of time - Me
"You can all go to hell…I’m going to Texas" -Davy Crockett 
View user's profile Send private message
prekill







PostPosted: Tue Aug 02, 2011 3:05 am Reply with quote

killing-hours can you please post the integration.php?

I have version 3.0.1.

I think I got mixed up very badly..

does we use session or cookie?

may I upload cometchat to modules/Chat? or it has to be /comechat?

this is my integration.php as it now:
Code:
<?php


/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

/* ADVANCED */

define('SET_SESSION_NAME','');         // Session name
define('DO_NOT_START_SESSION','1');      // Set to 1 if you have already started the session
define('DO_NOT_DESTROY_SESSION','0');   // Set to 1 if you do not want to destroy session on logout
define('SWITCH_ENABLED','1');      
define('INCLUDE_JQUERY','1');   
define('FORCE_MAGIC_QUOTES','0');
define('ADD_LAST_ACTIVITY','1');

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

/* DATABASE */
include_once dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . '/application/libraries/OFC/JSON.php';

if( !defined('_ENGINE_R_MAIN') ) {
  define('_ENGINE_R_CONF', true);
  define('_ENGINE_R_INIT', true);
  include_once dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'index.php';
}

// Create application, bootstrap, and run
$application = new Engine_Application(
  APPLICATION_ENV,
  array(
    'bootstrap' => array(
      'path' => APPLICATION_PATH . '/application/modules/' . APPLICATION_NAME . '/Bootstrap.php',
      'class' => ucfirst(APPLICATION_NAME) . '_Bootstrap',
    ),
    'autoloadernamespaces' => array(
      'Engine_',
    )
  )
);

Engine_Api::getInstance()->setApplication($application);
$application->getBootstrap()->bootstrap('frontcontroller');
$application->getBootstrap()->bootstrap('cache');
$application->getBootstrap()->bootstrap('db');
$application->getBootstrap()->bootstrap('frontcontrollermodules');
$application->getBootstrap()->bootstrap('session');
$application->getBootstrap()->bootstrap('manifest');
$application->getBootstrap()->bootstrap('router');
$application->getBootstrap()->bootstrap('view');
$application->getBootstrap()->bootstrap('modules');

// by TrioxX
if(!defined('_ENGINE')) {
   define('_ENGINE','1');
}

$db = include dirname(dirname(__FILE__)).DIRECTORY_SEPARATOR."application/settings/database.php";

// DO NOT EDIT DATABASE VALUES BELOW
// DO NOT EDIT DATABASE VALUES BELOW
// DO NOT EDIT DATABASE VALUES BELOW

define('DB_SERVER',               $db['params']['host']);
define('DB_PORT',               '3306');
define('DB_USERNAME',            $db['params']['username']);
define('DB_PASSWORD',            $db['params']['password']);
define('DB_NAME',               $db['params']['dbname']);
define('TABLE_PREFIX',            $db['tablePrefix']);
define('DB_USERTABLE',            'users');
define('DB_USERTABLE_NAME',         'displayname');
define('DB_USERTABLE_USERID',      'user_id');
define('DB_USERTABLE_LASTACTIVITY',   'lastactivity');

/*
// Hardcode the following:
define('DB_SERVER',               'localhost');
define('DB_PORT',               '3306');
define('DB_USERNAME',            '');
define('DB_PASSWORD',            '');
define('DB_NAME',               '');
define('TABLE_PREFIX',            'engine4_');
define('DB_USERTABLE',            'users');
define('DB_USERTABLE_NAME',         'displayname');
define('DB_USERTABLE_USERID',      'user_id');
define('DB_USERTABLE_LASTACTIVITY',   'lastactivity');

*/
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

/* FUNCTIONS */
/*
function getUserID() {
   $userid = 0;

   $sql="select user_id from engine4_core_session where id ='".$_COOKIE['PHPSESSID']."'";
   if(mysql_query($sql)){
   $row=mysql_fetch_array(mysql_query($sql));
   $userid=$row['user_id'];
   }
   return $userid;
}
*/
function getUserID() {
   $userid = 0;
   
   $userid = Engine_Api::_()->user()->getViewer()->getIdentity();

   return $userid;
}

function getFriendsList($userid,$time) {
   $sql = ("select ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_USERID." userid, ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_NAME." username, ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_LASTACTIVITY." lastactivity,(select storage_path from ".TABLE_PREFIX."storage_files where type = 'thumb.icon' and parent_file_id = ".TABLE_PREFIX.DB_USERTABLE.".photo_id) avatar, ".TABLE_PREFIX.DB_USERTABLE.".username link, cometchat_status.message, cometchat_status.status from   ".TABLE_PREFIX."user_membership join ".TABLE_PREFIX."users  on ".TABLE_PREFIX."user_membership.user_id = ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_USERID." left join cometchat_status on ".TABLE_PREFIX.DB_USERTABLE.".user_id = cometchat_status.userid where ".TABLE_PREFIX."user_membership.resource_id = '".mysql_real_escape_string($userid)."' and active = 1 order by username asc");

   if (defined('DISPLAY_ALL_USERS') && DISPLAY_ALL_USERS == 1) {
      $sql = ("select ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_USERID." userid, ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_NAME." username, ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_LASTACTIVITY." lastactivity,(select storage_path from ".TABLE_PREFIX."storage_files where type = 'thumb.icon' and parent_file_id = ".TABLE_PREFIX.DB_USERTABLE.".photo_id) avatar, ".TABLE_PREFIX.DB_USERTABLE.".username link, cometchat_status.message, cometchat_status.status from   ".TABLE_PREFIX."users   left join cometchat_status on ".TABLE_PREFIX.DB_USERTABLE.".user_id = cometchat_status.userid where ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_USERID." <> '".mysql_real_escape_string($userid)."' and ('".$time."'-".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_LASTACTIVITY." < '".((ONLINE_TIMEOUT)*2)."') order by username asc");

   }

   return $sql;
}

function getUserDetails($userid) {
   $sql = ("select ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_USERID." userid, ".TABLE_PREFIX."users.".DB_USERTABLE_NAME." username, ".TABLE_PREFIX."users.".DB_USERTABLE_LASTACTIVITY." lastactivity,  ".TABLE_PREFIX.DB_USERTABLE.".username link, (select storage_path from ".TABLE_PREFIX."storage_files where type = 'thumb.icon' and parent_file_id = ".TABLE_PREFIX.DB_USERTABLE.".photo_id) avatar, cometchat_status.message, cometchat_status.status from ".TABLE_PREFIX."users left join cometchat_status on ".TABLE_PREFIX."users.user_id = cometchat_status.userid where ".TABLE_PREFIX."users.user_id = '".mysql_real_escape_string($userid)."'");
   return $sql;
}

function updateLastActivity($userid) {
   $sql = ("update `".TABLE_PREFIX.DB_USERTABLE."` set ".DB_USERTABLE_LASTACTIVITY." = '".getTimeStamp()."' where ".DB_USERTABLE_USERID." = '".mysql_real_escape_string($userid)."'");
   return $sql;
}

function getUserStatus($userid) {
    $sql = ("select ".TABLE_PREFIX."users.status message, cometchat_status.status from ".TABLE_PREFIX."users left join cometchat_status on ".TABLE_PREFIX."users.user_id = cometchat_status.userid where ".TABLE_PREFIX."users.user_id = '".mysql_real_escape_string($userid)."'");
    return $sql;
}

function getLink($link) {
   return BASE_URL."../profile/".$link;
}

function getAvatar($image) {
   if (is_file(dirname(dirname(__FILE__))."/".$image)) {
      return BASE_URL."../".$image;
   } else {
      return BASE_URL."../application/modules/User/externals/images/nophoto_user_thumb_profile.png";
   }
}


function getTimeStamp() {
   return time();
}

function processTime($time) {
   return $time;
}

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

/* HOOKS */

function hooks_statusupdate($userid,$statusmessage) {
   $sql = ("update ".TABLE_PREFIX."users set status = '".mysql_real_escape_string($statusmessage)."', status_date = '".getTimeStamp()."' where user_id = '".mysql_real_escape_string($userid)."'");
    $query = mysql_query($sql);
}

function hooks_forcefriends() {
   
}

function hooks_activityupdate($userid,$status) {

}

function hooks_message($userid,$unsanitizedmessage) {
   
}

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

/* LICENSE */

$p_ = 4;

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////



Thanks
 
killing-hours







PostPosted: Tue Aug 02, 2011 7:12 am Reply with quote

prekill wrote:
may I upload cometchat to modules/Chat? or it has to be /comechat?


No... cometchat needs to reside in the "ROOT" directory (i.e. public_html) I tried putting it in the modules directory as well... but it messes up the internal linking of cometchat.


prekill wrote:
can you please post the integration.php?


I forget what version my cometchat is... but I believe it's older than yours. Also, I had to modify some parts of it to work with my mail client so it's not a good idea to use mine anyhow. Use the integration.php that came with the package.

prekill wrote:
does we use session or cookie?


I would use session if possible because it will load them into the bar instantly. If you use the cookie method (which had to do on my email client)... what happens is the "FIRST" time someone logs in... it will not log them into the bar. They would have to refresh the page to show up in the chat bar.
 
prekill







PostPosted: Wed Aug 03, 2011 10:57 am Reply with quote

I found the following for dragonfly:

any way to convert it over to ravenuke?

Code:
<?php


   /*
    * Config File for Cometchat 1.60
    * for DragonFlyCMS.org 9.22
    *
    * This File Comes with No warranty.
    * Version: 1.0
    * Jun 21 2010
    * Author: [ Only registered users can see links on this board! Get registered or login! ]
    *
    *
    *
    *
    *
    *
    * Set your path to the dragon fly installation base dir
    * Dont forget the trailing SLASH
    * */
   $dragonfly_path ='/home/sitename/public_html/';
   define('XMLFEED', 1);
   require_once($dragonfly_path.'includes/cmsinit.inc');
   require_once($dragonfly_path.'includes/classes/security.php');
   require_once($dragonfly_path.'includes/classes/session.php');
   require_once($dragonfly_path.'includes/classes/cpg_member.php');

   unset($dragonfly_path);
   global $dbhost,$dbname, $dbuname,$dbuname,$prefix, $user_prefix,$CensorList, $SESS,$MAIN_CFG;
   
   $CPG_SESS = array();
   $SESS =& new cpg_session();
   $CLASS['member'] =& new cpg_member();
   $userinfo =& $_SESSION['CPG_USER'];

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

/* BASE URL */

//define('BASE_URL','cometchat/');
define('BASE_URL','/cometchat/');

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
unset($language);
/* LANGUAGE */

$language[0]   =   "CometChat Options";
$language[1]   =   "Type your status and hit the enter key!";
$language[2]   =   "My Status";
$language[3]   =   "Available";
$language[4]   =   "Busy";
$language[5]   =   "Invisible";
$language[6]   =   "Add Friend";
$language[7]   =   '<a href="Member_List.html">Add more friends</a>';
$language[8]   =   "Please login to use CometChat";
$language[9]   =   "Who\'s Online";
$language[10]   =   "Me";
$language[11]   =   "Go Offline";
$language[12]   =   "Who\'s Online";
$language[13]   =   "Disable sound notifications";
$language[14]   =   "You have no friends in your friend list, please add a few friends to use chat";
$language[15]   =   "New Messages...";
$language[16]   =   'Your_Account.html'; // Login link when user clicks on yellow triangle (specify only link i.e. http://yoursite.com/login.php)
$language[17]   =   "Offline";

$status['available']   =   "I'm available";
$status['busy']         =   "I'm busy";
$status['offline']      =   "I'm offline";
$status['invisible']   =   "I'm offline";

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

/* ICONS */

$trayicon[] = array('home.png','Home','/');
$trayicon[] = array('chatrooms.png','Chatrooms',BASE_URL.'modules/chatrooms/index.php','_popup','500','300');
$trayicon[] = array('themechanger.png','Change theme',BASE_URL.'modules/themechanger/index.php','_popup','200','100');
$trayicon[] = array('games.png','Single Player Games',BASE_URL.'modules/games/index.php','_popup','650','490');
$trayicon[] = array('share.png','Share This Page','http://www.addthis.com/bookmark.php','_popup','480','400');
$trayicon[] = array('translate.png','Translate This Page',BASE_URL.'modules/translate/index.php','_popup','300','200');
//$trayicon[] = array('twitter.png','Twitter',BASE_URL.'modules/twitter/index.php','_popup','500','300');
//$trayicon[] = array('facebook.png','Facebook Fan Page',BASE_URL.'modules/facebook/index.php','_popup','500','470');

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

/* PLUGINS */

$plugins = array(

   'filetransfer',
   'divider',
   'clearconversation',
   'chathistory',
   'chattime',
   'games',
   'handwrite'

);

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

/* SMILEYS */

$smileys = array(

   ':)'   =>   'smiley',
   ':-)'   =>   'smiley',
   ':('   =>   'smiley-sad',
   ':-('   =>   'smiley-sad',
   ':D'   =>   'smiley-lol',
   ';-)'   =>   'smiley-wink',
   ';)'   =>   'smiley-wink',
   ':o'   =>   'smiley-surprise',
   ':-o'   =>   'smiley-surprise',
   '8-)'   =>   'smiley-cool',
   '8)'   =>   'smiley-cool',
   ':|'   =>   'smiley-neutral',
   ':-|'   =>   'smiley-neutral',
   ":'("   =>   'smiley-cry',
   ":'-("   =>   'smiley-cry',
   ":p"   =>   'smiley-razz',
   ":-p"   =>   'smiley-razz',
   ":s"   =>   'smiley-confuse',
   ":-s"   =>   'smiley-confuse',
   ":x"   =>   'smiley-mad',
   ":-x"   =>   'smiley-mad',

);

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

/* BANNED WORDS */
$bannedWords = array();
$bannedWords = $CensorList;

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

/* ADMIN */

define('ADMIN_USER','AdminChat');
define('ADMIN_PASS','AdminChatPass');

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

/* COOKIE */

$cookiePrefix = 'cc_';            // Modify only if you have multiple CometChat instances on the same site

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

/* THEME */

$theme = 'default';               // Default theme, if no cookie preference is found


if (!empty($_COOKIE[$cookiePrefix."theme"])) {
        $theme = $_COOKIE[$cookiePrefix."theme"];
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

/* MISCELLANEOUS */

$autoPopupChatbox = 1;            // Auto-open chatbox when a new message arrives
$messageBeep = 0;               // Beep on arrival of new messages (user can over-ride this setting)
$minHeartbeat = 3000;            // Minimum poll-time
$maxHeartbeat = 12000;            // Maximum poll-time
define('REFRESH_BUDDYLIST','60');   // Time in seconds after which the user's "Who's Online" list is refreshed
define('ONLINE_TIMEOUT','180');      // Time in seconds after which a user is considered offline
define('DISABLE_SMILEYS','0');      // Set to 1 if you want to disable smileys
define('DISABLE_LINKING','0');      // Set to 1 if you want to disable auto linking
define('DISABLE_YOUTUBE','0');      // Set to 1 if you want to disable YouTube thumbnail

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

/* ADVANCED */

define('DEV_MODE','0');               // Set to 1 only during development
define('ERROR_LOGGING','0');         // Set to 1 to log all errors (error.log file)
define('SET_SESSION_NAME','');         // Session name
define('DO_NOT_START_SESSION','0');      // Set to 1 if you have already started the session
define('DO_NOT_DESTROY_SESSION','0');   // Set to 1 if you do not want to destroy session on logout

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

/* DATABASE */
define('DB_SERVER',$dbhost);
define('DB_PORT',               '3306'                           );
define('DB_USERNAME',$dbuname);
define('DB_PASSWORD',$dbpass);
define('DB_NAME',$dbname);
define('TABLE_PREFIX',$prefix.'_');
define('DB_USERTABLE','users');
define('DB_USERTABLE_NAME',         'username'                        );
define('DB_USERTABLE_USERID',      'user_id'                        );
define('DB_USERTABLE_LASTACTIVITY',   'user_session_time'                     );


/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

/* FUNCTIONS */

function getUserID() {
   $usrid = is_user() ? is_user() : 0;
   return $usrid;
}


function getFriendsList($userid,$time) {
   $userid = intval($userid);
   
   /* This generates a user list based n the nuke_session table, aka users online
    * comment this line to use the friendlist provided by Buddys Module.    
    */
   $sql = ("select DISTINCT ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_USERID." userid, ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_NAME." username, ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_LASTACTIVITY." lastactivity, ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_USERID." avatar, ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_USERID." link, cometchat_status.message, cometchat_status.status from ".TABLE_PREFIX."session join ".TABLE_PREFIX.DB_USERTABLE." on  ".TABLE_PREFIX."session.uname = ".TABLE_PREFIX.DB_USERTABLE.".username left join cometchat_status on ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_USERID." = cometchat_status.userid where ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_USERID." != '".mysql_real_escape_string($userid)."' order by username asc");
   /*
    * un comment this line to use the friendlist provided by the Buddys Module. */
   //$sql = ("select DISTINCT ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_USERID." userid, ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_NAME." username, ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_LASTACTIVITY." lastactivity, ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_USERID." avatar, ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_USERID." link, cometchat_status.message, cometchat_status.status from ".TABLE_PREFIX."buddys join ".TABLE_PREFIX.DB_USERTABLE." on  ".TABLE_PREFIX."buddys.user_id = ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_USERID." left join cometchat_status on ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_USERID." = cometchat_status.userid where ".TABLE_PREFIX."buddys.buddy_id = '".mysql_real_escape_string($userid)."' order by username asc");
   
   return $sql;
}

function getUserDetails($userid) {
   $userid = intval($userid);
   $sql = ("select ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_USERID." userid, ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_NAME." username, ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_LASTACTIVITY." lastactivity,  ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_USERID." link,  ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_USERID." avatar, cometchat_status.message, cometchat_status.status from ".TABLE_PREFIX.DB_USERTABLE." left join cometchat_status on ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_USERID." = cometchat_status.userid where ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_USERID." = '".mysql_real_escape_string($userid)."'");
   return $sql;
}

function updateLastActivity($userid) {
   $userid = intval($userid);
   
   //$sql = ("update `".TABLE_PREFIX.DB_USERTABLE."` set ".DB_USERTABLE_LASTACTIVITY." = '".getTimeStamp()."' where ".DB_USERTABLE_USERID." = '".mysql_real_escape_string($userid)."'");
   
   
   $sql = ("update ".TABLE_PREFIX.DB_USERTABLE.", ".TABLE_PREFIX."session set ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_LASTACTIVITY." = '".gmtime()."', ".TABLE_PREFIX."session.time = '".gmtime()."' where ".DB_USERTABLE_USERID." = '".$userid."' AND ".TABLE_PREFIX.DB_USERTABLE.".username = ".TABLE_PREFIX."session.uname");

   return $sql;
}

function getUserStatus($userid) {
    $userid = intval($userid);
    $sql = ("select cometchat_status.message, cometchat_status.status from cometchat_status where userid = '".mysql_real_escape_string($userid)."'");
    return $sql;
}

/* GETLINK() CHANGES   
 *
 * To Avoid conflicts with DF getlink() function
 *  you should edit:
 *
 *  /cometchat/cometchat_receive.php
 * find (about line 199)
 * $link = getLink($chat['link']);
 *
 * and change it to
 * $link = cc_getLink($chat['link']);
 *
 * repeat with
 * /cometchat/cometchat_getid.php
 *
 * find : (about line 83)
 * $link = getLink($chat['link']);
 *
 * and change it to:
 * $link = cc_getLink($chat['link']);
 *
 *
 *
 * function getLink($link) {
    return 'users.php?id='.$link;
}
* */
function cc_getLink($link) {
   return getlink('Your_Account&amp;profile='.intval($link).'');
   }
   
   
function getAvatar($image) {
   global $MAIN_CFG;
   $avatar_info = getusrdata(intval($image),'user_avatar,user_allowavatar,user_avatar_type');

    if ($avatar_info['user_avatar'] && $avatar_info['user_avatar_type'] && $avatar_info['user_allowavatar']) {
      switch($avatar_info['user_avatar_type']){
         case "1":
            $avatar_tag = $MAIN_CFG['avatar']['path'].'/'.$avatar_info['user_avatar'];
            break;
         case "2":
            $avatar_tag = $avatar_info['user_avatar'];
            break;
         case "3":
            $avatar_tag = $MAIN_CFG['avatar']['gallery_path'].'/'.$avatar_info['user_avatar'];
            break;
      }
   }
   else {$avatar_tag = $MAIN_CFG['avatar']['path'].'/'.$MAIN_CFG['avatar']['default'];}
   return $avatar_tag;
}


function getTimeStamp() {
   return time();
}

function processTime($time) {
   return $time;
}

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

/* HOOKS */

function hooks_statusupdate($userid,$statusmessage) {
   
}

function hooks_forcefriends() {
   
}

function hooks_activityupdate($userid,$status) {

}

function hooks_message($userid,$unsanitizedmessage) {
   
}

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 
killing-hours







PostPosted: Wed Aug 03, 2011 11:00 am Reply with quote

You need the "standalone" version of cometchat. No need to convert it at that point... just the necessary columns to the database.

Also, the version you provided (1.60) is highly outdated. According to their site... they are in version "3" and don't show support for dragonfly anywhere in the documentation.
 
prekill







PostPosted: Wed Aug 03, 2011 3:50 pm Reply with quote

I know, I bought version 3.0.1 but I need in integration.php to define the following functions:

getUserID()
getFriendsList()
getLink($link)

and I have no idea how to rewrite those to work with ravenuke login.

now I can see the bar but everyone see the same bar with the same userid.

The file for dragonfly have those functions set right but its not working, something needs to be different.

any help with those maybe?

should I include a file? mainfile.php maybe? cookiecheck.php under youraccount?

Thanks Smile
 
killing-hours







PostPosted: Wed Aug 03, 2011 3:54 pm Reply with quote

Give me a some time... I'll take a look at it.
 
prekill







PostPosted: Wed Aug 03, 2011 11:54 pm Reply with quote

Thank you my friend, I will stay tuned.
 
kenno
Worker
Worker



Joined: Jul 26, 2009
Posts: 117
Location: Scunthorpe, UK

PostPosted: Sat Aug 06, 2011 7:53 am Reply with quote

I am also interested in buying cometchat and would be very interested in getting this working with Ravennuke.

Please share if you get this working

Thanks Kenno
 
View user's profile Send private message
killing-hours







PostPosted: Mon Aug 08, 2011 9:32 am Reply with quote

Don't worry... I've finally setup a dev server at my home so I can toy with things as well as developing for RN. The first thing I'm doing is writing up step by step instructions on how to install cometchat to work with our favorite CMS.

Bout half way through it now so just hang with me. Smile
 
kenno







PostPosted: Mon Aug 08, 2011 4:53 pm Reply with quote

Thats great news

Thank you for doing this, I will purchase the software now I think Very Happy
 
prekill







PostPosted: Tue Aug 09, 2011 5:29 am Reply with quote

Hanging hard! Wink
 
killing-hours







PostPosted: Tue Aug 09, 2011 11:22 am Reply with quote

ok... I've semi-built and semi-tested an ad-hoc bridge for cometchat but here's the catch... if you want to use the "friends list" function (i.e. only showing friends of friends instead of everyone who is logged in to everyone) it requires you to setup your database differently and manually edit the database per the instructions on cometchat website.

Here's my warning... if you are wanting to use the friends list functionality... you're going to be making LOTS of manual changes to the database in order to establish the FRIEND ---> FRIEND connections. This can be overcome though... with an added backend GUI in Ravennuke so that you can point and click. (this however, is further than I'm willing to go free of charge)

The getlink() function gets to the FORUMS profile exactly like the site info block does. I'm not keen on doing this because it ties cometchat directly to the forums. I'm not big on making (A) reliant on (B).

The getAvatar() function needs to be re-written to use RN avatars (or a totally seperate avatar directory)... however, I'm not willing to do this one free of charge either because (A) I don't know what size the avatar should be (B) I don't know how this function works yet (C) I just don't have the time to figure it all out, write the new function & test it all.

So I ask you two... how do you plan on using this on your websites?

As it stands now... cometchat works as EVERYONE to EVERYONE with support for links (forum user profiles) & no support for avatars (user images).

All of this is based on RN 2.40.01 & cometchat 2.0.4 (that is the version I have) The intergration should be about the same anyhow.
 
prekill







PostPosted: Wed Aug 10, 2011 4:49 am Reply with quote

Will it work even for version 3.01?

in version 3.01 what they did is simple, they have integration.php which needs to include all those functions.

Well.. i'm ready to give it a shoot with everyone to everyone and see how it goes..

umm I think forum profile is better, this is what I use actually..

Sounds good Smile
 
killing-hours







PostPosted: Wed Aug 10, 2011 7:08 am Reply with quote

It's basically the same setup (integration.php). Version 2.0.4 has the same functions as part of the integration.

I'll write up the steps either later today or tomorrow. And just an FYI... I believe the version you posted is for Social Engine if I'm not mistaken.
 
kenno







PostPosted: Wed Aug 10, 2011 1:08 pm Reply with quote

killing-hours wrote:
ok... I've semi-built and semi-tested an ad-hoc bridge for cometchat but here's the catch... if you want to use the "friends list" function (i.e. only showing friends of friends instead of everyone who is logged in to everyone) it requires you to setup your database differently and manually edit the database per the instructions on cometchat website.

Here's my warning... if you are wanting to use the friends list functionality... you're going to be making LOTS of manual changes to the database in order to establish the FRIEND ---> FRIEND connections. This can be overcome though... with an added backend GUI in Ravennuke so that you can point and click. (this however, is further than I'm willing to go free of charge)

The getlink() function gets to the FORUMS profile exactly like the site info block does. I'm not keen on doing this because it ties cometchat directly to the forums. I'm not big on making (A) reliant on (B).

The getAvatar() function needs to be re-written to use RN avatars (or a totally seperate avatar directory)... however, I'm not willing to do this one free of charge either because (A) I don't know what size the avatar should be (B) I don't know how this function works yet (C) I just don't have the time to figure it all out, write the new function & test it all.

So I ask you two... how do you plan on using this on your websites?

As it stands now... cometchat works as EVERYONE to EVERYONE with support for links (forum user profiles) & no support for avatars (user images).

All of this is based on RN 2.40.01 & cometchat 2.0.4 (that is the version I have) The intergration should be about the same anyhow.



Wow!!!

This is brilliant mate, again thank you for taking your valuable time up on completing this.

I am fine with the lack of avatar function, but would of been interested in the friends --- to friends ability.
What do you mean by this part

Quote:

This can be overcome though... with an added backend GUI in Ravennuke so that you can point and click
how and where would the end users add and choose the other users they are to be friends with ?
Out of interest how much would you be wanting to implement this feature ?

I am in the future thinking of using either phpbb3 stand alone with a bridge, or maybe the module that I have heard trickedoutnews are maybe going to work on, I believe phpbb3 has a friends and foes feature built in, would that effect this, or maybe be able to work better with this ?
As if it works better then I will wait and maybe ask and pay you to make the changes then if you wanted to take that on that is?

Again thank you for doing this, and I look forward to the install guide.

Thanks Kenno
 
killing-hours







PostPosted: Wed Aug 10, 2011 1:18 pm Reply with quote

kenno wrote:
how and where would the end users add and choose the other users they are to be friends with ?
Out of interest how much would you be wanting to implement this feature ?


The reason for this is because of the way CometChat implements the friends list feature. In order for it to work... a table has to be setup on the database and a two way link must be established within that table between the two users.

Quote:
Update Who’s Online list fetching mechanism

We modify the getFriendsList() function.

The getFriendsList() function returns all the users’ details part of the Who’s Online list. This list need not necessarily be friends of the logged in user. It may simply be all online users instead. You can customize this to return any set of users.

The default configuration assumes that you have a table called friends with the following fields:

toid integer
fromid integer

All entries are assumed to be two-way i.e. if user A (id:1) and user B (id:2) are friends, then there will be two entries in the table:

----------------------------
id toid fromid
----------------------------
13 1 2
14 2 1
----------------------------


So in order to make these changes to the database... (A) The user would need some sort of access to the database in order to assign/remove their friends (B) An entire system must be designed to keep user X from altering users Y's list etc etc etc. It just becomes a huge headache unless the admin will become the sole arbiter between the users at which point the headache is passed to the admin.

As far as the phpbb3 stuff... I don't know because I don't fool with forums nor run any. That is beyond the scope of my understanding.
 
kenno







PostPosted: Wed Aug 10, 2011 1:31 pm Reply with quote

Right I see what you mean now, yes that would become a head ache and I would not wish to be the admin who takes on the responsibility of adding on request friends.

It would of been a nice feature but I can see it would require a lot of work from scratch implementing and getting this to work.

I am sure in the phpbb3 forum profile area they have a friend and foe section where users can choose there friends so in essence that area you talked about where users would need an area with access to the database to make these choices might be already built in phpbb3.

**Edit**

Infact look here, cometchat comes with a prebuilt integration for phpbb3 and says can use the friends feature of that, so I guess that answers my question.
[ Only registered users can see links on this board! Get registered or login! ]


Last edited by kenno on Wed Aug 10, 2011 1:34 pm; edited 1 time in total 
killing-hours







PostPosted: Wed Aug 10, 2011 1:34 pm Reply with quote

Very well could be. I don't know anything about phpbb so I can't say with confidence. If it already has a friends list type thing built in... why use CometChat???
 
kenno







PostPosted: Wed Aug 10, 2011 1:35 pm Reply with quote

I edited my post above
I am not sure what the friends list is for in phpbb3, but it does not come with a chat feature like CometChat
 
killing-hours







PostPosted: Wed Aug 10, 2011 1:38 pm Reply with quote

Yes...when you get CometChat... make sure to get the phpbb3 version and you won't need this tutorial to set it up. It's already pre-configured to work with phpbb3. The tutorial I'm writing only covers using CometChat with Ravennuke CMS.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> PHP

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©