News:

Wondering if this will always be free?  See why free is better.

Main Menu

Addonchat Integration script

Started by Suki, November 20, 2012, 11:15:19 AM

Previous topic - Next topic

Suki

I've been working on a mod to integrate an AddonChat script with an SMF installation, folks at AddonChat has been very kind in providing me with all the necessary tools and resources.

The mod is open source and it's licensed under the Mozilla Public License Version 2.0

Right now it needs tons of beta testing and bug hunting so if anyone is interested and has an active account at AddonChat please do give it a shot.

Features included:

- Uses hooks for most of the features, reducing installation problems and incompatibilities with other mods.
- Avatar integration, the chat window will show the user avatar if they had one.
- Permissions, all the permissions from the chat are ported and converted to the SMF permission system, allowing you to take full control over what your users can and cannot do on the chat.
- Who is chatting, the mod will display the count on the chat button as well as on the BoardIndex.
- Automatic authentication, your users won't need to sign up on the chat, they just need to enter the page and they will be automatically signed up and able to use the chat with the permissions you assign to them.

You will need at least the Professional PLUS edition and PHP 5.2 or greater in order to be able to fully use this integration script.

You can download the script at https://github.com/MissAllSunday/AddonChat-SMFIntegration just click on the ZIP button.

The script is ready to be installed via the Package Manager and will work on nearly all themes.

So, if someone is interested please do contact me and report back any issue you might found, either here, at my site or open a new issue at github.


Edit, updated the github link.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Hj Ahmad Rasyid Hj Ismail

Surprise to see this new development I am. However, nice to know that the smiles are back. ;) Will certainly test and use all your good mods Suki.

tommytoxen

Any news on this? Does it work? I'm not going to pay $125 to test something if it doesn't work.. I am looking at Addonchat..

Arantor

I couldn't recommend it. It uses Java by its own admission and Java is increasingly being disabled.

tommytoxen

Well, personally I think HTML5 is the way forwards.. eventually.

But Java is still the most used not only on computers, but mostly on mobile devices is all java and with mobile devices over-taking PC's by 2015 Java seems the most sensible option unless you're someone who hates making money  :P

Also with Windows dying and Linux becoming more popular, with big companies such as Valve making the switch, which means companies such as Creative, ATI etc will follow Valve for the money, flash is very, very, very finnicky and unreliable on Linux, whereas it does already have a stable Java platform so again even for PC's Java makes sense until HTML5 makes a full break through.

I'm very weary of going Flash because you're locking out your two biggest growing markets and essentially cutting off your own revenue.

Arantor

QuoteWell, personally I think HTML5 is the way forwards.. eventually.

AJAX Chat is written in HTML5.

QuoteBut Java is still the most used not only on computers, but mostly on mobile devices is all java and with mobile devices over-taking PC's by 2015 Java seems the most sensible option unless you're someone who hates making money

Oh, please, dear god, NO.

Yes, a lot of stuff on mobile is Java. Except that it's not the same Java. It is a very different Java and that chat thing you looked at won't work on a website browsing from mobile because they don't allow Java applets to run in the browser.

That and the fact that Java, routinely, regularly, has major vulnerabilities in the desktop environment... it has even overtaken Flash AND Acrobat for poor security. That's saying something.

QuoteAlso with Windows dying and Linux becoming more popular, with big companies such as Valve making the switch, which means companies such as Creative, ATI etc will follow Valve for the money, flash is very, very, very finnicky and unreliable on Linux

And Java ISN'T? Which Java engine?

* Arantor speaks as someone who has actually worked with Java code. It's not pretty.

QuoteHTML5 makes a full break through.

Please, stop spouting nonsense that you don't understand.

QuoteI'm very weary of going Flash because you're locking out your two biggest growing markets and essentially cutting off your own revenue.

And adopting a Java applet will cut BOTH of them off entirely. At least using Flash you only lock yourself out of one of the biggest growing markets.

Mind you, every year since 2000, I've heard will be the 'year of Linux on the desktop' and it's only really because of repeated mistakes by Microsoft that it's even remotely happening.

Suki

