AjaxChat Integration (latest version 3.2.1)

Started by .HuNTeR., August 27, 2008, 12:59:06 AM

Previous topic - Next topic

.HuNTeR.

place your index.template.php here
it should work for any theme

boazor

hello

i am useing the extreme6 theme .

how can i add the chat i add button to the panel but
i dont know how to direct it to the chat .

btw can i had him to the man page like board in the end of the page?

.HuNTeR.

@boazor:
put the code you written for button here and i will check it ;)

Jazman

Quote from: BurkeKnight on December 26, 2008, 09:21:04 AM
You will need to manually install the mod into the other theme.

Manual Installation of Mods

I followed the directions to a tee for the manual install into the "Dilber MC" theme, however, I'm experiencing a few vagaries.

The chat button isn't showing up, however, a space was created between two other menu options

And the users online portion is looking incomplete. (Not seeing text for "chat users online," just the number)
Example.
QuoteUsers Online       0 Guests, 2 Users
Users active in past 15 minutes:
Jesse, Mick
3
Jesse, Mick, karl

The code also looks a lot different from the other menu buttons.
Example.
// Go to PM center... [pm]
        if ($context['user']['is_logged'] && $context['allow_pm'])
        echo'
                                <td align="center" class="menubg' , $current_action == 'pm' ? '2' : '' , '">
                                        <a href="', $scripturl, '?action=pm">' , $txt['pm_short'] , ' ', $context['user']['unread_messages'] > 0 ? '[<strong>'. $context['user']['unread_messages'] . '</strong>]' : '' , '</a>
                                </td>';
        // the [chat] button
        $path = str_replace("index.php", "chat/index.php", $scripturl);
        echo $context['browser']['is_ie4'] ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '', '
                                <td valign="top" class="maintab_back">
                                        <a href="', $path, '" target="_blank">', $txt['chat'], '</a>
                                </td>';

        // The [calendar]!
        if ($context['allow_calendar'])
        echo'
                                <td align="center" class="menubg' , $current_action == 'calendar' ? '2' : '' , '">
                                        <a href="', $scripturl, '?action=calendar">' , $txt['calendar24'] , '</a>
                                </td>';
        // the [SMF Gallery] button
        if ($context['allow_smfgallery_view'])
        echo'

                                <td align="center" class="menubg' , $current_action == 'gallery'  ? '2' : '' , '">
                                        <a href="', $scripturl, '?action=gallery">' , $txt['smfgallery_menu']  , '</a>
                                </td>';


Any suggestions or insight?

mrtrc266

#124
Quote from: boazor on January 14, 2009, 11:35:51 AM
hello

i am useing the extreme6 theme .

how can i add the chat i add button to the panel but
i dont know how to direct it to the chat .

btw can i had him to the man page like board in the end of the page?

I use the same theme, your button code should look something like this...

// Show the [chat] button.
echo '<li><a target="_blank" href="http://monsters-mansion.com/chat/index.php" class="kwick opt2" >', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/chat.png" alt="' . $txt['chat'] . '" style="margin: 0px 0;" border="0" /><span>' : $txt[119]), '</span></a></li>';


Of course change <a target="_blank" href="http://monsters-mansion.com/chat/index.php" to your URL

nwobhm

@Jazman

I have Dilber theme also and the code for chat button looks like this on my forum.
This will make the chat go into new window

<td align="center" class="menubg' , $current_action == 'chat' ? '2' : '' , '">
<a href="board url in here/Chat/index.php" target="_blank">' , $txt['chat'] , '</a>
</td>';

boazor

Quote from: .HuNTeR. on January 14, 2009, 12:11:51 PM
@boazor:
put the code you written for button here and i will check it ;)

i just copy the other code and just add new pic  but i guess i need all the code
but i didnt find way to link the chat :P

boazor

Quote from: mrtrc266 on January 14, 2009, 03:16:42 PM
Quote from: boazor on January 14, 2009, 11:35:51 AM
hello

i am useing the extreme6 theme .

how can i add the chat i add button to the panel but
i dont know how to direct it to the chat .

btw can i had him to the man page like board in the end of the page?

I use the same theme, your button code should look something like this...

// Show the [chat] button.
echo '<li><a target="_blank" href="http://monsters-mansion.com/chat/index.php" class="kwick opt2" >', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/chat.png" alt="' . $txt['chat'] . '" style="margin: 0px 0;" border="0" /><span>' : $txt[119]), '</span></a></li>';


Of course change <a target="_blank" href="http://monsters-mansion.com/chat/index.php" to your URL


thx man its work great .

btw did u find why to make it part of the first page like in the board?

mrtrc266

@ boazor

Quotethx man its work great .

btw did u find why to make it part of the first page like in the board?

you mean like a shoutbox?

boazor

Quote from: mrtrc266 on January 14, 2009, 06:16:59 PM
@ boazor

Quotethx man its work great .

btw did u find why to make it part of the first page like in the board?

you mean like a shoutbox?

yup but just at the end of the man page

mrtrc266

Quote from: boazor on January 15, 2009, 05:15:42 AM
Quote from: mrtrc266 on January 14, 2009, 06:16:59 PM
@ boazor

Quotethx man its work great .

btw did u find why to make it part of the first page like in the board?

you mean like a shoutbox?

yup but just at the end of the man page

Go back one page on this thread and you will find a "Shoutbox Intergration" file from Hunter (AjaxChat ShoutBox 1.0.zip) then Im sure you could just look for the edit and put it wherever you want.

boazor

Quote from: mrtrc266 on January 15, 2009, 01:06:37 PM
Quote from: boazor on January 15, 2009, 05:15:42 AM
Quote from: mrtrc266 on January 14, 2009, 06:16:59 PM
@ boazor

