این لینکی که شما از اسکریپت مافیا معرفی کردید واسه sharetronix جواب نمیده (فرق میکنه با لینکی که واسه ساپورت گذاشتید.
Step 1
extract the script to your site and install by running
لینک ها تنها برای اعضای سایت قابل نمایش است.
Step 2 - Enter the code below into your header section
<!-- CometChat Footer Code Start -->
<link type="text/css" rel="stylesheet" media="all" href="cometchat1.5/cometchatcss.php" charset="utf-8" />
<script type="text/javascript" src="cometchat1.5/cometchatjs.php" charset="utf-8"></script>
<!-- CometChat Footer Code End -->
Step 3 - Edit config.php and enter all your database information at
Line 10 - Enter your sql username
Line 11 - Enter you sql password
Line 12 - Enter your sql db name
Line 15 - Profiles (This is where all your members information are stored)
Line 16 - NickName (This is teh filed where your members usernames are stored under what you entered in line 15)
Line 17 - ID (This is your members profile ID number)
Line 18 - DateLastNav (This is the filed that tracks the last action made by your members on the site)
Line 119 - BADWORD1, BADWORD2 (Banned words on the site)
Line 128 - Username (Username for access to cometchat's admin area)
Line 129 - Password (Password for access to cometchat's admin area)
Line 202 - memberID (Your sites way of checking your your member has signed into your site)
Line 204 - memberID ((Your sites way of checking your your member has signed into your site)
Line 212 - This is the function used to collect the information from your database to spot all the online members
$sql = ("select Profiles.ID, Profiles.Sex, Profiles.NickName, Profiles.DateLastNav, Profiles.PrimPhoto, cometchat_status.message, cometchat_status.status from Profiles left join cometchat_status on Profiles.ID = cometchat_status.userid where Profiles.Status = 'Active' and Profiles.DateLastNav > SUBDATE(NOW(), INTERVAL '5' MINUTE) and Profiles.ID <> '".mysql_real_escape_string($userid)."' order by NickName asc");
Let’s look at it from this angle
I have a sql database with the following
Profiles (Where all my members info are saved)
ID (This is a field under my profiles section)
Sex (This is a field under my profiles section)
NickName (This is a field under my profiles section)
DateLastNav (This is a field under my profiles section)
PrimPhoto (This is a field under my profiles section)
Status (This field is used to ID if the user is an active, banned or suspened user on your site)
cometchat_status (This is part of cometchat's)
ueserid (This is a field under my profiles section)
message (This is a field under my profiles section)
status (This is a field under my profiles section)
All you do now id replace the field I have shown you with the fileds in your database... E.G.
Profiles (Where all my members info are saved)
----------------------------------------------
| ME Fields | Your fields |
---------------------------------------------
| ID | userid |
| Sex | usersex |
| NickName | username |
| DateLastNav | lastaction |
| PrimPhoto | avatar |
| Status | userstatus |
---------------------------------------------
This will change the code above to this
$sql = ("select Profiles.userid, Profiles.usersex, Profiles.username, Profiles.lastaction, Profiles.avatar, cometchat_status.message, cometchat_status.status from Profiles left join cometchat_status on Profiles.ID = cometchat_status.userid where Profiles.userstatus = 'Active' and Profiles.lastaction > SUBDATE(NOW(), INTERVAL '5' MINUTE) and Profiles.userid <> '".mysql_real_escape_string($userid)."' order by username asc");
Please note the the "Active" in
Profiles.userstatus = 'Active'
could be different from your field options. (This field is used to ID if the user is an active, banned or suspened user on your site).
Line 256 - function getAvatar($image) (This function is used to collect your members avatar.)
This code I have here is for my site and will differ from yours... This is where you need to know a bit of php to get it working.
Step 4 - Edit cometchat_receive.php
Line 163 - NickName (Change this to your members username field)
Line 164 - PrimPhoto (Change this to the field that points to your members avatar photo.
Line 166 - NickName (Change this to your members username field)
Line 167 - NickName, Sex (Change this to the fields that points to your members username and gender)