Page 45 of 98

Re: [DEV] mChat

Posted: Fri Jan 22, 2016 7:47 pm
by GoBieN
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

Re: [DEV] mChat

Posted: Fri Jan 22, 2016 10:40 pm
by 2600
NM

Re: [DEV] mChat

Posted: Sun Jan 24, 2016 6:16 pm
by marj
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?

Re: [DEV] mChat

Posted: Sun Jan 24, 2016 7:15 pm
by dmzx
First post updated, new language edits ;)

Re: [DEV] mChat

Posted: Sun Jan 24, 2016 7:52 pm
by kasimi
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?

Re: [DEV] mChat

Posted: Sun Jan 24, 2016 9:08 pm
by marj
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

Re: [DEV] mChat

Posted: Sun Jan 24, 2016 10:06 pm
by minusbrain
@GoBieN

thank you very much, it works! :D

Re: [DEV] mChat

Posted: Mon Jan 25, 2016 2:25 am
by kasimi
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.

Re: [DEV] mChat

Posted: Mon Jan 25, 2016 8:08 am
by Chappen
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

Re: [DEV] mChat

Posted: Mon Jan 25, 2016 12:07 pm
by 2600
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.

Re: [DEV] mChat

Posted: Mon Jan 25, 2016 12:50 pm
by kasimi
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;

Re: [DEV] mChat

Posted: Mon Jan 25, 2016 2:56 pm
by Dr.Death
Hi, thx for your work....

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

Re: [DEV] mChat

Posted: Mon Jan 25, 2016 5:12 pm
by Chappen
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...?

Re: [DEV] mChat

Posted: Mon Jan 25, 2016 5:29 pm
by kasimi
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;

Re: [DEV] mChat

Posted: Mon Jan 25, 2016 6:57 pm
by marj
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