Quotethx man its work great .

btw did u find why to make it part of the first page like in the board?

you mean like a shoutbox?

yup but just at the end of the man page

Go back one page on this thread and you will find a "Shoutbox Intergration" file from Hunter (AjaxChat ShoutBox 1.0.zip) then Im sure you could just look for the edit and put it wherever you want.

i talk to my friend that is .net man he told me that i can use iframe but i dont know how or where to put it.
did you here about this one?

mrtrc266

#132
Quote from: boazor on January 15, 2009, 05:35:20 PM
Quote from: mrtrc266 on January 15, 2009, 01:06:37 PM
Quote from: boazor on January 15, 2009, 05:15:42 AM
Quote from: mrtrc266 on January 14, 2009, 06:16:59 PM
@ boazor

Quotethx man its work great .

btw did u find why to make it part of the first page like in the board?

This attatchment is from hunter, just intsall it and it should add the shoutbox to your board page.

you mean like a shoutbox?

yup but just at the end of the man page

Go back one page on this thread and you will find a "Shoutbox Intergration" file from Hunter (AjaxChat ShoutBox 1.0.zip) then Im sure you could just look for the edit and put it wherever you want.

i talk to my friend that is .net man he told me that i can use iframe but i dont know how or where to put it.
did you here about this one?


This is the AWESOME attatchment from Hunter ( tyvm Hunter), just install this and it should add the shoutbox to your board page. Be sure to do the manual edits if you have a custom theme. Hope I'm understanding you correctly and that this helps.

EDIT: Shoutbox now enabled or disabled in AJAX Chat Intergration. Thanks Hunter.

BTW Whats your website addy?

mrtrc266

#133
A little trick from Source Forge.

To Add the Ajax Chat Smilies to your shoutbox do the following...

find in chat/lib/template/shoutbox.html
<div id="ajaxChatCopyright"><a href="https://blueimp.net/ajax/">AJAX Chat</a> &copy; <a href="https://blueimp.net">blueimp.net</a> | <a href="http://4tmu.ir">Integrated with SMF</a></div>

add above
<div id="emoticonsContainer" dir="ltr"></div>

.HuNTeR.

In new version you can enable or disable shoutbox
just install the last version

mrtrc266

Quote from: .HuNTeR. on January 16, 2009, 07:58:25 AM
In new version you can enable or disable shoutbox
just install the last version

Ohhh, very cool good job.

ChackanPT

My chat button appears to be a bit...weird lol

I'm using MeshTP, any help?

Blinker

Quote from: ChackanPT on January 16, 2009, 09:20:49 PM
My chat button appears to be a bit...weird lol

I'm using MeshTP, any help?

In your Mesh theme's index.template.php.

Find the code for the chat button and replace with this:
// the [chat] button
   $path = str_replace("index.php", "chat/index.php", $scripturl);
   if ($context['user']['is_logged'])
   echo $context['browser']['is_ie4'] ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '', '
      <td nowrap="nowrap" valign="top" class="maintab_' , $current_action == 'chat' ? 'active_back' : 'back2' , '">
         <a href="', $path, '" target="_blank">', $txt['chat'], '</a></td>';


The main change is the 'back2',  there is probably no '2' on yours.

ChackanPT

Nice! Worked like a charm!

Also, the Stats don't show the Online users in the chat, i already added the code manually in the custom themes files.

I use both Mesh and Aero. Doesn't show in any of them

.HuNTeR.

if in your default theme stats works you entered wrong code for your theme
this is the code:
find:

// Assuming there ARE users online... each user in users_online has an id, username, name, group, href, and link.
if (!empty($context['users_online']))
echo '
', $txt[140], ':<br />', implode(', ', $context['list_users_online']);

add after it:


// users in chat
  if(count($context['users_in_chat_links'])==0)
  {
  echo '<br />' . $txt['no_user_in_chat'];
  }elseif(count($context['users_in_chat_links'])==1)
  {
  echo '<br />  1' . $txt['user_in_chat']. '<br />', implode($context['users_in_chat_links']);
  }else
  {
  echo '<br /> ' . count($context['users_in_chat_links']). $txt['users_in_chat']. '<br />', implode(', ', $context['users_in_chat_links']);
  }

and for shoutbox:
find

<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td valign="bottom">', theme_linktree(), '</td>
<td align="right">';
if (!$settings['show_sp1_info'])

replace with:

<table width="100%" cellpadding="0" cellspacing="0">';
if ($modSettings['enableShoutBox'])
echo' <tr>
<td>
<div class="tborder">' . getShoutBoxContent() . '
</div>
</td>
</tr>';
echo' <tr>
<td valign="bottom">', theme_linktree(), '</td>
<td align="right">';
if (!$settings['show_sp1_info'])


and also add this before ?>

function getShoutBoxContent()
{
    global $scripturl;

    // Get the URL to the chat directory:
    if (!defined('AJAX_CHAT_URL'))
    {
        define('AJAX_CHAT_URL', str_replace("index.php", "chat/", $scripturl));
    }
   
    // Get the real path to the chat directory:
    if (!defined('AJAX_CHAT_PATH'))
    {
define('AJAX_CHAT_PATH', dirname(__FILE__) . '/../chat/');
    }
   
    // Validate the path to the chat:
    if (@is_file(AJAX_CHAT_PATH . 'lib/classes.php'))
    {
        // Include Class libraries:
        require_once(AJAX_CHAT_PATH.'lib/classes.php');

        // Initialize the shoutbox:
        $ajaxChat = new CustomAJAXChatShoutBox();

        // Parse and return the shoutbox template content:
        return $ajaxChat->getShoutBoxContent();
    }
    return null;
}

Advertisement: