Advertisement:
NameCheap

Author Topic: NChat - No SQL Save BW shoutbox  (Read 178317 times)

Offline nvcnvn

  • Full Member
  • ***
  • Posts: 546
  • Gender: Male
  • Super Somethings
    • Hocvui.net - Cùng học những điều cơ bản mà vui
NChat - No SQL Save BW shoutbox
« on: April 13, 2011, 11:30:28 AM »
[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
« Last Edit: October 13, 2013, 10:11:56 PM by nvcnvn »


Offline rölyef

  • Jr. Member
  • **
  • Posts: 271
  • Gender: Male
Re: NChat - No SQL Save BW shoutbox
« Reply #2 on: April 13, 2011, 05:15:21 PM »
nice mod. but, 113 xhtml errors.

Offline nvcnvn

  • Full Member
  • ***
  • Posts: 546
  • Gender: Male
  • Super Somethings
    • Hocvui.net - Cùng học những điều cơ bản mà vui
Re: NChat - No SQL Save BW shoutbox
« Reply #3 on: April 13, 2011, 05:51:42 PM »
« Last Edit: April 13, 2011, 08:24:47 PM by nvcnvn »

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 62,830
Re: NChat - No SQL Save BW shoutbox
« Reply #4 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.
And his eyes have all the seeming of a demon's that is dreaming,
And the lamp-light o'er him streaming throws his shadow on the floor

Offline nvcnvn

  • Full Member
  • ***
  • Posts: 546
  • Gender: Male
  • Super Somethings
    • Hocvui.net - Cùng học những điều cơ bản mà vui
Re: NChat - No SQL Save BW shoutbox
« Reply #5 on: April 13, 2011, 08:07:09 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

Offline Groovy™

  • Full Member
  • ***
  • Posts: 441
  • Gender: Male
Re: NChat - No SQL Save BW shoutbox
« Reply #6 on: April 14, 2011, 03:21:09 PM »
After you install this mod, the forum I always refresh

Please fix bug :(

RC5

Offline nvcnvn

  • Full Member
  • ***
  • Posts: 546
  • Gender: Male
  • Super Somethings
    • Hocvui.net - Cùng học những điều cơ bản mà vui
Re: NChat - No SQL Save BW shoutbox
« Reply #7 on: April 14, 2011, 06:21:58 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!

Offline Groovy™

  • Full Member
  • ***
  • Posts: 441
  • Gender: Male
Re: NChat - No SQL Save BW shoutbox
« Reply #8 on: April 14, 2011, 06:33:12 PM »
I did what you said and still no changes

Offline Protectionist

  • Newbie
  • *
  • Posts: 4
Re: NChat - No SQL Save BW shoutbox
« Reply #9 on: April 14, 2011, 06:55:40 PM »
Got any screenshot of this plugin in action?

Offline nvcnvn

  • Full Member
  • ***
  • Posts: 546
  • Gender: Male
  • Super Somethings
    • Hocvui.net - Cùng học những điều cơ bản mà vui
Re: NChat - No SQL Save BW shoutbox
« Reply #10 on: April 15, 2011, 05:21:58 AM »

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


Got any screenshot of this plugin in action?
live demo:http://forum.thi.vn/index.php


see ataachments for screenshot

Offline Groovy™

  • Full Member
  • ***
  • Posts: 441
  • Gender: Male
Re: NChat - No SQL Save BW shoutbox
« Reply #11 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

Code: [Select]
$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';

Offline nvcnvn

  • Full Member
  • ***
  • Posts: 546
  • Gender: Male
  • Super Somethings
    • Hocvui.net - Cùng học những điều cơ bản mà vui
Re: NChat - No SQL Save BW shoutbox
« Reply #12 on: April 15, 2011, 09:03:28 AM »
now is ok ... is it possible to have this added to the bottom of the chat forums

Translation for serbian_latin-utf8

Code: [Select]
$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
Code: [Select]
require_once($boarddir."/NChat/NChatBoardIndex.php");
You should add this line before or some where to show the chat box at the bottom
Code: [Select]
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!


Offline Alb0

  • Semi-Newbie
  • *
  • Posts: 94
    • !V! Velocity
Re: NChat - No SQL Save BW shoutbox
« Reply #13 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.

Offline nvcnvn

  • Full Member
  • ***
  • Posts: 546
  • Gender: Male
  • Super Somethings
    • Hocvui.net - Cùng học những điều cơ bản mà vui
Re: NChat - No SQL Save BW shoutbox
« Reply #14 on: April 22, 2011, 11:48:45 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
Code: [Select]
<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
Code: [Select]
<div id="NChat_admin_shoutbox" style="width:100%;height:150px;overflow:auto;border-style:solid;border-width:0.5px;]color:red;"></div>

Offline Alb0

  • Semi-Newbie
  • *
  • Posts: 94
    • !V! Velocity
Re: NChat - No SQL Save BW shoutbox
« Reply #15 on: April 22, 2011, 12:42:22 PM »
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.
« Last Edit: April 22, 2011, 01:28:53 PM by Alb0 »

Offline nvcnvn

  • Full Member
  • ***
  • Posts: 546
  • Gender: Male
  • Super Somethings
    • Hocvui.net - Cùng học những điều cơ bản mà vui
Re: NChat - No SQL Save BW shoutbox
« Reply #16 on: April 22, 2011, 07:55:05 PM »
Oh men, Sorry! How stupid I am! I just forgot what I have done before!
Open NChatBoardIndex.php and NChatHandle.php
You will find:
Code: [Select]
      <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:
Code: [Select]
         <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:
Code: [Select]
      <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:
Code: [Select]
    NChatInput.style.color = document.getElementById(\'NChat_color\').value;
« Last Edit: April 22, 2011, 07:58:46 PM by nvcnvn »

Offline Alb0

  • Semi-Newbie
  • *
  • Posts: 94
    • !V! Velocity
Re: NChat - No SQL Save BW shoutbox
« Reply #17 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?

Offline azjeepclub

  • Semi-Newbie
  • *
  • Posts: 30
  • Gender: Male
    • Arizona Jeep CLub
Re: NChat - No SQL Save BW shoutbox
« Reply #18 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!
AZ Jeep Club
Owner / Admin

Offline nvcnvn

  • Full Member
  • ***
  • Posts: 546
  • Gender: Male
  • Super Somethings
    • Hocvui.net - Cùng học những điều cơ bản mà vui
Re: NChat - No SQL Save BW shoutbox
« Reply #19 on: April 23, 2011, 03:40:38 AM »
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. :(

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:
Code: [Select]
      for($i=(count($mess)-1);$i>=0;$i--){
With this line
Code: [Select]
      for($i=0;$i<=(count($mess)-1);$i++){