I cannot speak for AddonChat, I can only speak for my work.
Quote from: tommytoxen on February 24, 2013, 09:24:57 PM
Any news on this? Does it work? I'm not going to pay $125 to test something if it doesn't work.. I am looking at Addonchat..

There is no "new" news, the script is done, it needs testing but it is done.

Does it work?

It's been running on a community for at least 2 months without any issues.

You shouldn't buy Addonchat just because you want to test this...  this is for people that are already AddonChat clients and want to integrate their chat with SMF.

Lastly, this is not a place to ask for any AddonChar questions you may have,  AddonChat has its own support forum where you can ask any pre-sale stuff.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

tommytoxen

Quote from: Arantor on February 24, 2013, 09:42:51 PM
QuoteWell, personally I think HTML5 is the way forwards.. eventually.

AJAX Chat is written in HTML5.

QuoteBut Java is still the most used not only on computers, but mostly on mobile devices is all java and with mobile devices over-taking PC's by 2015 Java seems the most sensible option unless you're someone who hates making money

Oh, please, dear god, NO.

Yes, a lot of stuff on mobile is Java. Except that it's not the same Java. It is a very different Java and that chat thing you looked at won't work on a website browsing from mobile because they don't allow Java applets to run in the browser.

That and the fact that Java, routinely, regularly, has major vulnerabilities in the desktop environment... it has even overtaken Flash AND Acrobat for poor security. That's saying something.

QuoteAlso with Windows dying and Linux becoming more popular, with big companies such as Valve making the switch, which means companies such as Creative, ATI etc will follow Valve for the money, flash is very, very, very finnicky and unreliable on Linux

And Java ISN'T? Which Java engine?

* Arantor speaks as someone who has actually worked with Java code. It's not pretty.

QuoteHTML5 makes a full break through.

Please, stop spouting nonsense that you don't understand.

QuoteI'm very weary of going Flash because you're locking out your two biggest growing markets and essentially cutting off your own revenue.

And adopting a Java applet will cut BOTH of them off entirely. At least using Flash you only lock yourself out of one of the biggest growing markets.

Mind you, every year since 2000, I've heard will be the 'year of Linux on the desktop' and it's only really because of repeated mistakes by Microsoft that it's even remotely happening.

I do know. HTML5 is still buggy, face it. Especially HTML5's websocket.

Well to be fair the last HTML5 app I used was FCChat a whole year ago so perhaps its improved since then, but when I used it the web socket didn't half life throwing a wobbly and randomly disconnect people.

Anyway, you are quite right about Java - in the end I've decided to go with 123flashchat, which has full android and iOS integration & functionality. Even have an optional HTML5 client now too. Paid for it a few hours ago, just waiting for their developer to integrate it with SMF 2.0.4 now :)

Cheers for the replies.

I wasn't asking addonchat questions, I was asking you if your addonchat mod worked or not, thanks for the reply at least I know integration is possible, decided addonchat was a little too basic for my needs in the end anyway :P

Suki

It would be pretty stupid on my part to release an integration script that doesnt work....
Now please take your offtopic talk elsewhere
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Itch™

Well Suki, I for one am curious to see and try this. :)

Suki

Thing is, you need to be a AddonChat client because most if not all the features this script provides are only accessible if you purchased some plan already and even if you do, some features like avatar integration are only available if you have the complete full package.

This is true for all forum softwares they provide integrations to, marketing strategy I suppose.

This integration won't work with the free packages they provide, this is because this script needs access to AddonChat servers via what they call RAS (Remote Authentication System) to be able to retrieve data from the server, data such as the number of people in a chat, the chat settings, permissions, rooms, etc.

So, this script is for AddonChat users who already have a working chat and want to integrate it with SMF. This script will not install the chat for you.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

tommytoxen

So asking about addonchat integration script.. on an addonchat integration script = off-topic.

Were you just born without IQ or did your father batter it out of you?

Itch™

Quote from: tommytoxen on February 27, 2013, 03:28:56 AM
So asking about addonchat integration script.. on an addonchat integration script = off-topic.

Were you just born without IQ or did your father batter it out of you?

Were you just born rude or does it come natural?

Suki

Quote from: tommytoxen on February 27, 2013, 03:28:56 AM
So asking about addonchat integration script.. on an addonchat integration script = off-topic.

Were you just born without IQ or did your father batter it out of you?

If you want to talk about my IQ or my father, please do so elsewhere, this is a topic for AddonChat integration.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Cutter65

I have been looking for a Addonchat Integration script that will work with SMF 2.0.4 but haven't found anything that will work. I tried to download the script listed in the first post here but the link no longer works. Dose anyone have a working integration script that works with SMF 2.0.4?

Thanks

Suki

Oh, sorry the link got broken heres the new direct link to github:  https://github.com/MissAllSunday/AddonChat-SMFIntegration or just go to my github profile and go from there as it might get broken again.

Theres also a direct download: h++p://missallsunday.com/modsite/sa.single/mid.8/

Keep in mind that you need to have at least the Professional PLUS edition and PHP 5.2 or greater, it simply won't work with any lower edition of AddonChat.

Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Cutter65

Thanks for the quick reply.

I got the mod installed. It says everything is working. But when I try to login I keep getting Invalid user name or password. Any ideal as to what might be causing this? I tried both my admin user account on the forum and a regular member account I use for testing. Neither one will log in.

Suki

Did you correctly set up your callback url in your Addonchat settings page?   I included some info on how you can set the appropriate callback on your addonchat admin page.  Does your addonchat edition includes RAS feature?  RAS is the way they call their API methods and not all editions of addonchat has this feature enable.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Cutter65

Yes I have the Professional PLUS edition. I added the http://www.mysiteurl.com/forum/ChatAuth.php link to my remote authentication script link location in my Chat CP.

Cutter65

Suki I found the problem. It was the file permissions. The ChatAuth.php was set 666 I changed it to 644 and it works now.

Thank you for the great script/mod and the support!

Suki

Cool :)

Let me know if there is any more issues with this.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Cutter65


Cutter65

#22
Im getting this error in my error log when I visit my forum main page. This error only happens when someone is in the chatroom and the option to show rooms is selected.

http://www.mysiteurl.com/forum/index.php?action=forum
8: Undefined index: room
File: /home/******/public_html/forum/Themes/default/BoardIndex.template.php
Line: 480

Line 480 has the following.
==>480: echo $chatUsers['link'] ,'', (AddonChat::tools()->enable('boardIndex_rooms') ? 'on '. $chatUsers['room'] : '' ), ', ';

Suki

Yeah, that would be a bug, gotta make sure that var exists before using it, on your BoardIndex.template.php file find this line:


$chatUsers['link'] ,'', (AddonChat::tools()->enable('boardIndex_rooms') ? 'on '. $chatUsers['room'] : '' ), ', ';


And replace it with:


echo $chatUsers['link'] ,'', (AddonChat::tools()->enable('boardIndex_rooms') && !empty($chatUsers['room']) ? 'on '. $chatUsers['room'] : '' ), ', ';


Do so for every theme you have who has its own BoardIndex.template.php file.

I also would like to ask you if you can report any other bug you might found directly to my site or the github repo page as I don't visit this site that often anymore, thanks! :)
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

vsky

Hi all
I was not sure if I should start a new thread or not but could someone please explainhow to install this add-on please.
I have been using addonchat with proboards and have now moved to simplemachines.

Any help would be very welcome


Suki

Welcome to SMF.

This is an SMF modification, it means it gets installed via the Packager Manager

It's been a while since I look at this but it should work witn any 2.0.x installation. It requires you to have access to addonChat API services, can't remember which package you need to be able to access that, professional or professional plus.

What I do remember is that the free package won't work, dunno if they have changed this.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

vsky

Hi Suki,
thanks for the reply, yes I have the mod all installed with the pro plus version of addonchat..
I just can not get it to automatically log in users from my forum,
I have tried various paths for the ChatAuth, with no luck..

I will keep trying

Thanks for your time..

Suki

There is some instructions on how to set up your account on the admin panel, a link to your addonchat admin panel too and the correct path to your ChatAuth.php file.

something like this:

Quote
You haven't connect to the server yet, you need to connect to the server to be able to use this mod, please add your ID and password in the fields below and click save.
After that please click this link: Server Call to connect to the chat server, if successfully, you will see the next steps.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

vsky

Quote from: Suki on November 22, 2014, 03:28:24 PM
There is some instructions on how to set up your account on the admin panel, a link to your addonchat admin panel too and the correct path to your ChatAuth.php file.

something like this:

Quote
You haven't connect to the server yet, you need to connect to the server to be able to use this mod, please add your ID and password in the fields below and click save.
After that please click this link: Server Call to connect to the chat server, if successfully, you will see the next steps.

Hi Suki

thanks for the info, well it looks like its not installed properly as i cannot see anything in the Admin Panel on SMF 2.0.9
will try again...

Thanks for your time..

Suki

Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

vsky

Hi Suki,
i used the package manager, but it looks like a host issue as if i install it on my local test version all is fine..
Also tried with the new SMF beta and again it installed fine...

Thanks for your time

Suki

I used hooks for the admin page stuff so any host issue with permissions and/or other related stuff shouldn't happen.

What happens if you go to this page?

yourforum.com/index.php?action=admin;area=AddonChat

Replace "yourforum.com/"  with the url of your forum.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

vsky

Quote from: Suki on November 24, 2014, 12:16:36 PM
I used hooks for the admin page stuff so any host issue with permissions and/or other related stuff shouldn't happen.

What happens if you go to this page?

yourforum.com/index.php?action=admin;area=AddonChat

Replace "yourforum.com/"  with the url of your forum.

Hi Suki,

i have started the forum from scratch on the hosting site, but when i try to install the addon chat it just breaks the site..
if i go to yourforum.com/index.php?action=admin;area=AddonChat [nofollow] (replacing the yourforum.com [nofollow]) i just get a blank white page..
same happened when i installed the mod..
this is with the FSF_V2 theme but have also tried with the standard theme..

i have just tried again and now if i go to yourforum.com/index.php?action=admin;area=AddonChat [nofollow] (replacing the yourforum.com [nofollow])
takes me back he the main forum page..

Addon chat is not showing as installed.... very strange..

going to install another forum in a different folder and see what happens..

Thanks again.

Suki

How exactly are you trying to install it?  does it happen the same with any other mod?

Github likes to double folder any scripts and some servers cannot handle double foldered packages so maybe you can give this a try and see if thats the issue.

download the package from github, unzip it and zip it again without the extra folder.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

vsky

yes it has happened with some other mods, this is what makes me think its permissions...

tried with a clean forum and t still did the same.

Waiting for a reply from hosting company..

it has to be something there end as they all work fine on my local copy...

Thanks for your time Suki..

vsky

Just to add a little more, if i go to /index.php?action=admin;area=AddonChat i just get a blank white page...

i am in talks with the hosting company about memory as i type this..

vsky

Hi Suki,
just had an email from the hosting company..

[Thu Nov 27 09:21:37 2014] [warn] [client **.***.***.***] mod_fcgid: stderr: PHP Fatal error:  Cannot call method
self::generalSettings() or method does not exist in
/var/www/vhosts/my site address here/testforum/Sources/AddonChat.php on line 349

line 349 contains
      loadGeneralSettingParameters($subActions, 'general');
      call_user_func($subActions[$_REQUEST['sa']]);

Any ideas ?

Thanks

Suki

Thats weird since a few lines below that function is declared:

https://github.com/MissAllSunday/AddonChat-SMFIntegration/blob/master/Sources/AddonChat.php#L360

Do you have that line on your own Sources/AddonChat.php file?

Whats your php version? it might be needed to change the self keyword with "static".
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

vsky

Hi Suki,
yes that line is is my Sources/AddonChat.php 
static function generalSettings($return_config = false)

PHPversion is 5.2.17

how and where do i change the self keyword with "static" sorry i am not as experienced as yourself.

As always thank you for your time on this

Suki

On this line https://github.com/MissAllSunday/AddonChat-SMFIntegration/blob/master/Sources/AddonChat.php#L343

The $subActions array is defined, overthere theres 2 strings:

'general' => 'self::generalSettings',
         'look' => 'self::lookSettings'

