Skip to Content Skip to Menu

Integrating with Prochatrooms help needed.

  • Resarack
  • Resarack
  • OFFLINE
  • Posts: 9
  • Thanks: 1
  • Karma: 1
13 years 7 months ago #163379 by Resarack
Ok so I am trying to integrate Prochatrooms with community builder and having a rough time. I am posting the contents of their integration file and all the info they have given me and hopefully someone can help with what I need to fill in and where....

Their instructions are as follows...

_______________________________________________________________
» Integration Instructions For Pro Chat Rooms - JOOMLA 1.5
1) Download the integration file, unzip and upload to your Joomla root folder (eg. yoursite.com/prochatrooms.php )

2) Open the file 'prochatrooms/db.php' and replace,

session_start();

With this,

session_name('prochat');
session_start();

3) Open the file 'prochatrooms/cms.php' and edit the settings as shown below,

## CUSTOM INTEGRATION SETTINGS ##############

// Enable custom login details
define('C_CUSTOM_LOGIN','1'); // 0 OFF, 1 ON

// Enter your CMS Global values below
define('C_CUSTOM_USERNAME',$_SESSION); // username
define('C_CUSTOM_USERID',$_SESSION); // userid

4) Login to your Joomla admin area and follow the steps below to create the chat room login link.

a) Click the image 'Menu Manager'.
b) Decide which menu will display your chat room link and click the 'Edit Menu Items' link.
c) Now click the 'New' link in the top right hand corner of the web page.
d) Under the sub heading 'External Link'.
e) For the Title and Alias value, enter 'Chat Room',
f) For the Link value, enter 'prochatrooms.php'
g) Set 'Display in' to 'User Menu',
h) Set 'Parent Item' to 'Top',
i) Set 'Published' to 'Yes',
j) Set 'Access Level' to 'Registered',
k) Set 'On Click, Open in' to 'Parent Window With Browser',
l) Then click the link 'Save'.
________________________________________________________________________________

The integration file they mention is a zip containing prochatrooms.php and the contents of that file are....

_______________________________________________________
<?php
###########################################
# PRO CHAT ROOMS #
# www.prochatrooms.com #
# Joomla CMS Integration #
# FILE: prochatrooms.php #
###########################################

// Set flag that this is a parent file
define( '_JEXEC', 1 );

define('JPATH_BASE', dirname(__FILE__) );

define( 'DS', DIRECTORY_SEPARATOR );

require_once ( JPATH_BASE .DS.'includes'.DS.'defines.php' );
require_once ( JPATH_BASE .DS.'includes'.DS.'framework.php' );

$mainframe =& JFactory::getApplication('site');

$user = JFactory::getUser();

$username = $user->username;
$id = $user->id;

$session = JFactory::getSession();
$session->close();

ini_set("session.save_handler", "files");

session_name('prochat');
session_start();
session_register('username');
session_register('userid');

$_SESSION = $username;
$_SESSION = $id;

header('Cache-Control: public');
header('Location: prochatrooms/');

?>
____________________________________________________________________


The part I am having the biggest issue with is ...
// Enter your CMS Global values below
define('C_CUSTOM_USERNAME',$_SESSION); // username
define('C_CUSTOM_USERID',$_SESSION); // userid

How would I fill out these two lines for community builder/joomla 1.5?

Please Log in or Create an account to join the conversation.

  • Resarack
  • Resarack
  • OFFLINE
  • Posts: 9
  • Thanks: 1
  • Karma: 1
13 years 7 months ago #163536 by Resarack
Replied by Resarack on topic Re: Integrating with Prochatrooms help needed.
Anyone? Just need to know how I would edit this in order for it to pull info for users from the cb db.

Please Log in or Create an account to join the conversation.

  • Resarack
  • Resarack
  • OFFLINE
  • Posts: 9
  • Thanks: 1
  • Karma: 1
13 years 7 months ago #164006 by Resarack
Replied by Resarack on topic Re: Integrating with Prochatrooms help needed.
Seriously need a hand here. I am under the wire. Can anyone help me? Just need to know what CB stores username userid and password under in a session.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48674
  • Thanks: 8313
  • Karma: 1446
13 years 7 months ago #164029 by krileon
CB doesn't really store to session, but Joomla does. However Joomla only pushes to session the basic data such as ID and maybe Username/Email. You most definitely will not get password from session and if you did it'd be in its encrypted form. The best way to see what data the session has stored is simply var_dump it and that'll give you a list of what's available.

The best approach is to use CB API to retrieve this information. Please see tutorials within my signature regarding using CB API externally (must be contained inside Joomla still) and establishing the $user object. This still won't give you plaintext password however, for security reasons it is only plaintext after login, after registration, and after profile update (if changed).. even then is only plaintext for a split second then encrypted or disposed of.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum