[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!
Get Involved
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
GoBieN
Registered User
Posts: 543
Joined: Fri Mar 05, 2004 5:22 pm
Location: Belgium
Contact:

Re: [DEV] mChat

Post by GoBieN » Fri Jan 22, 2016 7:47 pm

AllowOverride none
change to
AllowOverride all
Right now your .htaccess file is ignored because of that line. In the .htaccess file is a rewrite rule for app.php
Last edited by GoBieN on Fri Jan 22, 2016 10:50 pm, edited 1 time in total.

User avatar
John connor
Registered User
Posts: 2293
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 10:40 pm

NM

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

Re: [DEV] mChat

Post by marj » Sun Jan 24, 2016 6:16 pm

I'd like to change name="message" (mchat_body.html)

Code: Select all

<!-- IF MCHAT_INPUT_TYPE -->
<input type="text" name="message" class="inputbox medium" id="mchat-input" />
eg. to: name="message2"

Where do I need to add changes to make chat work properly?

User avatar
dmzx
Registered User
Posts: 780
Joined: Fri Sep 05, 2014 6:48 am
Location: The Netherlands
Contact:

Re: [DEV] mChat

Post by dmzx » Sun Jan 24, 2016 7:15 pm

First post updated, new language edits ;)
Contact me on dmzx-web.net
 Need a Host or buy me a beer Donate and try binance.com

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

Re: [DEV] mChat

Post by kasimi » Sun Jan 24, 2016 7:52 pm

marj wrote:I'd like to change name="message" (mchat_body.html)
In the latest version 0.3.3 you'd have to take a look at /core/mchat.php. What's the reason behind this?

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

Re: [DEV] mChat

Post by marj » Sun Jan 24, 2016 9:08 pm

kasimi wrote:
marj wrote: What's the reason behind this?
Problem is "autoselect the textarea to write in"

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.

Testing account:
Login:test
pass:Testranczo1
url:ranczo.org

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

Re: [DEV] mChat

Post by minusbrain » Sun Jan 24, 2016 10:06 pm

@GoBieN

thank you very much, it works! :D

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

Re: [DEV] mChat

Post by kasimi » Mon Jan 25, 2016 2:25 am

marj wrote:Problem is "autoselect the textarea to write in"
The following code which is added on your index page is causing this issue, specifically the call to insert_text():

Code: Select all

<script type="text/javascript">
   window.onload = function() {
        // CHANGE THIS WITH YOUR FUNCTION IF YOU WANT A CUSTOM FUNCTION
        parent.parent.insert_text(getParameter(document.location.href, "code"), true);
   }

   function getParameter(queryString, parameterName) {
        var parameterName = parameterName + "=";
        if(queryString.length > 0) {
            begin = queryString.indexOf(parameterName);
            if(begin != -1) {
                begin += parameterName.length;
                end = queryString.indexOf("&", begin);
                if(end == -1) {
                    end = queryString.length;
                }
                return unescape(queryString.substring(begin, end));
            }
            return "";
        }
   }

</script>
This code isn't added by mChat, you should ask whoever wrote that code for support.

Apart from that, changing the name="message" would break more things than it would fix, for example inserting smilies and bbcodes would stop working. You'd have to edit phpBB core files as well.

Chappen
Registered User
Posts: 18
Joined: Tue Mar 09, 2010 10:25 am

Re: [DEV] mChat

Post by Chappen » Mon Jan 25, 2016 8:08 am

After installed mchat 0.3.3 i got the sound everytime the auto update run... how to disable that, so it only come when a message is written, like it was before

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

Re: [DEV] mChat

Post by John connor » Mon Jan 25, 2016 12:07 pm

When I go to update do I have to delete data? I don't really want to have to go and change permissions all over again. What I normally do when I update an extension is disable/delete data and remove the files from the FTP.

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

Re: [DEV] mChat

Post by kasimi » Mon Jan 25, 2016 12:50 pm

Chappen wrote:After installed mchat 0.3.3 i got the sound everytime the auto update run
Can you give me a test account or is your board on localhost? Is anyone else having this issue?
John connor wrote:When I go to update do I have to delete data?
Yes I'm afraid so. The mchat_config table has been removed in 0.3.3 and all its data has been merged with phpBB's config table.

I'm not sure if the following works but you can give it a try. Note that you should have your files and database backed up completely before following the steps below!
  1. Backup the following tables:
    1. phpbb_acl_groups
    2. phpbb_acl_options
    3. phpbb_acl_roles
    4. phpbb_acl_roles_data
    5. phpbb_acl_users
    6. If you want to keep your mChat messages, also backup phpbb_mchat
  2. Disable mChat
  3. Delete mChat data
  4. Delete mChat files from your server
  5. Upload new mChat 0.3.3 files
  6. Enable mChat
  7. Delete the tables that you created a backup of in the first step
  8. Restore the backup you created in the first step
  9. If you backed up your phpbb_mchat table in step 1f you need to run this query in your database manager:

    Code: Select all

    ALTER TABLE phpbb_mchat ADD edit_time int(11) NOT NULL DEFAULT '0' AFTER message_time;
Last edited by kasimi on Mon Jan 25, 2016 5:31 pm, edited 1 time in total.

User avatar
Dr.Death
QA Team
Posts: 363
Joined: Fri Apr 25, 2003 10:04 am
Location: Germany
Contact:

Re: [DEV] mChat

Post by Dr.Death » Mon Jan 25, 2016 2:56 pm

Hi, thx for your work....

... I'm missing the code updates on github : https://github.com/dmzx/mChat-Extension
Doc.

Chappen
Registered User
Posts: 18
Joined: Tue Mar 09, 2010 10:25 am

Re: [DEV] mChat

Post by Chappen » Mon Jan 25, 2016 5:12 pm

kasimi wrote:
Chappen wrote:After installed mchat 0.3.3 i got the sound everytime the auto update run
Can you give me a test account or is your board on localhost? Is anyone else having this issue?

I disabled 0.3.2 and then installed 0.3.3
It dont run on local host, one.com is hosting....

mb-mods.dk is the link....

Test account for what...?

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

Re: [DEV] mChat

Post by kasimi » Mon Jan 25, 2016 5:29 pm

Chappen wrote:Test account for what...?
I was assuming you have the chat disabled for guests. This is the error you're getting: Unknown column 'm.edit_time' in 'where clause'.

Did you follow the steps outlined earlier and also backed up the phpbb_mchat table? I forgot about the changes to that table in 0.3.3, so by restoring the backup those changes got reverted. :roll:

Run this query in your database manager and it should be fixed:

Code: Select all

ALTER TABLE phpbb_mchat ADD edit_time int(11) NOT NULL DEFAULT '0' AFTER message_time;

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

Re: [DEV] mChat

Post by marj » Mon Jan 25, 2016 6:57 pm

kasimi wrote:
marj wrote:Problem is "autoselect the textarea to write in"
The following code which is added on your index page is causing this issue, specifically the call to insert_text():

Code: Select all

<script type="text/javascript">
   window.onload = function() {
        // CHANGE THIS WITH YOUR FUNCTION IF YOU WANT A CUSTOM FUNCTION
        parent.parent.insert_text(getParameter(document.location.href, "code"), true);
   }

   function getParameter(queryString, parameterName) {
        var parameterName = parameterName + "=";
        if(queryString.length > 0) {
            begin = queryString.indexOf(parameterName);
            if(begin != -1) {
                begin += parameterName.length;
                end = queryString.indexOf("&", begin);
                if(end == -1) {
                    end = queryString.length;
                }
                return unescape(queryString.substring(begin, end));
            }
            return "";
        }
   }

</script>
This code isn't added by mChat, you should ask whoever wrote that code for support.

Apart from that, changing the name="message" would break more things than it would fix, for example inserting smilies and bbcodes would stop working. You'd have to edit phpBB core files as well.
Thank you very much for your help.
This specific code was added by plug TinyPic (https://www.phpbb.com/customise/db/extension/tinypic/) - I switched it off and it's working properly. So it's no longer necessary to change the name ="message"
Regards

Locked

Return to “Extensions in Development”