Just change the self part with static

so it would look like this:

      $subActions = array(
         'general' => 'static::generalSettings',
         'look' => 'static::lookSettings'
      );
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

vsky

Thanks Suki,

Getting closer i now don't get the white screen but i do see the 'setting' and 'look setting' buttons but i have no boxes to add any settings ?

sorry to be such a pain and thanks for the support so far.

thanks again

Suki

Sorry for the late response, will add some changes to the files and attach a new version here shortly.

The changes would basically be changing any "self" word with "static" on /Sources/AddonChat.php file.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

vsky

Hi Suki,

Great thanks very much, i did try changing all to 'static' but had no luck...

Suki

What do you mena with "no luck"?  you couldn't change them or the change did nothing?
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

vsky

Hi Suki,
i changed the details in the php file ok, but it still dd not work.

i could create you an account and PM you the details if you have time so you can see what i mean..

Suki

What do you mean by "don't work"  can you please be more specific?

I'm still not sure if you installed the mod properly so its difficult to tell you what exactly is causing the issue.

Is there any error in your error log?  or your server error log?
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

vsky

Hi Suki,
i am sorry i will try to explain better.
Ok i just started again with a clean brand new forum, SMF 2.0.9 No other Mods installed,
Installed the AddonChat mod with Package Manager, Once Installed this tried to take me to the AddonChat settings page but it was just a white page..
I then Changed the 'self to 'static' in the AddonChat.php in Sources and again all i get is a white page.


'general' => 'self::generalSettings',
         'look' => 'self::lookSettings'

Just change the self part with static

so it would look like this:

      $subActions = array(
         'general' => 'static::generalSettings',
         'look' => 'static::lookSettings'
      );

I then noticed that the files had not been copied to the themes folder, i did this and then had chat Integration appear in configuration.
when i click chat Integration i see a page with 'look' and 'look settings' but nothing else.
i.e nowhere to add my addonchat details...

this is as far as i have got at the moment.

don't know what else i can say to explain it better sorry.

Suki

Sorry for the late response.

Try the attached zip.  Un zip it and move all the files and folders to your Source folder and make sure your existing files gets overwritten by the new ones.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

vsky

Hi Suki,
Firstly Sorry for the Long delay in replying,
I have tried all sorts to get your mod working with no luck. I have a feeling it is down to the php version that is in use.

At the moment I just have Addonchat as a popup and users just login in when they want to.

I have also created a page as below for use with proboards  :-X to see if I can get it to work with SMF,
Could you please help with the section below in blue,

{ iconsize: 0, autologin: true, username: proboards.data [nofollow]('user').username }

as I am unsure how to hook the usernames from SMF to the above, if this is at all possible ?


Pro Boards Setup below, I created a page with Simple Portal..

Part one: Create the chat page
1. In forum admin under structure select Custom Pages
2. Click Create New Custom Page.
3. Type Chat as the Title and chat as the ID then click the create button.
4. Select from Layouts "Blank" then at bottom of page click Submit
5. Click the HTML tab.
6. Paste the embedded chat code into the HTML. Place <center> before the code and </center> after the code.
7. Edit the portion of this code that reads
{ iconsize: 0 }
and replace it with
{ iconsize: 0, autologin: true, username: proboards.data [nofollow]('user').username }
Then Save Changes.


Part two: Place your chat link into the navigation menu
I used Ultimate menu to add a new Tab to the Navigation Panel

Thanks for your help
Hope you have a Fantastic 2015

Regards
Vsky

Suki

Whats your php version? I may install that on a vm to properly test this mod on it.

As for this part:  { iconsize: 0, autologin: true, username: proboards.data('user').username }

It depends, where exactly are you putting this?  what exactly does this code do?  it seems to me that this part is pseudo code that gets parsed sometime later with something else, if thats the case, you can skip that and directly use $context['user']['name']

But that depends on where exactly are you trying to put the code and that will only work for SMF, I have no idea how proboards works though.

In essence, if you want to put your chat in a poup page, this pop up page needs to be done in php and has to include SSI.php so you can have access to SMF's vars and resources.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Advertisement: