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
1234homie
Registered User
Posts: 439
Joined: Fri Sep 26, 2008 3:17 pm

Re: mChat

Post by 1234homie » Fri Jul 10, 2009 3:39 pm

It working on phones?

MphUnit
Registered User
Posts: 12
Joined: Mon Apr 12, 2004 3:21 am

Re: mChat

Post by MphUnit » Fri Jul 10, 2009 4:24 pm

bob_raid wrote:Can I add permission in mchat.php for group created under User defined groups?
I too was looking for this feature and couldn't find it. But after some trial and error, I think I found a way to give defined user groups permission to use the chat. Actually I went at it from blocking certain groups that I did not want to allow chatting -- it involves adding a few lines to your mchat.php file

Open mchat.php and find:

Code: Select all

$mchat_add_mess = (($mchat_allow_user_add_mess && $auth->acl_get('u_') && $user->data['is_registered']) || ($mchat_allow_guest_add_mess && $user->data['user_id'] == ANONYMOUS)) ? true : false;
on a new line following that,
add this:

Code: Select all

if($user->data['group_id'] == 8)
{
  $mchat_add_mess = false;
} 
where 8 is your group_id number you want to block access to

Save, upload, and make sure to purge your cache in your ACP.

Basically those few lines of code will deny access to certain groups and allow all other groups to continue to use the chat. I've tested this on my boards blocking access to three separate groups (users, COPA users, and a custom group) and it works great. All registered users are still able to view the chat log, but I'm actually only allowing my admins/moderators/group_id 7 to chat. In this case my mchat.php section looks like this:

Code: Select all

$mchat_add_mess = (($mchat_allow_user_add_mess && $auth->acl_get('u_') && $user->data['is_registered']) || ($mchat_allow_guest_add_mess && $user->data['user_id'] == ANONYMOUS)) ? true : false;
if($user->data['group_id'] == 8)
{
  $mchat_add_mess = false;
} 
if($user->data['group_id'] == 2)
{
  $mchat_add_mess = false;
} 
if($user->data['group_id'] == 3)
{
  $mchat_add_mess = false;
} 
As a warning, I know only enough code to get myself in trouble, so it might be good for someone else to verify this works. :oops:

User avatar
Nawid
Registered User
Posts: 329
Joined: Sat Jun 27, 2009 4:32 pm
Contact:

Re: mChat

Post by Nawid » Fri Jul 10, 2009 7:09 pm

seducerx wrote: how does this answer my question? so you mean if it works for phpbb 3.0.5, it's safe to say that it will work in version 3.0.4?
Sorry, my mistake, I don't really know if this could work perfectly on 3.0.4 version. I'd say it might work, but I'm not sure :|


And I have 2 questions:
- Is there any way I can minimize the chat?
- Could I do something to only post the new topics instead of posting 'new topics + messages'?
Image
Check SuperNova Orange style on:
SchoolLife.nl
phpBB.com

User avatar
Jaifaime
Registered User
Posts: 170
Joined: Wed Jun 10, 2009 12:16 am

Re: mChat

Post by Jaifaime » Fri Jul 10, 2009 7:52 pm

Nawid wrote:- Could I do something to only post the new topics instead of posting 'new topics + messages'?
in the code given to add to the functions_posting.php file, the part I highlighted in red below is what adds the mchat message when a new reply (not topic) is posted

/* ============= 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['POST_TOPIC'];
}
else
{
// For new message
$mchat_new_data = $user->lang['NEW_MESSAGE'];
}

// 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 in theory you could just comment that part out and it should not display an mchat message if a new reply is posted. You can comment it out by adding the two slashes in front of those lines like so:
// else
// {
// For new message
// $mchat_new_data = $user->lang['NEW_MESSAGE'];
// }

No guarantee on this of course, but I think that should work. As for minimizing the chat, you might be able to find some sort of "collapse" HTML code and wrap that around the <!-- INCLUDE mchat_body.html --> (that you added into the index_body.html file). Pretty sure I remember seeing a mod for collapsible forums or something, could probably go grab the code out of that and use it around the <!-- INCLUDE mchat_body.html -->. That's all not confirmed to work of course, just a "plan of action" I would take if I were looking to do that sort of thing. Good luck :)
This account is inactive. Have a nice day.

User avatar
Nawid
Registered User
Posts: 329
Joined: Sat Jun 27, 2009 4:32 pm
Contact:

Re: mChat

Post by Nawid » Fri Jul 10, 2009 8:19 pm

Thanks for the reply Jaifaime.

I removed the red color looking code, and I tested it on my forum. Now, whenever someone posts a new reply (not a topic, just a message) I get the result on the red arrow.

I fixed it back and now it's normal again (blue arrow)

Image

But, I still don't know how te disable new messages automatically come to the mChat. I just want that it'll work when new topics is being posted...


And I'm not sure how to code to get that minimize thing, an example with "Find, Replace" and "Find, Add After/Before" would be great!

EDIT: The text on the image "Nieuw Bericht" means "New Message"

EDIT2: Found something here >> http://www.stunicholls.com/various/more_again.html But I don't know how to use it :geek:
Image
Check SuperNova Orange style on:
SchoolLife.nl
phpBB.com

User avatar
zeon101
Registered User
Posts: 48
Joined: Sat Dec 02, 2006 3:42 am
Location: Scotland, UK

Re: mChat

Post by zeon101 » Sat Jul 11, 2009 1:32 am

Argh, i've did everything right... and it looks ok. But won't let me post any messages or smilies or whatever....

And no, I don't have other jquery files, as it's a new board I installed yesterday... so there's no other addons.

Could someone please help me? My site is: http://battlefield1943forums.net

Would be greatly appreciated! :cry:

User avatar
Jaifaime
Registered User
Posts: 170
Joined: Wed Jun 10, 2009 12:16 am

Re: mChat

Post by Jaifaime » Sat Jul 11, 2009 2:17 am

To be honest I was taking a shot in the dark, seeing if I could maybe point you in the right direction. Unfortunately that stuffs over my head.
This account is inactive. Have a nice day.

seducerx
Registered User
Posts: 64
Joined: Thu May 14, 2009 7:00 am

Re: mChat

Post by seducerx » Sat Jul 11, 2009 7:57 am

I don't understand this part of the installation process

Under DIY Instructions:

1. Start the installation for database (only founder can run the mode): ./mchat.php?mode=install&code=7g4sgO62AN6MVMa

^ what does this mean? How do I do this? How do I start the installation for database? I'm a founder so I can run this mode, but I don't know how. Thanks in advance for the help.

--------------------------------- and also this part ------------------------------

3. Open file mchat.php and replace the secret code on your!

^ What do I replace the secret code with? What does it mean when it says "replace the secret code on your!" What does your! mean?
Wanna get the woman that you want?

Join us at www.attraxionarts.com

seducerx
Registered User
Posts: 64
Joined: Thu May 14, 2009 7:00 am

Re: mChat

Post by seducerx » Sat Jul 11, 2009 8:51 am

And also, during the installation for the styles, of which, mine is black_pearl (so naturally, I'll have to do the edits for subsilver_2 in the installation process... the it says in the installation that I have to find this line in styles/subsilver2/template/overall_header.html:

<a href="{U_FAQ}"><img src="{T_THEME_PATH}/images/icon_mini_faq.gif" width="12" height="13" alt="*" /> {L_FAQ}</a>

and add after that line this line:

&nbsp; &nbsp;<a href="{ROOT_PATH}mchat.php"><img src="{T_THEME_PATH}/images/icon_mini_groups.gif" width="12" height="13" alt="*" /> mChat</a>

The problem is, I can't find the first line. anything went wrong with my installation?
Wanna get the woman that you want?

Join us at www.attraxionarts.com

seducerx
Registered User
Posts: 64
Joined: Thu May 14, 2009 7:00 am

Re: mChat

Post by seducerx » Sat Jul 11, 2009 9:44 am

---------------------------------------- Installation Successful, so far ---------------------------------------

Hmmm... I kinda installed this successfully on my forum which is version 3.0.4, as it says in the installation file, it is really intended for version 3.0.4 of phpbb.

That is... after answering the above questions (last 2 posts before this) myself. I was able to install this properly without any problems fortunately and hopefully it stays that way, even though I was not able to do the last part of the install process which is this:
seducerx wrote:And also, during the installation for the styles, of which, mine is black_pearl (so naturally, I'll have to do the edits for subsilver_2 in the installation process... the it says in the installation that I have to find this line in styles/subsilver2/template/overall_header.html:

<a href="{U_FAQ}"><img src="{T_THEME_PATH}/images/icon_mini_faq.gif" width="12" height="13" alt="*" /> {L_FAQ}</a>

and add after that line this line:

&nbsp; &nbsp;<a href="{ROOT_PATH}mchat.php"><img src="{T_THEME_PATH}/images/icon_mini_groups.gif" width="12" height="13" alt="*" /> mChat</a>

The problem is, I can't find the first line. anything went wrong with my installation?
^ Do you guys think there's gonna be a problem if I don't do this part (I really can't find the line they're asking me to find)? Please respond to this...


------------------ Issues with the font color and background color-----------------

Now, that the mini-chat is running and functioning on my board, there are 2 problems:

1.) I can't seem to read my messages!!!! On the "type message" box, THE BACKGROUND IS BLACK AND SO IS THE TEXT THAT I AM TYPING!!!.

1st Question: Is there anyway that I can change the color of the background in the "type message" box, or just change the characters that I type, if not the background?

2.) The messages, AS TYPED, APPEAR GRAY!! with WHITE AS THE BACKGROUND!!! Seriously making it hard to read.

2nd Question: Is there anyway that I can change the color of the background in the "message box", or just change the color of the characters in the message box, if not the background?


------------------------------ Here's a snapshot of my forum -----------------------
Minichat color.JPG
Minichat color.JPG (77.44 KiB) Viewed 1176 times
As you can see, it's hard to read the typed messages, as the background is white, and the font of the text is light gray. Unpleasant to the eyes.

Also, it's hard to read the characters typed in the message box. If you examine and observe more carefully, I have typed in the message box the following line Please give me help PHPBB forum!!!!. It's difficult to see it, unless you highlight it. Look below:
minichat color2.JPG
minichat color2.JPG (79.6 KiB) Viewed 1176 times
Please take note of my 3 questions above (including the one in the installation issue)

Here's the link to my site: www.attraxionarts.com/forum

I have disabled guests from posting in the site, but I think you guys get the picture regarding my problem with the posts color and all.
Wanna get the woman that you want?

Join us at www.attraxionarts.com

seducerx
Registered User
Posts: 64
Joined: Thu May 14, 2009 7:00 am

Re: mChat

Post by seducerx » Sat Jul 11, 2009 10:42 am

parkstee wrote:
bthomasowns wrote:how do i change the background color... the white background with grey text is very hard to read!
the CSS file ;)
Sorry but I'm not a computer programmer by default, I'm just a layman, trying to make it in the world of phpbb administration. Where do I find the CSS file? And when I get there, how do I change the font and background color there?
Wanna get the woman that you want?

Join us at www.attraxionarts.com

User avatar
Nawid
Registered User
Posts: 329
Joined: Sat Jun 27, 2009 4:32 pm
Contact:

Re: mChat

Post by Nawid » Sat Jul 11, 2009 11:06 am

go to syles/ (your style) / theme / stylesheet.css
Image
Check SuperNova Orange style on:
SchoolLife.nl
phpBB.com

seducerx
Registered User
Posts: 64
Joined: Thu May 14, 2009 7:00 am

Re: mChat

Post by seducerx » Sat Jul 11, 2009 12:41 pm

Nawid wrote:go to syles/ (your style) / theme / stylesheet.css
Thanks for the reply Nawid.

Alright, I'm here editing the stylesheet.css of the styles I'm about to change.

What part of stylesheet.css do I need to change in order to change the font color of the characters in the text message input and the background? If I change some of these, the text color of the whole forum might change. I want the changes confined to just the minichat...
Wanna get the woman that you want?

Join us at www.attraxionarts.com

User avatar
Nawid
Registered User
Posts: 329
Joined: Sat Jun 27, 2009 4:32 pm
Contact:

Re: mChat

Post by Nawid » Sat Jul 11, 2009 1:03 pm

Hi,

I'm not that great with coding, but I do know that you should edit the stylesheet.css
I had a request once >> http://www.phpbb.com/community/viewtopi ... &t=1674065

I hope you'll manage!

Cheers!
-Nawid
Image
Check SuperNova Orange style on:
SchoolLife.nl
phpBB.com

seducerx
Registered User
Posts: 64
Joined: Thu May 14, 2009 7:00 am

Re: mChat

Post by seducerx » Sat Jul 11, 2009 1:09 pm

Thanks for the help Nawid!!!!

Though I still can't manage...

So I reiterate my earlier question... hoping someone more knowledgeable at coding can give me the help I need in editing the stylesheet.css
seducerx wrote:
Nawid wrote:go to syles/ (your style) / theme / stylesheet.css
Thanks for the reply Nawid.

Alright, I'm here editing the stylesheet.css of the styles I'm about to change.

What part of stylesheet.css do I need to change in order to change the font color of the characters in the text message input and the background? If I change some of these, the text color of the whole forum might change. I want the changes confined to just the minichat...
Wanna get the woman that you want?

Join us at www.attraxionarts.com

Locked

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