mChat

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in the Customisations Database.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTICE: This forum is only for the announcement of new releases and/or updates of MODs. Any MOD support should be obtained through the Customisations Database in the support area designated for each MOD.

A direct link to support for each MOD is in the first post of the respective topic.
Locked
User avatar
Gemini_13
Registered User
Posts: 4
Joined: Sun Aug 02, 2009 7:07 pm
Location: Kyiv, Ukraine
Contact:

Re: mChat

Post by Gemini_13 »

Delete this post please
I use translator

Gadget27
Registered User
Posts: 22
Joined: Mon May 18, 2009 8:53 am
Location: France (Eure)
Contact:

Re: mChat

Post by Gadget27 »

joebart72 wrote:
joebart72 wrote:
oli42k9 wrote:I think i just found a little bug in mchat.

If using the bbcode img
it returns a space before the last slash

Code: Select all

[img]http://images-2.redbubble.net/img/art/size:large/view:main/938755-2-old-bathtub-on-rooftop.jpg[ /img]
Even more it dit not implement de img tags at the textbox
Hello, I've athe same problem with bbcode image : If my URL is too long, bbcode dosn't work..

If URL is short, that's OK.

Any idea ? Thanks ;)
.......
For this problem it's very simple...

Open mchat.php
Find:

Code: Select all

$mchat_message_max_word = 100; /* Maximum length of words in message (recommended from 50 to 150). (set 0 to disable) */
and replace 100 by 0 to disable
because your link for img is one word of many 100 characters

Sorry for my english but code is good :lol:
I learn english with phpbb.com :)

joebart72
Registered User
Posts: 743
Joined: Thu Feb 01, 2007 5:54 am

Re: mChat

Post by joebart72 »

Thanks Gadget, I thought I'll never had an answer... :mrgreen:
I learn English with phpbb.com :)

Silverback420
Registered User
Posts: 155
Joined: Sat Jun 20, 2009 11:01 pm

Re: mChat

Post by Silverback420 »

Is the chatbox set to autopurge or do you have to do it yourself by clicking on the button that says remove all messages?

Is this all you have to do to delete the database from old messages?

I ask because i thought once you got to 50 posts in the chatbox it would autopurge?

Gadget27
Registered User
Posts: 22
Joined: Mon May 18, 2009 8:53 am
Location: France (Eure)
Contact:

Re: mChat

Post by Gadget27 »

Silverback420 wrote:Is the chatbox set to autopurge or do you have to do it yourself by clicking on the button that says remove all messages?

Is this all you have to do to delete the database from old messages?

I ask because i thought once you got to 50 posts in the chatbox it would autopurge?
Open mchat.php

Find:

Code: Select all

$mchat_archive_limit = 20; /* The maximum number of messages in archive page (recommended from 10 to 50). */
Add after:

Code: Select all

$mchat_contain_limit = 100; /* maximum de messages dans la table */
You can replace 100 by then number of messages you want to preserve...

Find:

Code: Select all

// Message row
Add Before:

Code: Select all

// Run query to get the total message rows...
      $sql = 'SELECT COUNT(message_id) AS mess_id FROM '.MCHAT_TABLE;
      $result = $db->sql_query($sql);
      $mchat_total_message = $db->sql_fetchfield('mess_id');
      $db->sql_freeresult($result);
   // Run query to get the first message id...
      $sql = 'SELECT * FROM '.MCHAT_TABLE.' ORDER BY message_id ASC';
  $result = $db->sql_query_limit($sql, 1);
  $rows = $db->sql_fetchrowset($result);
  $db->sql_freeresult($result);
  foreach($rows as $row)
  {
  $first_id = $row['message_id'];
  }
Find:

Code: Select all

'MCHAT_CLASS' => ($row['message_id'] % 2) ? 1 : 2
        ));
      }
      $db->sql_freeresult($result);
Replace by:

Code: Select all

