By ayalsule on
Hello There I`m working on drupal module make integration between cometchat 1.6.0 and Drupal 6.X
Comet chat want to know what is the user id is logged in so give me a function I must fix it suitable to my environment
function getUserID() {
$userid = 0;
if (!empty($_SESSION['userid'])) {
$userid = $_SESSION['userid'];
}
return $userid;
}
I tried to do this
global $user;
if ($user->uid !== 0){
$userid = $user->uid;
}
but dose`t work because comet chat and drupal separated environments and $user undefined in comet chat so T tried to use session
I dump $_SESSION but it`s empty .
my question is how can I save uid in $_SESSION to use it in comet chat
Thanks
Comments
I took this from the
I took this from the integration tutorial on CometChat:
http://www.cometchat.com/support/topic/7-integration-with-drupal-v6/page...
Thank u I solved using
Thank u I solved using COOKIES
...
Hello, I have the same
Hello,
I have the same problem !!
How did you do please with COOKIE ?
this is written by me:
this is written by me: http://www.cometchat.com/support/topic/7-integration-with-drupal-v6/page... that's a step by step tuto. I stoped using cometchat so i don;t know if there's anything changed. But at the time that worked perfectly.
CometChat sales team uses spam tactics
The CometChat sales team uses spam tactics to market their product.
Because CometChat spams people, I do not recommend using CometChat.
See here for one such example.
-------
http://www.funnymonkey.com
All advertising in spam.
All advertising in spam.
Contact me to contract me for D7 -> D10/11 migrations.
Anybody get a good
Anybody get a good integration.php working for Drupal 7? They don't even have one.
A good programmer is a lazy programmer.
Integration file
Hi there, I managed to adapt integration.php file that is needed for integrating Drupal 7 with Cometchat.
Inside of the file I have erased my licence info. Changes as compared to the initial version:
- user name points to correct link on the site (/user/$uid)
- avatars are correctly displayed (mapped them to one my site image styles; update line 93 to match your setup)
- in case no avatar is available chatbox grabs nophoto.jpg (update line 94 to match your setup).
- both http/https protocols are suported (previously it worked only in http mode).
Feel free to correct my syntax since I'm not a PHP programmer ;-)
You can download it from this site (integration.txt): http://www.speedyshare.com/vJSWB/integration.txt
Re-uploaded
http://www.speedyshare.com/7AaCt/integration.txt
Super thanks for re-uploading
Super thanks for re-uploading this by my request!
I've changed over to arrowchat in the meantime, but the integration is VERY similar so this will help me tons anyway :)
Thank you very much.
~Vas
Can you please re-post. Would
Can you please re-post. Would love to have for our drupal 7 upgrade. Thank you so much.
Just spent a better part of
Just spent a better part of an evening trying to figure this out. Can you please re-post the integration text file that is needed for drupal 7? Would be eternally grateful.