PDA


View Full Version : SigmaChat -- Creating a CMPS Page


KW802
01-20-2005, 07:13 PM
These instructions will show how to create a new CMPS page to display a SigmaChat (http://www.sigmachat.com/) chat applet on your site using a CMPS page.


When a visitor is logged into your site then their vBulletin usename will passed into the chat box and they'll be automatically logged in. If they are not logged in then they'll see a message urging them to register so that they can see the chat box.
When viewed with FireFox the chat box will be the full width of the module but in IE it'll be hardcoded. This is because FF recognizes 100% as a width value of the applet but IE does not.
This was developed using the free version of SigmaChat -- If you have the premium version and run into issues let me know and I'll see what I can do.
Step #1 -- Create a new template named adv_portal_sigmachat that contains the following:<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<thead>
<tr>
<td class="tcat" colspan="2">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_cmps_iframe')">
<img id="collapseimg_forumhome_cmps_iframe" src="$stylevar/collapse_tcat$vbcollapse[collapseimg_forumhome_randomtopic].gif" alt="" border="0"/>
</a>
<strong>
<span class="smallfont">$vba_options[portal_blockbullet] $vboptions[hometitle] Chat</span>
</strong>
</td>
</tr>
</thead>
<tbody id="collapseobj_forumhome_cmps_chat" style="$vbcollapse[collapseobj_forumhome_cmps_chat]">
<tr><td>
<!-- START OF IFRAME CODE -->
<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<tr>
<td class="$getbgrow" width="100%" height="100%" align="center">
<if condition="$bbuserinfo[userid]">
<!-- CODE TO DISPLAY IF THE USER IS LOGGED IN -->
<applet
codebase="http://client0.sigmachat.com/current/"
code="Client.class" archive="scclient_en.zip"
width="<if condition="is_browser('firefox')">100%<else />600</if>" height="400" MAYSCRIPT
onLoad="calcHeight(this);" onResize="calcHeight(this);" >
<param name="room" value="XXXXX">
<param name="cabbase" value="scclient_en.cab">
<if condition="$bbuserinfo[userid] == 0">
<param name="username" value="Guest">
<param name="autologin" value="no">
<else />
<param name="username" value="$bbuserinfo[username]">
<param name="autologin" value="yes">
</if>
</applet>
<else />
<!-- CODE FOR GUESTS -->
<hr width="95%">
<strong>If you were logged in right now you would see the chat box! If you haven't registered yet just click <a href="$vboptions/register.php?$session[sessionurl]">here</a>. <i>It's fast, easy and free!</i></strong>
<hr width="95%">
</if>
</td>
</tr>
</table>
<!-- END OF IFRAME CODE -->
</td></tr>
</tbody>
</table>
<br />
.

Step #2 -- Go back to the template you just created in step #1 and change "XXXXX" to instead by the account number assigned to you by SigmaChat. This will look something like SC-99999. You want just the "99999" part of that.

Step #3 -- Create a new page in CMPS using the following values:

[b]Page Title = [i]Chat
Page Identifier = chat {Notice the lower case!}
Page Template = adv_portal_template
Modules Enabled = {turn off everything in your right column and in your middle column turn everything off except "Custom Page Content"}
That's it, you should be done. :)

Kevin
PS: Yes, I know, the inner IF conditional for the userid is not needed because of the outer IF conditional but it'll make it easier for people to make changes if everything they need is in there to start with. ;)

oldengine
03-10-2005, 10:22 AM
I'm curious how SigmaChat might compare to vBChat (vbulletin.org) in quality and convenience. Has anyone used both that can offer an opinion?

GrrrlRomeo
05-11-2005, 01:46 AM
I'm a complete vB newbie and this is the first page I've ever added to CMPS. I kinda sat here and scratched my head for a bit until I realized that Page Template = adv_portal_template should be Page Template = adv_portal_sigmachat.

Also strong tags should be inside the span tags 'cause the span tag overrides whatever's outside the span tags.

Anyway, I used this with Parachat instead of Sigmachat and it works perfectly. You just have to replace the sigmachat applet code with the parachat applet code accordingly.

Thanks!