'MCHAT_CLASS' => ($row['message_id'] % 2) ? 1 : 2
    ));
  }
  $delete_id = $mchat_total_message - $mchat_contain_limit + $first_id;
  $sql = 'DELETE FROM ' .MCHAT_TABLE. '
            WHERE message_id < ' . $delete_id;
  $db->sql_query($sql);
And it'good... you keep the last 100 messages permanently or other number you choose ;)
I learn english with phpbb.com :)

Silverback420
Registered User
Posts: 155
Joined: Sat Jun 20, 2009 11:01 pm

Re: mChat

Post by Silverback420 »

Can I ask how its set up in standard form?

Does it delete them as soon as its hit 100 then? i.e. it only keeps the last 100 messages and deletes the rest?

fasko
Registered User
Posts: 185
Joined: Wed Jan 28, 2009 9:49 am

Re: mChat

Post by fasko »

Gemini_13 wrote:I on the forum did not have the module of ACP to mchat and I made off him today. It can someone useful.
mChat with ACP.rar
In an archive:
it is a new file of mchat.php with null string of password(!)
- files for ACP
- localization on three languages: English, Russian, Ukrainian

After setting in ACP add the module from a list and all.

p.s. English does not know, that is why through translator :roll:

------

I am sorry, boys! I entangled archives. :oops: :oops:
Thanks
Sorry for my english

katey
Registered User
Posts: 3
Joined: Sun Aug 02, 2009 10:53 am

Displaying Online List

Post by katey »

Anybody? How can i display online list in mChat??

User avatar
Gemini_13
Registered User
Posts: 4
Joined: Sun Aug 02, 2009 7:07 pm
Location: Kyiv, Ukraine
Contact:

Re: mChat

Post by Gemini_13 »

fasko, тot able to translate :? Knowledges in English are very small. Does it can you will be able to describe it it is more simpler for a translator? Does it can we will be able on Russian to talk?

Confess, it is ashamed, but can not understand that you ask :oops:

I can not yet send private reports(
I use translator

fasko
Registered User
Posts: 185
Joined: Wed Jan 28, 2009 9:49 am

Re: mChat

Post by fasko »

Gemini_13 wrote:fasko, тot able to translate :? Knowledges in English are very small. Does it can you will be able to describe it it is more simpler for a translator? Does it can we will be able on Russian to talk?

Confess, it is ashamed, but can not understand that you ask :oops:

I can not yet send private reports(

Можно ли изменить что все URL-адреса на вкладке цензуры
Sorry for my english

Silverback420
Registered User
Posts: 155
Joined: Sat Jun 20, 2009 11:01 pm

Re: mChat

Post by Silverback420 »

Jaifaime wrote:Here's everything I am using myself in my mchat.

New Topic/Reply Notification

This will add a new message inside mchat that will notify users of a new topic or reply. It will be automatically posted under the user name of whoever made the new topic/reply, and it will provide a link to the new topic/reply.
Note: This modification was originally created by AllCity, I have altered it to display a custom, editable text when a new topic or reply is made, rather than "piggybacking" off of existing text already in the system.

Open: /language/en/common.php
As always, make a backup before you proceed.

Find:

Code: Select all

	'MIB'					=> 'MiB',
Add after, on a new blank line:

Code: Select all

	'MCHAT_NEW_TOPIC'		=> '<strong>System Message - New Topic</strong>',
	'MCHAT_NEW_REPLY'		=> '<strong>System Message - New Reply</strong>',
Open: /includes/functions_posting.php
As always, make a backup before you proceed.

Find:

Code: Select all

unset($sql_data[POSTS_TABLE]['sql']);
Add after, on a new blank line:

Code: Select all

          /* ============= mChat Start ============= */
          global $table_prefix;
          // Add name for db.
          define('MCHAT_TABLE', $table_prefix.'mchat');
          // New post/message.
          if ($post_mode == 'post')
          {
            // For new post
            $mchat_new_data = $user->lang['MCHAT_NEW_TOPIC'];
          }
            else
          {
            // For new message
            $mchat_new_data = $user->lang['MCHAT_NEW_REPLY'];
          }
          // Data...
          $message = utf8_normalize_nfc($mchat_new_data.': [url='.generate_board_url().'/viewtopic.'.$phpEx.'?p='.$data['post_id'].'#p'.$data['post_id'].']'.$subject.'[/url]');
          // Add function part code from http://wiki.phpbb.com/Parsing_text
          $uid = $bitfield = $options = ''; // will be modified by generate_text_for_storage
          generate_text_for_storage($message, $uid, $bitfield, $options, true, false, false);
          $sql_ary = array(
            'user_id' => $user->data['user_id'],
            'username' => $user->data['username'],
            'user_colour' => $user->data['user_colour'],
            'user_ip' => $user->data['session_ip'],
            'message' => $message,
            'bbcode_bitfield' => $bitfield,
            'bbcode_uid' => $uid,
            'bbcode_options' => $options,
            'message_time' => time()
          );
          $sql = 'INSERT INTO '.MCHAT_TABLE.' '.$db->sql_build_array('INSERT', $sql_ary);
          $db->sql_query($sql);
          /* ============== mChat End ============== */ 
So if i only want it to display new topics and not replies, im assuming i just add the following line,

MCHAT_NEW_TOPIC' => '<strong>System Message - New Topic</strong>',

and not the one that says new reply?

I then want to know how many messages are saved in the archive as standard? im assuming it must delete at some point? And lastly, if u remove a message It doesnt remove for other members unless they refresh the page, is there a way of changing this?

User avatar
camm15h
Former Team Member
Posts: 4981
Joined: Wed Jul 30, 2003 1:02 am
Location: Hull, UK
Name: Paul Cammish

Re: mChat

Post by camm15h »

fasko wrote:Можно ли изменить что все URL-адреса на вкладке цензуры
Fasko please post using English, thanks.

autinhyeu
Registered User
Posts: 685
Joined: Mon Apr 14, 2008 6:34 am
Location: Vietnamese
Contact:

Re: mChat

Post by autinhyeu »

this is a problem in my forum:
error mchat
error mchat
error_mchat.PNG (18.39 KiB) Viewed 338 times
and i can't click Send, Smilies & BBcodes :(
i use mchat_ajax_mini.js file fresh...
how can fix it???
thank you very much..
phpBB Community in Vietnamese: http://www.phpbbvn.com

Sorry, my English language is fine impossible

Silverback420
Registered User
Posts: 155
Joined: Sat Jun 20, 2009 11:01 pm

Re: mChat

Post by Silverback420 »

sifon4o wrote:Can someone explain how to change the colour? I want to make the background black and the text white shince I use black pearl, but I dont know how to do it.
Edit: Never mind, it just needed some time to change :mrgreen:
How did you change the background colour?

Ignore this queston, i worked this one out. 1 down, 3 to go lol

User avatar
oli42k9
Registered User
Posts: 3
Joined: Thu Jul 16, 2009 9:20 am
Location: Belgium- Antwerp region

Re: mChat

Post by oli42k9 »

Gadget27 wrote:
joebart72 wrote:
joebart72 wrote:
oli42k9 wrote:I think i just found a little bug in mchat.

If using the bbcode img
it returns a space before the last slash

Code: Select all

[img]http://images-2.redbubble.net/img/art/size:large/view:main/938755-2-old-bathtub-on-rooftop.jpg[ /img]
Even more it dit not implement de img tags at the textbox
Hello, I've athe same problem with bbcode image : If my URL is too long, bbcode dosn't work..

If URL is short, that's OK.

Any idea ? Thanks ;)
.......
For this problem it's very simple...

Open mchat.php
Find:

Code: Select all

$mchat_message_max_word = 100; /* Maximum length of words in message (recommended from 50 to 150). (set 0 to disable) */
and replace 100 by 0 to disable
because your link for img is one word of many 100 characters

Sorry for my english but code is good :lol:
Ok, first part works now , but i still have to fill in the img tags myself , they don't get implemented by the button.


an other Q= is there a possibility to put the text input and bbcodes, smiles ect on top of the chat .. ?
thanks

Locked

Return to “[3.0.x] MOD Database Releases”