1
SMPnet
How to integrate Shoutmix shoutbox
  • 2010/5/2 18:11

  • SMPnet

  • Just popping in

  • Posts: 5

  • Since: 2010/4/29


Ever since I've made changes to my Xoops site, I haven't been successful in getting any version of Shoutbox running (Even 5 alpha, but I suspect that's due to running PHP 4.3 still)

At any rate, our site NEEDS a shoutbox, it's another favorite feature among many on our Xoops site.

I have purchased the paid version of Shoutmix (Which allows for integration -http://www.shoutmix.com) in the hopes that I could code a block to pass Xoops usernames to it.

I've tried a number of different ways to do this and have been coming up empty each time.

Here are the directions from Shoutmix's integration "tutorial" - is it possible someone could have a look and give it a shot? So far(I've been trying for a little bit now), shoutmix works very well and will be a welcome addition to our site...if I could just get usernames passed.

Quote:


Integration Setup

If you have website with existing userbase, you can easily setup your shoutbox to use data from your userbase. With integration, only members logged in at your site can view and use your shoutbox.
Getting started

This section is meant for advanced users only.

To get the integration working, you simply need to pass two parameters via GET request, appended at the end of your shoutbox URL.

Example
...utmix.com/?myshoutmixname&name={name}&code={code}

The variables needed to be passed and their explanations are as follow:

{name}
Member name to be passed onto the shoutbox.
{code}
MD5 value of {name} + {unique code}, to verify that user is coming from your site.
{unique code}
The unique security code for your shoutbox is myuniquecode

An example of how the shoutbox would be called with the name tester:

Example
...com/?myshoutmixname&name=tester&code=32char.md5

... where 32char.md5 is MD5(testermyuniquecode).

After setup, be sure to set your access control to Integrated mode for this to work.

Access Control
PHP Function

If you're using PHP, you can add the following function to your script for quick integration. The function will produce correct parameters to be appended at the end of your shoutbox URL.

function shoutmix($name = '') { return htmlspecialchars( '&name='.rawurlencode($name) .'&code='.md5($name.'myuniquecode')); }

Then alter your shoutbox HTML codes by adding the following codes (after your shoutbox URL):

Example
...mix.com/?myshoutmixname<?=shoutmix($name);?>" width="...

Replace $name with the variable that holds the name of your member, as retrieved from the database.


I have removed "(myshoutmixname, myuniquecode, 32char.md5) for security reasons"

I surprised this wasn't brought up here before as it's a popular shoutbox, but maybe it's just extremely simple and I'm thinking too far into it... I hope.

Thanks for reading and your time!
-K

Login

Who's Online

191 user(s) are online (107 user(s) are browsing Support Forums)


Members: 0


Guests: 191


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits