Advertisement:

Author Topic: AjaxChat Integration (latest version 3.2.1)  (Read 2288114 times)

Offline allumius

  • Jr. Member
  • **
  • Posts: 295
Re: AjaxChat Integration
« Reply #2420 on: June 11, 2009, 03:45:48 PM »
Well, i'm change my theme. Now i use BlackRainV2118
The chat work fine, but.... is posibble chat show only the last 10 lines? And the other whit scroll

I tink you need to find the guide by mrtrc266 - http://www.simplemachines.org/community/index.php?topic=257973.msg1981766#msg1981766

:)

Loads of info in there
i have read this thread, but i dont see the solution, and muy ShoutBox is very big and have now 35 lines!!!!!

fext

  • Guest
Re: AjaxChat Integration
« Reply #2421 on: June 11, 2009, 04:15:13 PM »
I presume you are talking about the AjaxChat popup...Try this... Although I am no expert...

in chat/lib/config.php find
Code: [Select]
// Max number of messages to display on each request:
$config['requestMessagesLimit'] = 10;

And change the numerical value to what you need - you may also need to look at other files - mrtrc266 can help with this more I think :)

If you are talking about the shoutbox then I think you need to either look at other settings files (mrtrc266 can help more) or mess about with the CSS that controls the display of the shoutbox?

Can anyone else help?

Offline allumius

  • Jr. Member
  • **
  • Posts: 295
Re: AjaxChat Integration
« Reply #2422 on: June 11, 2009, 04:31:57 PM »
i talk about shoutbox

fext

  • Guest
Re: AjaxChat Integration
« Reply #2423 on: June 11, 2009, 04:35:37 PM »
Then I am sure mrtrc266 will help :)

But you could try what I mentioned above.. MAKE A BACKUP OF ANY FILE YOU MODIFY

find shoutbox/lib/config.php find:
Code: [Select]
// Max number of messages to display on each request:
$config['requestMessagesLimit'] = 10;

and edit the number - see if that works :)

Offline Chit-Chat ChatterBox Boss

  • Full Member
  • ***
  • Posts: 418
  • Gender: Male
  • I Have SMF 2.0 RC1-1, Default Theme
    • Chit-Chat ChatterBox
Re: AjaxChat Integration
« Reply #2424 on: June 11, 2009, 04:44:42 PM »
Well, i'm change my theme. Now i use BlackRainV2118
The chat work fine, but.... is posibble chat show only the last 10 lines? And the other whit scroll

It is the same exact edit I gave a tut on a few pages back for the shoutbox. Just with this you edit the chat.css .... I can get the exact edit later (about to bring my fiance to work) or you can go here:
http://www.simplemachines.org/community/index.php?topic=257973.msg2102583#msg2102583
and see what you edit in the shoutbox.css and do the edits in the same location but in the chat file (not shoutbox.css as that is for the shoutbox).
Chit-Chat ChatterBox

Our site is open to everyone. It is a resource for anyone and everyone to talk about anything and everything you could possibly think of. It's a great place to come and talk, ask questions, or just simply hang out. We offer many great features. All we ask is that you follow by the site rules. Hope to see you around!
www.chitchatchatterbox.com
Remember in the “Referral” box to put “Caleb” while registering.

fext

  • Guest
Re: AjaxChat Integration
« Reply #2425 on: June 11, 2009, 04:47:10 PM »
I knew it was CSS :) just thought it might also have a setting for most lines - cheers dude!

Offline Lighting_site

  • Jr. Member
  • **
  • Posts: 100
Re: AjaxChat Integration
« Reply #2426 on: June 11, 2009, 04:47:48 PM »
this work under 1.1.9?

fext

  • Guest
Re: AjaxChat Integration
« Reply #2427 on: June 11, 2009, 04:59:00 PM »
Yeo it works for me wicked

Offline Chit-Chat ChatterBox Boss

  • Full Member
  • ***
  • Posts: 418
  • Gender: Male
  • I Have SMF 2.0 RC1-1, Default Theme
    • Chit-Chat ChatterBox
Chit-Chat ChatterBox

Our site is open to everyone. It is a resource for anyone and everyone to talk about anything and everything you could possibly think of. It's a great place to come and talk, ask questions, or just simply hang out. We offer many great features. All we ask is that you follow by the site rules. Hope to see you around!
www.chitchatchatterbox.com
Remember in the “Referral” box to put “Caleb” while registering.

Offline Chit-Chat ChatterBox Boss

  • Full Member
  • ***
  • Posts: 418
  • Gender: Male
  • I Have SMF 2.0 RC1-1, Default Theme
    • Chit-Chat ChatterBox
Re: AjaxChat Integration
« Reply #2429 on: June 11, 2009, 09:40:53 PM »
@ mrtrc266
To get around that make your chatbot smarter mod for the command situation I just added a new command called '/commands' into AJAXChat.php and if admins & mods do the command it lists all their commands and then for users their commands are listed. Was trying to do this for the smarter chatbot mod but it didn't like the user roles being used so it was easier to make a fresh command in AJAXChat that already used user roles. Now I will just use the smarter chatbot just for things without user role ...... except for the future I would still like to figure out how to get user roles to work in the smarter chatbot setup.

Only thing I am fighting that I want to know if you know how to add is in the Online Users box I want to add a 'commands' button so people can just click it and it runs off my '/commands' command. Do you know how I can add this?

I figured it out after studying the en.js and chat.js ...... I was doing everything correct in the chat.js just forgot to put the string into en.js for the button to show  :-[ But with trial and error I figured it out! :P
Chit-Chat ChatterBox

Our site is open to everyone. It is a resource for anyone and everyone to talk about anything and everything you could possibly think of. It's a great place to come and talk, ask questions, or just simply hang out. We offer many great features. All we ask is that you follow by the site rules. Hope to see you around!
www.chitchatchatterbox.com
Remember in the “Referral” box to put “Caleb” while registering.

Offline Krandall

  • Semi-Newbie
  • *
  • Posts: 42
Re: AjaxChat Integration
« Reply #2430 on: June 11, 2009, 10:33:26 PM »
@Krandall

You could try setting up the shoutbox as a function as I posted a few posts up, then wrap the shoutbox(); inside the if(isset($board) && $board==21 || $board==22 || $board==23 || $board==24 || $board==32 || $board==33 || $board==55) {....}

Would look something like:

Code: [Select]
if(isset($board) && $board==21 || $board==22 || $board==23 || $board==24 || $board==32 || $board==33 || $board==55) {
shoubox();
}
Here's what I have (Below) when I do it this way, the shout box doesn't show on any pages.  ? Thoughts?


Code: [Select]
//shoutBox

if(isset($board) && $board==1.0 || $board==33.0) {
shoubox();

if (!empty($modSettings['enableShoutBox'])){
if (allowedTo('shout_access')){
// We'll have to use the cookie to remember the shoutBox header...
if ($context['user']['is_guest'])
$options['sb_collapsed'] = !empty($_COOKIE['sb_collapsed']);

echo '
<script language="JavaScript" type="text/javascript">
var sb_current_header = ', empty($options['sb_collapsed']) ? 'false' : 'true', ';

function ajax_shoutBox_collapse(mode)
{';

if ($context['user']['is_guest'])
echo '
document.cookie = "sb_collapsed=" + (mode ? 1 : 0);';
else
echo '
smf_setThemeOption("sb_collapsed", mode ? 1 : 0, null, "', $context['session_id'], '");';

echo '
document.getElementById("ajax_shoutbox_collapse").src = smf_images_url + (mode ? "/expand.gif" : "/collapse.gif");

document.getElementById("ShoutBox").style.display = mode ? "none" : "";

sb_current_header = mode;
}
</script>';

if (!empty($modSettings['anyPageShoutBox']) || isset($context['chat_isHome'])){
echo'
<div class="tborder" style="margin: 10px 0 10px 0;">
<div class="catbg" style="padding: 5px 15px 5px 10px;margin:0 auto;">
<a rel="nofollow" href="#" onclick="ajax_shoutBox_collapse(!sb_current_header)"><img id="ajax_shoutbox_collapse" src="', $settings['images_url'], empty($options['sb_collapsed']) ? '/collapse.gif' : '/expand.gif','" alt="*" style="margin-right: 5px;" /></a>', $txt['shoutBox'], '
</div>
<div id="ShoutBox"', empty($options['sb_collapsed']) ? '' : ' style="display: none;"', '>
', getShoutBoxContent() ,'
</div>
</div>';
}
}
}
}

Offline [unplugged]

  • Sophist Member
  • *****
  • Posts: 1,312
  • Gender: Male
  • I know just enough to get me in trouble...
    • Empire of the Sun
Re: AjaxChat Integration
« Reply #2431 on: June 11, 2009, 10:39:37 PM »
This part
Code: [Select]
if(isset($board) && $board==1.0 || $board==33.0) {
shoutbox();
}
needs to go where you want the shoutbox to display (provided it's on the boards you have set up). In other words, if you want the shoutbox to be at the bottom of the page, then you need to put that code in an appropriate location at the bottom of the layout.

Just before the ?> at the very end of the file, you need to have this:
Code: [Select]
function shoutbox()
{
   if (!empty($modSettings['enableShoutBox'])){
      if (allowedTo('shout_access')){
         // We'll have to use the cookie to remember the shoutBox header...
         if ($context['user']['is_guest'])
            $options['sb_collapsed'] = !empty($_COOKIE['sb_collapsed']);
           
         echo '
      <script language="JavaScript" type="text/javascript">
         var sb_current_header = ', empty($options['sb_collapsed']) ? 'false' : 'true', ';

         function ajax_shoutBox_collapse(mode)
         {';

         if ($context['user']['is_guest'])
            echo '
            document.cookie = "sb_collapsed=" + (mode ? 1 : 0);';
         else
            echo '
            smf_setThemeOption("sb_collapsed", mode ? 1 : 0, null, "', $context['session_id'], '");';

         echo '
            document.getElementById("ajax_shoutbox_collapse").src = smf_images_url + (mode ? "/expand.gif" : "/collapse.gif");

            document.getElementById("ShoutBox").style.display = mode ? "none" : "";

            sb_current_header = mode;
            }
      </script>';

         if (!empty($modSettings['anyPageShoutBox']) || isset($context['chat_isHome'])){
            echo'
      <div class="tborder" style="margin: 10px 0 10px 0;">
         <div class="catbg" style="padding: 5px 15px 5px 10px;margin:0 auto;">
            <a rel="nofollow" href="#" onclick="ajax_shoutBox_collapse(!sb_current_header)"><img id="ajax_shoutbox_collapse" src="', $settings['images_url'], empty($options['sb_collapsed']) ? '/collapse.gif' : '/expand.gif','" alt="*" style="margin-right: 5px;" /></a>', $txt['shoutBox'], '
         </div>
         <div id="ShoutBox"', empty($options['sb_collapsed']) ? '' : ' style="display: none;"', '>
         ', getShoutBoxContent() ,'
         </div>
      </div>';
         }
      }
   }
   }
which is the function itself.
« Next Edit: Tomorrow at 08:34:45 PM by SunKing »   <---- « someone stole my sig... :o »


Offline llyon

  • Semi-Newbie
  • *
  • Posts: 25
Re: AjaxChat Integration
« Reply #2432 on: June 12, 2009, 12:33:34 AM »
I've installed AjaxChat (ajax_chat-0.8.2_SMF.zip)

And have then tried to install the integration mod - AjaxChat Integration_3.0..zip

However, the mod immediately responds with "The package you are trying to download or install is either corrupt or not compatible with this version of SMF." -  this is on SMF 2.0 Rc1-1

Anyone have any suggestions ?

Offline mrtrc266

  • SMF Hero
  • ******
  • Posts: 2,164
  • Gender: Male
    • Monsters Mansion
Re: AjaxChat Integration
« Reply #2433 on: June 12, 2009, 01:24:57 AM »
Well, i'm change my theme. Now i use BlackRainV2118
The chat work fine, but.... is posibble chat show only the last 10 lines? And the other whit scroll

I tink you need to find the guide by mrtrc266 - http://www.simplemachines.org/community/index.php?topic=257973.msg1981766#msg1981766

 :)

Loads of info in there
i have read this thread, but i dont see the solution, and muy ShoutBox is very big and have now 35 lines!!!!!

I take it that you mean everytime you type a message the shoutbox just keeps getting bigger and bigger? If that it the case then you need to do this edit
 
Open yourforum/Themes/yourtheme/style.css
 
In the very first line of that file put
Code: [Select]
@import url(../../shoutBox/css/shoutbox.css);

Offline mrtrc266

  • SMF Hero
  • ******
  • Posts: 2,164
  • Gender: Male
    • Monsters Mansion
Re: AjaxChat Integration
« Reply #2434 on: June 12, 2009, 01:28:41 AM »
I've installed AjaxChat (ajax_chat-0.8.2_SMF.zip)

And have then tried to install the integration mod - AjaxChat Integration_3.0..zip

However, the mod immediately responds with "The package you are trying to download or install is either corrupt or not compatible with this version of SMF." -  this is on SMF 2.0 Rc1-1

Anyone have any suggestions ?

Completely uninstall the ajax_chat-0.8.2_SMF.zip, remove all files and folders, drop all database tables and simply install this AJAX Chat Intergration Mod.
 
The Intergration Mod will install the chat for you and this will work for 1.1.9
http://www.simplemachines.org/community/index.php?topic=257973.msg2075610#msg2075610

Offline mrtrc266

  • SMF Hero
  • ******
  • Posts: 2,164
  • Gender: Male
    • Monsters Mansion
Re: AjaxChat Integration
« Reply #2435 on: June 12, 2009, 02:06:59 AM »
@ Chatter, glad you got the Smarter Chatbot sorted. I haven't had time to play with it but I plan on implementing on my site.

Offline llyon

  • Semi-Newbie
  • *
  • Posts: 25
Re: AjaxChat Integration
« Reply #2436 on: June 12, 2009, 03:24:49 AM »
Well, that worked - I now have the shoutbox, but the chat is asking for username & password - but it will not accept the forum credentials.

fext

  • Guest
Re: AjaxChat Integration
« Reply #2437 on: June 12, 2009, 05:19:11 AM »
Hello again!

Does anyone know if there is a command list for the chat?

Things like /help to bring up a list of commands or is there and actual command list?

Also is there a command to load in previous messages? something like /history+10

Offline mrtrc266

  • SMF Hero
  • ******
  • Posts: 2,164
  • Gender: Male
    • Monsters Mansion
Re: AjaxChat Integration
« Reply #2438 on: June 12, 2009, 10:25:03 AM »
Well, that worked - I now have the shoutbox, but the chat is asking for username & password - but it will not accept the forum credentials.

Did you drop the tables from your database and remove the /chat folder before installing the AJAX Chat Intergration Mod?

fext

  • Guest
Re: AjaxChat Integration
« Reply #2439 on: June 12, 2009, 11:10:14 AM »
Hello again!

Does anyone know if there is a command list for the chat?

Things like /help to bring up a list of commands or is there and actual command list?

Also is there a command to load in previous messages? something like /history+10


Anyone?