News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Addonchat Integration script

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

Previous topic - Next topic

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.

Advertisement: