[CDB] mChat

A place for Extension Authors to post and receive feedback on Extensions still in development. No Extensions within this forum should be used within a live environment!
Ideas Centre
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: Extensions Development rules

IMPORTANT FOR NEEDED EVENTS!!!
If you need an event for your extension please read this for the steps to follow to request the event(s)
Locked
User avatar
kasimi
Extension Customisations
Extension Customisations
Posts: 3768
Joined: Sat Sep 10, 2011 7:12 pm
Location: Germany
Contact:

Re: [DEV] mChat

Post by kasimi » Sat Jan 09, 2016 12:59 pm

  1. Use a decent text editor like Notepad++ and open /ext/dmzx/mchat/styles/prosilver/template/mchat.min.js
  2. Find #page-body
  3. Replace with #phpbb
  4. Save and upload the file
  5. CTRL+F5 your board
The fix will be included in the next release.

User avatar
donsenilo
Registered User
Posts: 303
Joined: Wed Oct 08, 2014 6:23 pm
Name: Markus
Contact:

Re: [DEV] mChat

Post by donsenilo » Fri Jan 15, 2016 11:27 am

Hi

the standalone-function is a little bit confusing ...

I thought this would open the chat in a new window or tab. Is this possible ?

Jon_Hart
Registered User
Posts: 18
Joined: Tue Dec 29, 2015 10:03 am

Re: [DEV] mChat

Post by Jon_Hart » Sat Jan 16, 2016 2:50 am

I have my phpbb installation within another folder, so the url is like example.com/site/forum. I don't know if this is related to my issue, but I thought I'd mention it anyway.

So my current issue is whenever users post new messages the link to their profile is missing the forum/.

So when clicked it sends you to example.com/site/memberlist.php? etc. Which of course doesn't exist.

If the page is refreshed all the previous profile links fix themselves, but any new messages posted after the page reload have the broken profile links in the usernames.

Any ideas on what is causing this? Seems like it could be the js not creating the links right and once the page is reloaded and displays the content with straight php it works. I have no idea.

User avatar
GoBieN
Registered User
Posts: 538
Joined: Fri Mar 05, 2004 5:22 pm
Location: Belgium
Contact:

Re: [DEV] mChat

Post by GoBieN » Sun Jan 17, 2016 12:07 am

Yes already known and discussed. Links generated by AJAX suffer from this bug. However the consensus is that it's not a bug and you need to enable URL rewriting in the ACP to fix this.

Or write your own rewrite rules for htaccess (apache) or nginx like I did.

User avatar
kasimi
Extension Customisations
Extension Customisations
Posts: 3768
Joined: Sat Sep 10, 2011 7:12 pm
Location: Germany
Contact:

Re: [DEV] mChat

Post by kasimi » Sun Jan 17, 2016 4:39 pm

Jon_Hart wrote:So when clicked it sends you to example.com/site/memberlist.php? etc. Which of course doesn't exist.
Fixed in the upcoming release, thanks for reporting.

Jon_Hart
Registered User
Posts: 18
Joined: Tue Dec 29, 2015 10:03 am

Re: [DEV] mChat

Post by Jon_Hart » Tue Jan 19, 2016 10:57 pm

Okay cool, thanks for your hard work!

de-coder
Registered User
Posts: 4
Joined: Sun Jun 26, 2011 6:08 am

Re: [DEV] mChat

Post by de-coder » Wed Jan 20, 2016 1:36 pm

