NChat - No SQL Save BW shoutbox

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

Previous topic - Next topic

azjeepclub

That worked, only when the page loads or is refreshed it is showing the oldest and I have to scroll down to see the newest each time the page gets loaded. Any quick fix?

Where do I donate for the cause?
AZ Jeep Club
Owner / Admin

Alb0

Quote from: nvcnvn on April 23, 2011, 03:40:38 AM
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. :(

For mods it was alrady set to blue, but it gives them as green in the chatcolor. "modcolor";s:7:"#0000ff"

nvcnvn

Quote from: azjeepclub on April 23, 2011, 11:39:40 AM
That worked, only when the page loads or is refreshed it is showing the oldest and I have to scroll down to see the newest each time the page gets loaded. Any quick fix?

Where do I donate for the cause?
Yes, you can do it, quite of simple, just a single javascript line.
But it work not exaclly in IE, but 100% in FF, GC and Opera.

Add this line before the end of NChatMod javascript block

document.getElementById("NChat_admin_shoutbox").scrollTop = 2500;


Quote from: azjeepclub on April 23, 2011, 11:39:40 AM
Where do I donate for the cause?
My English is not good. Quite of confuse what is yout means!

Quote from: Alb0 on April 24, 2011, 12:13:41 AM
For mods it was alrady set to blue, but it gives them as green in the chatcolor. "modcolor";s:7:"#0000ff"

No comment ;))

Alb0

This isn't showing on my theme laGusta for RC5. Works on my other themes though.
Any help?

nvcnvn

Quote from: Alb0 on April 25, 2011, 09:20:08 PM
This isn't showing on my theme laGusta for RC5. Works on my other themes though.
Any help?
What is your mean when you say This isn't showing ... "this" is the mod?
I don't know about that theme. But I sure that you can add this Mod for any theme by:

1. Open BoardIndex.template.php
2. Find
function template_main()
{

add after

   global $boarddir, $boardurl;


go any where (inside function template_main) where toy want to show this shout box, add:


   //NChat Mod
   //You can move this line to somewhere that you hope to see the chatbox
   require_once($boarddir."/NChat/NChatBoardIndex.php");

jaisi

all setting i have done but i'am getting this error some time
[/b] The ./NChat/index.php is now unavailable! Please contact admin forum about this issue! [/b]

please tell me how to solve this problem

nvcnvn

Quote from: jaisi on April 26, 2011, 04:23:47 PM
all setting i have done but i'am getting this error some time
[/b] The ./NChat/index.php is now unavailable! Please contact admin forum about this issue! [/b]

please tell me how to solve this problem
You say ... i'am getting this error some time
How is some time?
You can chat ok, and suddenly the error happen you  can't chat any more, and suddenly again you can chat ok?
Or you see it when you reload the page(press F5), or clicking in some topic url?

Dzonny

Hey there.

Thanks for quite good and very simple, but still functional mod, and all that with minimal changes to core files :)
I will try it on some my forums soon :)

Regards.

Groovy™

I tried to add chat to the bottom of the forum, but I do not know PHP very well ... here's to you my BoardIndex.template.php the attac

Thanks

nvcnvn


Groovy™


nvcnvn


jaisi

When refreshing forum page i'am getting error please check

steeltape

when i click disable guest chat this error comes out

QuoteThe ./NChat/index.php is now unavailable! Please contact admin forum about this issue!

i look into nchatboardindex.php and guest is already disabled from chatting but still i can chat as guest.
solution?

$NChatInfo['NChatMess'] = $boarddir.'/NChat/'.$NChat['NChatMess'];
$NChatInfo['admin']     = false;
$NChatInfo['mod']       = false;
$NChatInfo['guest']     = false;
$NChatInfo['can_mod']   = false;
$NChatInfo['can_chat']  = true;
if($context['user']['is_admin']){
   $NChatInfo['admin'] = true;
   $NChatInfo['can_mod'] = true;

if($context['user']['is_guest']){
   $NChatInfo['guest'] = true;
   if($NChat['guest'] != true)
      $NChatInfo['can_chat'] = false;

why i can still chat as guest?

Braxton Leo

How do I change the shout text?  My forum has a black background and NChat uses black text by default.

ascaland

Quote from: Braxton Leo on May 01, 2011, 02:28:21 PM
How do I change the shout text?  My forum has a black background and NChat uses black text by default.

If you want to make the text (other than the actual shouts) whit, then in NChatBoardIndex,
Code (Find) Select
<div id="NChat_admin_shoutbox" style="width:100%;height:150px;overflow:auto;border-style:solid;border-width:0.5px;">
Code (Replace) Select
<div id="NChat_admin_shoutbox" style="width:100%;height:150px;overflow:auto;border-style:solid;border-width:0.5px;color: white;">

If you want the option to have white text in shouts (and enabling it by default), in the same file,
Code (Find) Select
<option selected="selected" value="Black">'.$txt['NChat_black'].'</option>
Code (Replace) Select
<option selected="selected" value="White">White</option>
<option value="Black">'.$txt['NChat_black'].'</option>

nvcnvn

Quote from: jaisi on April 28, 2011, 08:17:34 PM
When refreshing forum page i'am getting error please check

And after the page load finish. This you see the message?
If there is no message after page loades, this is not a bug, I thought just how to the browser work. When you refesh the page, the browser will stop all the current request...so you get the message.
Quote from: steeltape on May 01, 2011, 10:48:50 AM
when i click disable guest chat this error comes out

QuoteThe ./NChat/index.php is now unavailable! Please contact admin forum about this issue!

i look into nchatboardindex.php and guest is already disabled from chatting but still i can chat as guest.
solution?

$NChatInfo['NChatMess'] = $boarddir.'/NChat/'.$NChat['NChatMess'];
$NChatInfo['admin']     = false;
$NChatInfo['mod']       = false;
$NChatInfo['guest']     = false;
$NChatInfo['can_mod']   = false;
$NChatInfo['can_chat']  = true;
if($context['user']['is_admin']){
   $NChatInfo['admin'] = true;
   $NChatInfo['can_mod'] = true;

if($context['user']['is_guest']){
   $NChatInfo['guest'] = true;
   if($NChat['guest'] != true)
      $NChatInfo['can_chat'] = false;

why i can still chat as guest?

When you click on disable guest, the page will refesh, and so, you get the message (I have exaplaned).
Did you wait untill the page reloaded? And did you remember to logout? When you disable guest, guest no way can chat any  more!
Rememmber to check the button -  if you still see It say "Disable Guest" thats mean something wrong!

xrunner

#37
The functions of the Italic button and Underline buttons are reversed - the Italic button causes underlined text, and the Underline button causes Italic text.  :P

Where do I change the color of the control button text (disable guest, clean, add smileys)? Now it's' white and I can barely read it.

Where do I set the refresh time of the chat box - I don't want it to refresh too often because my host might not like it!

When I click the Add Smileys button the smileys appear, but when I click the button again they do not disappear.

How can I add the chat box to the unread replies screen also?

After installing the Chat, I cannot use Home and End keys to move up and down the forum page. Before I could hit Home and it would go to the top of the forum, and End would move to the bottom of the forum.



I think it's just what I need, but I would suggest you add more and easier ways for the admin to customize it, maybe in a new update.

Thanks.

xrunner

I think there is an error in one of your files.

From the file NChatBoardIndex.php

<button id="bold" onclick="NChat_format(this.id);" style="width:35px;font-weight:bold;color:black;">'.$txt['NChat_blod'].'</button>

Shouldn't this --> NChat_blod

be spelled like this --> NChat_bold
?

duckydan69

Is there any way to have this on every page in the forum (i.e. if I click on "General Chat" it stays up top) and not just the main page?

Advertisement: