[2.0.16] Embed SigmaChat Chat Module into phpBB

The cleanup is complete. This forum is now read only.
Post Reply

Rating:

Excellent!
36
75%
Very Good
4
8%
Good
2
4%
Fair
2
4%
Poor
4
8%
 
Total votes: 48

Extensions Robot
Extensions Robot
Extensions Robot
Posts: 28734
Joined: Sat Aug 16, 2003 7:36 am

[2.0.16] Embed SigmaChat Chat Module into phpBB

Post by Extensions Robot »

MOD Name: Embed SigmaChat Chat Module into phpBB
Author: JAS4Yeshua
MOD Description: This MOD will allow you to embed the SigmaChat client into your phpBB Message Board. You must have a SigmaChat account for this MOD to work. http://www.sigmachat.com/


MOD Version: 1.0.5

Download File: SigmaChat_1-0-5.zip
mods overview page: View
File Size: 6251 Bytes

Security Score: 0
Last edited by Extensions Robot on Mon Apr 30, 2007 12:30 am, edited 1 time in total.
(this is a non-active account manager for the phpBB Extension Customisations Team)
ycl6
Translator
Posts: 5696
Joined: Sat Feb 15, 2003 10:35 am
Location: Taiwan
Contact:

Post by ycl6 »

MOD Validated/Released

Notes:
This MOD allows your phpBB forum to have a integrated SigmaChat chat room. SigmaChat acount is reuqired.
User avatar
JAS4Yeshua
Registered User
Posts: 45
Joined: Sun Mar 27, 2005 12:53 am
Location: Marina, CA
Contact:

Post by JAS4Yeshua »

Thanks to the team for the help getting this mod released. :)
Jason
killerid
Registered User
Posts: 412
Joined: Fri Jun 24, 2005 8:32 am
Contact:

Post by killerid »

Sigma Chat is it free or u have to pay up ? i dont get this mod.
My Favorite Webhosting with GD/RvSkins/RoR/PHP5 For Forums and All : http://www.a1whs.com , Costs only $1.55 :). | My Favorite Free Image Hosting : http://www.sbclansite.com Ads Free. My Favorite Directory : http://www.h-log.com
User avatar
JAS4Yeshua
Registered User
Posts: 45
Joined: Sun Mar 27, 2005 12:53 am
Location: Marina, CA
Contact:

Post by JAS4Yeshua »

SigmaChat is either free or paid. You can sign up to use their basic chat for free, but they have a more advanced system you can pay for. You can find out more about SigmaChat on their website ( http://www.sigmachat.com/ )

As for the mod, it simply allows you to embed the SigmaChat java code into a page that requires a user to be logged in to access. The free version of SigmaChat has no built-in authentication, so I use phpbb authentication to validate users to enter the chatroom.
Jason
alienscy
Registered User
Posts: 5
Joined: Wed Nov 12, 2003 11:38 am

Post by alienscy »

I don't pay for this chat.
pfuller
Registered User
Posts: 53
Joined: Mon Jul 19, 2004 8:17 pm

Post by pfuller »

This is an excellent mod and the Sigma Chat is great.

I upgraded Sigma Chat from the free version and it is worth it. Easy to install and you are running chat on someone else's server.
kdunn
Registered User
Posts: 15
Joined: Sun Jun 27, 2004 11:54 pm

Post by kdunn »

I installed the mod and created the chatroom, added the applet to chat.tpl, and the chat works fine. But when you go to chat, it asks you to login with a username. Isn't there some way to use the phpBB user name somewhere in the applet code so users are automatically logged in with their phpBB name? Thanks.
User avatar
JAS4Yeshua
Registered User
Posts: 45
Joined: Sun Mar 27, 2005 12:53 am
Location: Marina, CA
Contact:

Post by JAS4Yeshua »

The free version of SigmaChat doesn't allow you to do that. The paid version of SigmaChat allows you to do the connection, but since I only use the free version, I don't know how to get the two to connect.
Jason
kdunn
Registered User
Posts: 15
Joined: Sun Jun 27, 2004 11:54 pm

Post by kdunn »

I have a partial answer. In chat.tpl you can use:

Code: Select all

<applet 
   codebase="http://client0.sigmachat.com/current/"
   code="Client.class" archive="scclient_en.zip"
   width=600 height=400 MAYSCRIPT>
   <param name="room" value="XXX">
   <param name="username" value="YYY">
   <param name="cabbase" value="scclient_en.cab">
</applet>
XXX is the number for your chat room
YYY needs to be the forum username, but I don't know enough to get the template to fill this in.

This is not the same as the premium sigmachat authentication, but it would save forum members from having to type in their username.

So... how can I get the template to fill in the username? Thanks.
User avatar
JAS4Yeshua
Registered User
Posts: 45
Joined: Sun Mar 27, 2005 12:53 am
Location: Marina, CA
Contact:

Post by JAS4Yeshua »

((JAS4Yeshua: Removed due to error in what I had written. Will revise and update later.))
Jason
pfuller
Registered User
Posts: 53
Joined: Mon Jul 19, 2004 8:17 pm

Post by pfuller »

kdunn wrote: So... how can I get the template to fill in the username? Thanks.


try the following

chat.tpl

<param name="username" value="YYY">

change to

<param name="username" value="{USERNAME}">

in chat.php

after

'L_CHAT_FAQ' => $lang['Chat_FAQ'],

add

'USERNAME' => $userdata['username'],


also make sure this line is in chat.php


// redirect to login if not logged in
if ( !$userdata['session_logged_in'] ) redirect("login.$phpEx?redirect=chat.".$phpEx, true);

before

// standard page header
include($phpbb_root_path . 'includes/page_header.'.$phpEx);

This will secure the page and ensure only your logged in members can log in to chat. I suppose that your logged in user could retype in over the username prompt to pretend to be someone else, assuming the applet allows that. I am not sure because I have the paid version using an authetication script that directly interacts with the user table
kdunn
Registered User
Posts: 15
Joined: Sun Jun 27, 2004 11:54 pm

Post by kdunn »

It works!

chat.tpl:

Code: Select all

<!-- Add Your SigmaChat Code Here -->
<applet 
   codebase="http://client0.sigmachat.com/current/"
   code="Client.class" archive="scclient_en.zip"
   width=600 height=400 MAYSCRIPT>
   <param name="room" value="XXX">
   <param name="username" value="{USERNAME}">
   <param name="autologin" value="yes">
   <param name="cabbase" value="scclient_en.cab">
</applet>
XXX is the numerical code of the chatroom. The "autologin" parameter logs the user in so he doesn't have a chance to change his username.

chat.php:

Code: Select all

// assign template variables
$template->assign_vars(array(
	'L_CHAT_FAQ' => $lang['Chat_FAQ'],  
        'USERNAME' => $userdata['username'],
	'U_CHAT_FAQ' => append_sid("faq.$phpEx?mode=chat")
	)
);
The version of chat.php I have has:

Code: Select all

// redirect to login if not logged in
if ( empty($userdata['user_id']) || $userdata['user_id'] == ANONYMOUS )
{
	redirect(append_sid("login.$phpEx?redirect=chat.$phpEx", true));
}
which I think does the same thing as

Code: Select all

// redirect to login if not logged in
if ( !$userdata['session_logged_in'] ) redirect("login.$phpEx?redirect=chat.".$phpEx, true);
Right?

Thanks a lot. Awesome mod.
pfuller
Registered User
Posts: 53
Joined: Mon Jul 19, 2004 8:17 pm

Post by pfuller »

Yes, I believe the last part works the same when protecting the page

I am not sure if there are subtle differences or one is more secure than the other.

Maybe someone who does know can comment.

I am glad you like the mod :) Once you understand how the templating system works with phpBB you can make alot of changes yourself easily
User avatar
JAS4Yeshua
Registered User
Posts: 45
Joined: Sun Mar 27, 2005 12:53 am
Location: Marina, CA
Contact:

Post by JAS4Yeshua »

Thanks for the assistance, pfuller. :D

The method I included in the MOD:

Code: Select all

// redirect to login if not logged in
if ( empty($userdata['user_id']) || $userdata['user_id'] == ANONYMOUS )
{
   redirect(append_sid("login.$phpEx?redirect=chat.$phpEx", true));
}
This checks to see if a person is logged in before trying to redirect to the login page. Without the if statement, it will always redirect to the login page, even if the user is logged in.
Jason
Post Reply

Return to “[2.0.x] MOD Database Cleanup”