I have a phpbb 3.1.7 Forum with "black" style ( https://www.phpbb.com/customise/db/style/black/ )

When i activate mchat, all the icons in the top row of my start screen (nav header?!) with acp, faq and so on are cryptic like chineese signs. When i click to another screen, the icons are ok. Back on start screen they are cryptic.

Any idea? :?:

Cernodile
Registered User
Posts: 2
Joined: Wed Jan 20, 2016 5:21 pm

Re: [DEV] mChat

Post by Cernodile » Wed Jan 20, 2016 5:23 pm

The controller must return a response (Array(add => true) given).
I got this error, haven't changed anything.
Fresh install.
Forums located at https://my site/forums/

Jerzykk
Registered User
Posts: 13
Joined: Wed Oct 28, 2015 11:53 am

Re: [DEV] mChat

Post by Jerzykk » Wed Jan 20, 2016 5:52 pm

I want to move mChat to the homepage. I tried to do this this way:

Code: Select all

<iframe src="http://localhost/my_site/forum/app.php/mchat" width="500" height="300" style="border: none;"></iframe>
and it works, but not only the chat window is loaded to iframe but also the forum header and the footer.

So I tried to modify this code:
https://www.phpbb.com/customise/db/mod/ ... 66#p269266

and I created file mchat_standalone.php (in the forum subdirectory) containing this modified code:

Code: Select all

<?php

 define('IN_PHPBB', true);

 $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
 $phpEx = substr(strrchr(__FILE__, '.'), 1);

 include($phpbb_root_path . 'common.' . $phpEx);
 

 $user->session_begin();
 $auth->acl($user->data);
 $user->setup();

 $html='<html><head><link href="'.$phpbb_root_path.'ext/dmzx/mchat/styles/prosilver/theme/mchat.css" rel="stylesheet" /></head><body>';
 $html.='<script type="text/javascript" src="'.$phpbb_root_path.'assets/javascript/editor.js"></script>';
 $html.='<script type="text/javascript" src="'.$phpbb_root_path.'assets/javascript/jquery.min.js"></script>';
 $html.='<script type="text/javascript" src="'.$phpbb_root_path.'styles/prosilver/template/ajax.js"></script>';
 $html.='<script type="text/javascript">
// <![CDATA[
   var root_path = "'.$phpbb_root_path.'";
// ]]>   
  </script>';
  echo $html;

 $mchat_installed = (!empty($config['mchat_version']) && !empty($config['mchat_enable'])) ? true : false;
 if ($mchat_installed && $auth->acl_get('u_mchat_view'))
 {
     
   if(!defined('MCHAT_INCLUDE') && $config['mchat_on_index'] && !empty($user->data['user_mchat_index']))
   {
      define('MCHAT_INCLUDE', true);
      $mchat_include_index = true;
      include($phpbb_root_path . 'ext/dmzx/mchat/controller/mchat.' . $phpEx);
   }   

   //$user->add_lang('mods/mchat_lang');

   $template->assign_vars(array(
         'ROOT_PATH'   => $phpbb_root_path,   
   ));

   $template->set_filenames(array('body' => 'ext/dmzx/mchat/styles/prosilver/template/mchat_body.html'));

   $template->display('body');
 }

 echo '</body></html>';
?>
but it doesn't work. What I do wrong?

PS I have installed phpBB 3.1.6 (in the forum subdirectory) and mChat 0.3.2 (in the forum/ext/dmzx/mchat subdirectory):
viewtopic.php?f=456&t=2281451

minusbrain
Registered User
Posts: 6
Joined: Mon May 11, 2009 8:25 pm

Re: [DEV] mChat

Post by minusbrain » Thu Jan 21, 2016 8:37 pm

mrgtb wrote:
spaceace wrote:was curious and tested this on an altervista site and it does not work. had issues with my extension not working on altervista as well. has to do with app.php and routing.

just sitting on index page and get the following upon auto refresh in chat
/forum/chat 404 (Not Found)
Uncaught Error: Syntax error, unrecognized expression: #mChatLoadIMG,#mChatOkIMG,#mChatPauseIMG,#mChatRefreshTextNo,#mChatPauseIMG,
and when you submit a post, you get the following along with the above
Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check http://xhr.spec.whatwg.org/.
that is in the console. otherwise, without the console open, it does nothing but go into a refresh loop. no error gets displayed anywhere. but after a minute or so, the error fart is heard
The problem might possibly be with Mod Security server uses that doesn't like app.php in some instances and throws up a 404 error page. I've had similar issues with mod security causing issues with official Pages mod (when adding WWW manually into a Page URL). I would check if your server host is using mod security as maybe a possible cause the 404 problem
I got the same problem, But I run an own server - Raspian (Debian 8 ) What settings do I have to use and where do I set them? At the ext php Gallery the Error 404 is displayed at mine too, from nichtvergessen (once), now Stanislav Atanasov anavaro.com ( https://github.com/satanasov/phpbbgallery).

marj
Registered User
Posts: 4
Joined: Wed Jan 20, 2016 8:26 pm

Re: [DEV] mChat

Post by marj » Thu Jan 21, 2016 9:10 pm

When I turn on chat on the forum, the main paige every time after logging moves straight to inbox in chat. Something like autofocus for the element of input. Is it possible to repair?

Testing account:
Login:test
pass:Testranczo1

url:ranczo.org
phpbb 3.1.7-PL1 / we_universal

User avatar
GoBieN
Registered User
Posts: 538
Joined: Fri Mar 05, 2004 5:22 pm
Location: Belgium
Contact:

Re: [DEV] mChat

Post by GoBieN » Thu Jan 21, 2016 11:16 pm

Mod_security debian/ubuntu. See at the end of article on how to disable for a virtualhost.
https://www.digitalocean.com/community/ ... ian-ubuntu

User avatar
spaceace
Registered User
Posts: 1857
Joined: Wed Jan 30, 2008 8:50 pm
Contact:

Re: [DEV] mChat

Post by spaceace » Thu Jan 21, 2016 11:34 pm

minusbrain wrote:I got the same problem, But I run an own server - Raspian (Debian 8 ) What settings do I have to use and where do I set them? At the ext php Gallery the Error 404 is displayed at mine too, from nichtvergessen (once), now Stanislav Atanasov anavaro.com ( https://github.com/satanasov/phpbbgallery).
sorry. not my extension. i was just reporting an issue found on Altervista free hosting as i had issues with my chat extension that i got resolved

User avatar
John connor
Registered User
Posts: 2186
Joined: Fri Nov 14, 2014 5:14 pm
Location: U S Of A
Name: Aaron
Contact:

Re: [DEV] mChat

Post by John connor » Fri Jan 22, 2016 3:23 am

GoBieN wrote:Mod_security debian/ubuntu. See at the end of article on how to disable for a virtualhost.
https://www.digitalocean.com/community/ ... ian-ubuntu

Is mod_security part of LAMP already? Because right now I use a shared host and would like to eventually move to a VPS.

minusbrain
Registered User
Posts: 6
Joined: Mon May 11, 2009 8:25 pm

Re: [DEV] mChat

Post by minusbrain » Fri Jan 22, 2016 2:04 pm

Code: Select all

<VirtualHost *:80>
        ServerName mydomane.com
        ServerAdmin admin@mydomane.com
        DocumentRoot /var/www/html/
        <Directory /var/www/SK/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride none
                Order allow,deny
                allow from all
        </Directory>
        ErrorLog /var/log/apache2/error.log
        LogLevel warn
        CustomLog /var/log/apache2/access.log combined
        ServerSignature On

<IfModule security2_module>
    SecRuleEngine Off
</IfModule>

<IfModule mod_security.c>
  SecFilterEngine Off
  SecFilterScanPOST Off
</IfModule>

</VirtualHost>
@john Conner: Thanks for your support. This is my VHost, I did restart my raspian but it still displays the Error 404. The Mod_Security isn't installed at the raspian.

Note: The board was migrated from one host to another.

Locked

Return to “Extensions in Development”