News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

NChat - No SQL Save BW shoutbox

Started by nvcnvn, April 13, 2011, 11:30:28 AM

Previous topic - Next topic

nvcnvn

[Link to Mod]

Now public at a open source at https://github.com/nvcnvn/NChat
Everyone are welcome to contribute and develope or fork this repo.

NOTE

+ CHMOD 0666 for these files: l.txt, NChatMess.php, NChatMuteList.php
+ CHMOD 0644 for all the files left
+ CHMOD 0755 for these folders: ./NChat, ./NChat/sounds

You have to set the permission for each group after install the mod! By default just admin can read, write and manager the chatbox.

No SQL - Save Bandwidth

       
  • Your own forum chat box, not an add-on or plug-in of any service.
  • Run on share host.
  • Easy to install, config, modify.
  • Fast and save BW (no SQL queries)
  • Pretty Yahoo Messenger smiles or your own forum smiles.
  • Fast config right next to the chat box
  • Forum time stamp, censored world as forum config
  • And much more.....

Nedd help?
Use support topic or make new issue here https://github.com/nvcnvn/NChat/issues

Update 1.3.2

+ Fix some bugs.
   - Error with "No sound" mode on IE.
   - NChat alwyas not available.

Update 1.3
+ Adding many features.
  - Play a sound when new message comming.
  - Mute, disallow some one from chat (still not work for Guest).
  - Color + Clickable for user name.
+ Change and Optimize.
  - Move the Control Panel to AdminCP >> Modification Settings >> NChat Shoutbox.
  - Move the chat room to example.com/smf/NChat/index.php?acton=room
  - Reduced the time load, BW.
  - SMF smiles list now showing when enabled.
+ Fix some bugs.
  - Scroll issue when reading.
  - Error when switching smiles.
  - Fixed permission for Global Moderator.


Future Developments:
+ Mute an IP.
+ Archive function
+ Channel chat (private chat with one person)

Donation
+ Any donation will help the Mod better!ow


rölyef


nvcnvn


Arantor

The hint is that in order to comply with the rules, there should be no validation errors.

nvcnvn

Quote from: Arantor on April 13, 2011, 06:03:28 PM
The hint is that in order to comply with the rules, there should be no validation errors.

Thanks, I understand!
My Mod just has approved by he SMF Customize Team. I not sure that there is no validation errors left. But I have fix many, many of errors since 12/2010 until now and I will appreciate if you show me is there any issue and I will continued  to fix it!

P/s: sr for my English :D

Groovy™

After you install this mod, the forum I always refresh

Please fix bug :(

RC5

nvcnvn

Quote from: Groovy™ on April 14, 2011, 03:21:09 PM
After you install this mod, the forum I always refresh

Please fix bug :(

RC5

did you CHMOD for 2 file I name in readme??

after that, check the httx://you-forum.com/NChat/index.php by paste it to browser, if any error (may be 403 or 500) check again all the file permission.

CHMOD: NChatMess.php, NChatSetting.php to write able (maybe 0666 or 0777)
all the left maybe 0644 or anything else that can help it run!

Groovy™

I did what you said and still no changes

Protectionist

Got any screenshot of this plugin in action?

nvcnvn


Quote from: nvcnvn on April 14, 2011, 06:21:58 PM
Quote from: Groovy™ on April 14, 2011, 03:21:09 PM
After you install this mod, the forum I always refresh

Please fix bug :(

RC5

did you CHMOD for 2 file I name in readme??

after that, check the httx://you-forum.com/NChat/index.php by paste it to browser, if any error (may be 403 or 500) check again all the file permission.

CHMOD: NChatMess.php, NChatSetting.php to write able (maybe 0666 or 0777)
all the left maybe 0644 or anything else that can help it run!


Can you install the mod for a new theme that not and show me your forum.
Did you realy try to CHMOD:
./NChat 0755
./NChat/NChatMess.php 0666 (or 0777)
./NChat/NChatSetting.php 0666 (or 0777)
./NChat/index.php 0644
./NChat/NChatBoardIndex.php 0644
./NChat/NChatHandle.php 0644


Quote from: Protectionist on April 14, 2011, 06:55:40 PM
Got any screenshot of this plugin in action?
live demo:http://forum.thi.vn/index.php


see ataachments for screenshot

Groovy™

now is ok ... is it possible to have this added to the bottom of the chat forums

Translation for serbian_latin-utf8

$txt['NChat_add_smileys'] = 'Dodaj smajli';
$txt['NChat_blod'] = 'B';
$txt['NChat_italic'] = 'U';
$txt['NChat_underline'] = 'I';
$txt['NChat_black'] = 'Crna';
$txt['NChat_red'] = 'Crvena';
$txt['NChat_teal'] = 'Plavo-zelena';
$txt['NChat_blue'] = 'Plava';
$txt['NChat_green'] = 'Zelena';
$txt['NChat_brown'] = 'Braon';
$txt['NChat_orange'] = 'Naranđasta';
$txt['NChat_more_smileys'] = 'Vise...';
$txt['NChat_save'] = 'Sačuvaj';
$txt['NChat_clean'] = 'Očisti';
$txt['NChat_disable_guest'] = 'Onemogući pristup gostima';
$txt['NChat_enable_guest'] = 'Omogući pristup gostima';

nvcnvn

Quote from: Groovy™ on April 15, 2011, 06:31:44 AM
now is ok ... is it possible to have this added to the bottom of the chat forums

Translation for serbian_latin-utf8

$txt['NChat_add_smileys'] = 'Dodaj smajli';
$txt['NChat_blod'] = 'B';
$txt['NChat_italic'] = 'U';
$txt['NChat_underline'] = 'I';
$txt['NChat_black'] = 'Crna';
$txt['NChat_red'] = 'Crvena';
$txt['NChat_teal'] = 'Plavo-zelena';
$txt['NChat_blue'] = 'Plava';
$txt['NChat_green'] = 'Zelena';
$txt['NChat_brown'] = 'Braon';
$txt['NChat_orange'] = 'Naranđasta';
$txt['NChat_more_smileys'] = 'Vise...';
$txt['NChat_save'] = 'Sačuvaj';
$txt['NChat_clean'] = 'Očisti';
$txt['NChat_disable_guest'] = 'Onemogući pristup gostima';
$txt['NChat_enable_guest'] = 'Omogući pristup gostima';


Yes, you can show it every where you want by add this line
require_once($boarddir."/NChat/NChatBoardIndex.php");

You should add this line before or some where to show the chat box at the bottom
template_info_center();

P/s: a update available, in this up date, I decided to display a unavailable error message instead of reload the window - I thought I'll help if your Internet line was disconect - but it was a stupid idea :))

Thanks for your Translation. It's very helpfull when you tranlate the unavilable error message to serbian_latin-utf8 too!


Alb0

How could you change the default color of the text? MY theme is dark, and you can't see the text at all when it's set at black.

nvcnvn

Quote from: Alb0 on April 22, 2011, 11:29:51 AM
How could you change the default color of the text? MY theme is dark, and you can't see the text at all when it's set at black.

You can change the style of NChat_admin_shoutbox DIV tag by adding color:red; at the end of style attribute:
find this tag in NChatBoardIndex.php and NChatHandle.php

<div id="NChat_admin_shoutbox" style="width:100%;height:150px;overflow:auto;border-style:solid;border-width:0.5px;"></div>

Replace with this code if you want the text is red

<div id="NChat_admin_shoutbox" style="width:100%;height:150px;overflow:auto;border-style:solid;border-width:0.5px;]color:red;"></div>

Alb0

#15
Tried the edit. Default color still comes up as black.

EDIT: Just found out that the code you gave me changes the username colors in the chat. I was asking to change the actual message default color from black to a different one.

nvcnvn

#16
Oh men, Sorry! How stupid I am! I just forgot what I have done before!
Open NChatBoardIndex.php and NChatHandle.php
You will find:

      <select onchange="NChat_color();" id="NChat_color">
         <option selected="selected" value="Black">'.$txt['NChat_black'].'</option>
         <option style="background: Red;" value="Red">'.$txt['NChat_red'].'</option>
         <option style="background: Teal;" value="Teal">'.$txt['NChat_teal'].'</option>
         <option style="background: Blue;" value="Blue">'.$txt['NChat_blue'].'</option>
         <option style="background: Green;" value="Green">'.$txt['NChat_green'].'</option>
         <option style="background: Brown;" value="Brown">'.$txt['NChat_brown'].'</option>
         <option style="background: Orange;" value="Orange">'.$txt['NChat_orange'].'</option>
      </select>

Now you see:
         <option selected="selected" value="Black">'.$txt['NChat_black'].'</option>
Remove the selected="selected" and add it to the Color option that you like.

Replace this code will show the default text is red:

      <select onchange="NChat_color();" id="NChat_color">
         <option value="Black">'.$txt['NChat_black'].'</option>
         <option selected="selected" style="background: Red;" value="Red">'.$txt['NChat_red'].'</option>
         <option style="background: Teal;" value="Teal">'.$txt['NChat_teal'].'</option>
         <option style="background: Blue;" value="Blue">'.$txt['NChat_blue'].'</option>
         <option style="background: Green;" value="Green">'.$txt['NChat_green'].'</option>
         <option style="background: Brown;" value="Brown">'.$txt['NChat_brown'].'</option>
         <option style="background: Orange;" value="Orange">'.$txt['NChat_orange'].'</option>
      </select>


Add this line before the end tag (</script>) of the javascript block of NChat Mod:
    NChatInput.style.color = document.getElementById(\'NChat_color\').value;

Alb0

Thank you, worked liek a charm.
So I got the admins names to change to red, with your previous code. Anyway to get the moderators a different color from users?
Or even better, is there a way to recognize colors of membergroups?

azjeepclub

Nice mod, I too changed it to default red - works great!

I would like to change posts from bottom to top to top being oldest to bottom newest is this easy to do? Thanks again for the gr8 mod!
AZ Jeep Club
Owner / Admin

nvcnvn

Quote from: Alb0 on April 22, 2011, 09:39:22 PM
Thank you, worked liek a charm.
So I got the admins names to change to red, with your previous code. Anyway to get the moderators a different color from users?
Or even better, is there a way to recognize colors of membergroups?
Yes, but now you just can define color for 3 gruops: Admin, Supper Mod, Guest
just open NChatSetting.php and you will see a serialized string. Find the part "admincolor";s:7:"#ff0000" and change it to the color you want!
Not that you should you the #rrggbb format for the color (so you do not need change the string len....)
I'm working for this feature, that you can edit some more thing in the index (like the way you disable, enableguest), but I was too busy. :(

Quote from: azjeepclub on April 23, 2011, 12:41:12 AM
Nice mod, I too changed it to default red - works great!

I would like to change posts from bottom to top to top being oldest to bottom newest is this easy to do? Thanks again for the gr8 mod!
Yes, that simple open NChatHandle.php, In NChatReader Function find and replace this line:

      for($i=(count($mess)-1);$i>=0;$i--){

With this line

      for($i=0;$i<=(count($mess)-1);$i++){

Advertisement: