jhuberus
After Dark Torrents
Member since 28-11-2012
Total Posts272
Likes Received155
GenderMale
Member since 28-11-2012
Total Posts272
Likes Received155
GenderMale
Hey so i ran across the thing called arrow chat i used there free trial bit found here
I really would like to use this the problems i am having is it connecting right to the database or something because on basic install and on config is this which i correctly installed because it worked so somewhere between the config folder below
If anyone can please with it and get this working I will pay a decent price as i do not want to pay 300$ for a professional install thanks
I really would like to use this the problems i am having is it connecting right to the database or something because on basic install and on config is this which i correctly installed because it worked so somewhere between the config folder below
Expand
Code:
<?php
/*
|| #################################################################### ||
|| # ArrowChat # ||
|| # ---------------------------------------------------------------- # ||
|| # Copyright ©2010-2012 ArrowSuites LLC. All Rights Reserved. # ||
|| # This file may not be redistributed in whole or significant part. # ||
|| # ---------------- ARROWCHAT IS NOT FREE SOFTWARE ---------------- # ||
|| # http://www.arrowchat.com | http://www.arrowchat.com/license/ # ||
|| #################################################################### ||
*/
// Require any necessary external files for retrieving the user's session
/**
* The database information
*
* Your existing users and information should already be in this database. Do NOT create
* a new database for ArrowChat.
*/
define('DB_SERVER','localhost');
define('DB_USERNAME','username');
define('DB_PASSWORD','password');
define('DB_NAME','databasename');
/**
* The table prefix can be left blank. A quick example of what you should input here:
*
* Example - Pretend the following list are tables:
* phpbb_friends
* phpbb_threads
* phpbb_users
*
* In the example above, the prefix would be phpbb_ because everything starts with it.
*
* Example - Pretend the following list are tables:
* friends
* threads
* users
*
* In the example above, the prefix would be blank.
*/
define('TABLE_PREFIX','tsue_');
/**
* These variables will help automatically connect your existing website with ArrowChat. Please
* review the descriptions below to better understand them. DO NOT INCLUDE THE PREFIX WITH THESE
* VALUES!
*
* DB_USERTABLE = The name of the user's table
* DB_USERTABLE_USERID = The field for the user ID in the user's table
* DB_USERTABLE_NAME = The field for the username in the user's table
* DB_USERTABLE_AVATAR = The field for the avatar (input the user ID field if none exists)
*
* DB_FRIENDSTABLE = (Optional) The name of the friend's table
* DB_FRIENDSTABLE_USERID = (Optional) The field for the user ID in the friend's table
* DB_FRIENDSTABLE_FRIENDID = (Optional) The field for the relationship/friend ID in the firned's table
* DB_FRIENDSTABLE_FRIENDS = (Optional) The field to check if the users are friends
*
* All the friends stuff is optional. If your site does not have a friend's system, leave the
* values blank and change the no friend system value.
*/
define('DB_USERTABLE','members');
define('DB_USERTABLE_NAME','membername');
define('DB_USERTABLE_USERID','memberid');
define('DB_USERTABLE_AVATAR','memberid');
define('DB_FRIENDSTABLE','');
define('DB_FRIENDSTABLE_USERID', '');
define('DB_FRIENDSTABLE_FRIENDID', '');
define('DB_FRIENDSTABLE_FRIENDS', '');
/**
* Friend System
*
* If your website does not have a friend system (ex: you want to display all online users) then
* change the value below from 0 to 1.
*/
define('NO_FREIND_SYSTEM', '0');
/**
* MSSQL Database
*
* If your database is MSSQL then change the value below from 0 to 1.
*/
define('MSSQL_DATABASE', '0');
// DO NOT EDIT BELOW THIS POINT
// Initiate a connection to the database
if (MSSQL_DATABASE == 1)
$db = new QuickMSDB(DB_SERVER, DB_USERNAME, DB_PASSWORD, DB_NAME, false, false);
else
$db = new QuickDB(DB_SERVER, DB_USERNAME, DB_PASSWORD, DB_NAME, false, false);
?>
or somewhere in the integration folder is not working properly
Expand
Code:
<?php
//require('/home/torrenta/public_html/library/init/init.php');
//$userid = $TSUE['TSUE_Member']->info['memberid'];
/*
|| #################################################################### ||
|| # ArrowChat # ||
|| # ---------------------------------------------------------------- # ||
|| # Copyright ©2010-2012 ArrowSuites LLC. All Rights Reserved. # ||
|| # This file may not be redistributed in whole or significant part. # ||
|| # ---------------- ARROWCHAT IS NOT FREE SOFTWARE ---------------- # ||
|| # http://www.arrowchat.com | http://www.arrowchat.com/license/ # ||
|| #################################################################### ||
*/
/**
* This function returns the user ID of the logged in user on your site. Technical support will not
* help you with this for stand-alone installations. You must purchase the professional installation
* if you are having trouble.
*
* Suggestion: Check out the other integration files in the functions/integrations directory for
* many examples of how this can be done. The easiest way is to get the user ID through a cookie.
*
* @return the user ID of the logged in user or NULL if not logged in
*/
function get_user_id()
{
$userid = NULL;
return $userid;
}
/**
* This function returns the SQL statement for the buddylist of the user. You should retrieve
* all ONLINE friends that the user is friends with. Do not retrieve offline users. You can use
* global $online_timeout to get the online timeout.
* ex: AND (arrowchat_status.session_time + 60 + " . $online_timeout . ") > " . time() . "
*
* @param userid the user ID of the person receiving the buddylist
* @param the time of the buddylist request
* @return the SQL statement to retrieve the user's friend list
*/
function get_friend_list($userid, $time)
{
global $db;
global $online_timeout;
$sql = ("
SELECT DISTINCT " . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_USERID . " userid, " . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_NAME . " username, arrowchat_status.session_time lastactivity, " . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_AVATAR . " avatar, " . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_USERID . " link, arrowchat_status.is_admin, arrowchat_status.status
FROM " . TABLE_PREFIX . DB_FRIENDSTABLE . "
JOIN " . TABLE_PREFIX . DB_USERTABLE . "
ON " . TABLE_PREFIX . DB_FRIENDSTABLE . "." . DB_FRIENDSTABLE_FRIENDID . " = " . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_USERID . "
LEFT JOIN arrowchat_status
ON " . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_USERID . " = arrowchat_status.userid
WHERE " . TABLE_PREFIX . DB_FRIENDSTABLE . "." . DB_FRIENDSTABLE_USERID . " = '" . $db->escape_string($userid) . "'
AND " . TABLE_PREFIX . DB_FRIENDSTABLE . "." . DB_FRIENDSTABLE_FRIENDS . " = 1
AND (arrowchat_status.session_time + 60 + " . $online_timeout . ") > " . time() . "
ORDER BY " . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_NAME . " ASC
");
return $sql;
}
/**
* This function returns the SQL statement for all online users. You should retrieve
* all ONLINE users regardless of friend status. Do not retrieve offline users. You can use
* global $online_timeout to get the online timeout.
* ex: AND (arrowchat_status.session_time + 60 + " . $online_timeout . ") > " . time() . "
*
* @param userid the user ID of the person receiving the buddylist
* @param the time of the buddylist request
* @return the SQL statement to retrieve all online users
*/
function get_online_list($userid, $time)
{
global $db;
global $online_timeout;
$sql = ("
SELECT DISTINCT " . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_USERID . " userid, " . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_NAME . " username, arrowchat_status.session_time lastactivity, " . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_AVATAR . " avatar, " . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_USERID . " link, arrowchat_status.is_admin, arrowchat_status.status
FROM " . TABLE_PREFIX . DB_USERTABLE . "
JOIN arrowchat_status
ON " . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_USERID . " = arrowchat_status.userid
WHERE ('" . time() . "' - arrowchat_status.session_time - 60 < '" . $online_timeout . "')
AND " . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_USERID . " != '" . $db->escape_string($userid) . "'
ORDER BY " . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_NAME . " ASC
");
return $sql;
}
/**
* This function returns the SQL statement to get the user details of a specific user. You should
* get the user's ID, username, last activity time in unix, link to their profile, avatar, and status.
*
* @param userid the user ID to get the details of
* @return the SQL statement to retrieve the user's defaults
*/
function get_user_details($userid)
{
global $db;
$sql = ("
SELECT " . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_USERID . " userid, " . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_NAME . " username, arrowchat_status.session_time lastactivity, " . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_USERID . " link, " . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_AVATAR . " avatar, arrowchat_status.is_admin, arrowchat_status.status
FROM " . TABLE_PREFIX . DB_USERTABLE . "
LEFT JOIN arrowchat_status
ON " . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_USERID . " = arrowchat_status.userid
WHERE " . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_USERID . " = '" . $db->escape_string($userid) . "'
");
return $sql;
}
/**
* This function returns the profile link of the specified user ID.
*
* @param userid the user ID to get the profile link of
* @return the link of the user ID's profile
*/
function get_link($link, $user_id)
{
global $base_url;
return $base_url . '../users.php?id=' . $link;
}
/**
* This function returns the URL of the avatar of the specified user ID.
*
* @param userid the user ID of the user
* @param image if the image includes more than just a user ID, this param is passed
* in from the avatar row in the buddylist and get user details functions.
* @return the link of the user ID's profile
*/
function get_avatar($image, $user_id)
{
global $base_url;
if (is_file(dirname(dirname(dirname(__FILE__))) . '/images/' . $image . '.gif'))
{
return $base_url . '../images/' . $image . '.gif';
}
else
{
return $base_url . AC_FOLDER_ADMIN . "/images/img-no-avatar.gif";
}
}
/**
* This function returns the name of the logged in user. You should not need to
* change this function.
*
* @param userid the user ID of the user
* @return the name of the user
*/
function get_username($userid)
{
global $db;
global $language;
global $show_full_username;
$users_name = $language[83];
$result = $db->execute("
SELECT " . DB_USERTABLE_NAME . " name
FROM " . TABLE_PREFIX . DB_USERTABLE . "
WHERE " . DB_USERTABLE_USERID . " = '" . $db->escape_string($userid) . "'
");
if ($result AND $db->count_select() > 0)
{
$row = $db->fetch_array($result);
$users_name = $row['name'];
}
$pieces = explode(" ", $users_name);
if ($show_full_username == 1)
{
return $users_name;
}
else
{
return $pieces[0];
}
}
?>
If anyone can please with it and get this working I will pay a decent price as i do not want to pay 300$ for a professional install thanks
#1
15-08-2013 02:23
d4ever likes this.
alanb
Moderators
Member since 27-07-2011
Total Posts736
Likes Received436
GenderMale
Member since 27-07-2011
Total Posts736
Likes Received436
GenderMale
xam might be able to help you more then me but I would probably get the userid from the tsue_member COOKIE value.
function get_cookie()
{
if (isset($_COOKIE['tsue_member'])) $get_cookie = $_COOKIE['tsue_member'];
return $get_cookie;
}
$getUserCookie = get_cookie();
$temp1 = preg_match('/_(.*?)_/s', $getUserCookie, $matches);
$getUserID = $matches[1];
$getUserID <--- this should be the members id #.
function get_cookie()
{
if (isset($_COOKIE['tsue_member'])) $get_cookie = $_COOKIE['tsue_member'];
return $get_cookie;
}
$getUserCookie = get_cookie();
$temp1 = preg_match('/_(.*?)_/s', $getUserCookie, $matches);
$getUserID = $matches[1];
$getUserID <--- this should be the members id #.
tsmods.org
tsmods.net
tsmods.net
#2
15-08-2013 06:48
xam
Administrator
Member since 20-04-2011
Total Posts3,269
Likes Received5,309
GenderMale
Member since 20-04-2011
Total Posts3,269
Likes Received5,309
GenderMale
It should not use TSUE database!
Any kind of those chat softwares should use their own files, database, config etc.. With a one JS line, it should do everything.
Any kind of those chat softwares should use their own files, database, config etc.. With a one JS line, it should do everything.
░▓ TSUE = Fast & Secure & Social
░▓ Build your own website today!
Please do not PM me for support unless I specifically ask for information to be delivered that way.
Purchase TSUE | Customers | TSUE Demo | TSUE Features | Have a great idea for TSUE? | Submit Your Testimonial | Services
░▓ Build your own website today!
Please do not PM me for support unless I specifically ask for information to be delivered that way.
Purchase TSUE | Customers | TSUE Demo | TSUE Features | Have a great idea for TSUE? | Submit Your Testimonial | Services
#3
16-08-2013 11:30