AjaxChat Integration (latest version 3.2.1)

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

Previous topic - Next topic

suitupdude

that's like that:

hxxp:mecchaniciens.free.fr/screen.jpg [nonactive]

mrtrc266

#661
Quote from: suitupdude on March 05, 2009, 10:57:29 PM
that's like that:

http://mecchaniciens.free.fr/screen.jpg

Yeah, that's the wrong spot

LOL I was drinkin!!!

PM sent

ninedoors

I did the ajax chat upload to my server.  Then I tried to run the install.php file and I have an error on the screen that says 'No database selected'.

In the forum error log I have this:

: No database selected
/public_directory/forum/Sources/Load.php
535

On line 535 is where I have a custom query that loads the a member's team name that he is on for my hockey league.  This query runs fine with no errors with every other file.  Here it is:


<?php
//get user's team
    
$request db_query("
            SELECT teamID, jerseyID, division, position, season
            FROM bmhl_member_teams
            WHERE ID_MEMBER = '"
.$ID_MEMBER."' AND rostered = 1 ORDER BY id DESC"__FILE____LINE__);
    
$numrows mysql_num_rows($request);
    if (
$numrows 0)
    {
        while (
$row mysql_fetch_assoc($request))
        {
            
$user_info['teams'][$row['teamID']] = array(
                        
'teamID' => $row['teamID'],
                        
'jersey' => $row['jerseyID'],
                        
'div' => $row['division'],
                        
'pos' => $row['position'],
                        
'season' => $row['season']
                        );
        }
        
mysql_free_result($request);
    }
    else
    {
        
$user_info['teams'][0] = array();
    }
?>


Anyone had this happen to them before? Or seen this error?

Thanks Nick
A government big enough to give you everything you want is big enough to take everything you have!

SMF 2.0
BMHL custom theme

SMF community is a great bunch of people!

ninedoors

Also, I get the exact same error when I call the index.php file as well.  I installed the DB tables thru phpMyAdmin myself.  Is that the only thing the install.php file does?  Or is the more I need to manually do?

Nick
A government big enough to give you everything you want is big enough to take everything you have!

SMF 2.0
BMHL custom theme

SMF community is a great bunch of people!

mrtrc266

Quote from: ninedoors on March 06, 2009, 08:14:42 AM
Also, I get the exact same error when I call the index.php file as well.  I installed the DB tables thru phpMyAdmin myself.  Is that the only thing the install.php file does?  Or is the more I need to manually do?

Nick

Yes I believe that's the only thing the chat/install.php does is create these tables

ajax_chat_bans 
ajax_chat_invitations       
ajax_chat_messages
ajax_chat_online 

ninedoors

Ok, so do you know what classes calls the load.php file?  That way I can try and fix the error i keep getting
A government big enough to give you everything you want is big enough to take everything you have!

SMF 2.0
BMHL custom theme

SMF community is a great bunch of people!

mrtrc266

#666
Not sure, it's odd though the chat/install just creates those 4 table in the DB.

Just looking through the parser I don't see where this MOD or the actual chat is called from the load.php at all. During the install the load.php file isn't edited at all.

EDIT:

I just installed a fresh chat on a test site. Ran the mysite/chat/install.php and this is the result....

Database tables created successfully - please delete this file (install.php).

Deju

mrt,  Thank you very much for your time, patience, and expertise in helping to set up my Chatroom.  It's up running and the responses are very positive thus far.  Ideas like "Open Source" and "The Social Web" wouldn't exist if it were not for people like you. 

mrtrc266

Quote from: Deju on March 06, 2009, 06:50:35 PM
mrt,  Thank you very much for your time, patience, and expertise in helping to set up my Chatroom.  It's up running and the responses are very positive thus far.  Ideas like "Open Source" and "The Social Web" wouldn't exist if it were not for people like you.

Thank you very much for the compliments :) I'm far from an expert, I barely know what I'm doing but I love a challenge ;) I know how much of an asset this AJAX Chat and Intergration MOD are to a community, so I'm glad I was able to help you get it goin'.

bullbreedluverz

hi ive got couple problems with the integration for chatroom

1) when entering chat it doesnt open in a new window - i have the popup selected

2) i have a custom menu bar, its a static menu positioned at top of my screen, and the users in chat doesnt display there

3) i dont have a header on my forum so cant display users in chat in the header info section, which code operates this so i can try moving it to a place somewhere at the top of my forum

cheers

mrtrc266

Quote from: bullbreedluverz on March 07, 2009, 06:39:49 AM
hi ive got couple problems with the integration for chatroom

1) when entering chat it doesnt open in a new window - i have the popup selected

2) i have a custom menu bar, its a static menu positioned at top of my screen, and the users in chat doesnt display there

3) i dont have a header on my forum so cant display users in chat in the header info section, which code operates this so i can try moving it to a place somewhere at the top of my forum

cheers

For 1, 2 and 3 it looks like you just need to do the manual edits for your theme using a Package Parser

1. After doing the manual edits make sure you don't have PopUp Blockers on. It works fine in IE and FF tested on 118 and RC1

2. Doing the manual edits for your theme should show the number of users on the chat menu button.

3. When you open the intergration MOD in the Package Parser look for this piece of code that shows the number of users in chat. Just a thought though, if you want this at the top of your forum you will already have the number of users on the top of your forum on the menu button. Might be kind of redundent?

if ($modSettings['enableChatBelowPM']){
if (count(array_unique(getChatOnlineUserIDs())) == 0 )
echo '<br />' . $txt['chat_no_user'];
elseif (count(array_unique(getChatOnlineUserIDs())) == 1 )
  echo '<br />  1' . $txt['chat_aUser']. '.<br />';
else
  echo '<br /> ' . count(array_unique(getChatOnlineUserIDs())). $txt['chat_users']. '<br />';


Have fun and good luck ;)

bullbreedluverz

i did have a look at some the manual edits and they seemed fine but ill go thru it all a lot closer later

the reason i may need to place the users in chat somewhere at top my forum is because the number on the chat button may not work because of my custom menu bar

Damien666

#672
Ok so i got it running but i cant see any of the link texts for it, check boxs there and work but no text.

www.aefleet.com

I just updated from 1.1.7 - 1.1.8
No mods installed yet.


also where do i find the custom theme coding?

mrtrc266

Quote from: Damien666 on March 07, 2009, 07:53:46 PM
Ok so i got it running but i cant see any of the link texts for it, check boxs there and work but no text.

www.aefleet.com

I just updated from 1.1.7 - 1.1.8
No mods installed yet.


also where do i find the custom theme coding?

Not sure exaclty what you mean by "link texts" Looking at your forum it seems that everything is showing just fine?

Regarding the custom theme coding you'll have to use a Package Parserto do the edits.

Damien666

#674
i got it working just need mabey some help on custom theme.


working on menu

Quote// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
   global $context, $settings, $options, $scripturl, $txt;

   echo '
      <ul id="menu">';

   // Show the default [home] button.
   echo   '<li', $current_action == "home" ? ' class="current"' : '', '><a href="', $scripturl, '"><strong>' , $txt[103] , '</strong></a></li>';
     
     
   // How about the [Forum] button?
   if(!empty($context['portalactive']))
      echo '<li', $current_action == "forum" ? ' class="current"' : '', '><a href="', $scripturl, '?action=forum"><strong>' , $txt['sp-forum'] , '</strong></a></li>';
 
   // How about the [search] button?
   if ($context['allow_search'])
      echo '<li', $current_action == "search" ? ' class="current"' : '', '><a href="', $scripturl, '?action=search"><strong>' , $txt[182] , '</strong></a></li>';

   // Is the user allowed to administrate at all? ([admin])
   if ($context['allow_admin'])
      echo '<li', $current_action == "admin" ? ' class="current"' : '', '><a href="', $scripturl, '?action=admin"><strong>' , $txt[2] , '</strong></a></li>';

   // Edit Profile... [profile]
   if ($context['allow_edit_profile'])
      echo '<li', $current_action == "profile" ? ' class="current"' : '', '><a href="', $scripturl, '?action=profile"><strong>' , $txt[79] , '</strong></a></li>';

   // Go to PM center... [pm]
   if ($context['user']['is_logged'] && $context['allow_pm'])
      echo '<li', $current_action == "pm" ? ' class="current"' : '', '><a href="', $scripturl, '?action=pm"><strong>' , $txt['pm_short'] , ' ', $context['user']['unread_messages'] > 0 ?

'[<strong>'. $context['user']['unread_messages'] . '</strong>]' : '' , '</strong></a></li>';

   // The [calendar]!
   if ($context['allow_calendar'])
      echo '<li', $current_action == "calendar" ? ' class="current"' : '', '><a href="', $scripturl, '?action=calendar"><strong>' , $txt['calendar24'] , '</strong></a></li>';

// The [calendar]!
   if ($context['allow_chat'])
      echo '<li', $current_action == "chat/index.php" ? ' class="current"' : '', '><a href="', $scripturl, '?action=chat/index.php"><strong>' , $txt['chat'] , '</strong></a></li>';


// [SMF Media Gallery]
   if (allowedTo('mgallery_access'))
      echo '<li', $current_action == "mgallery" ? ' class="current"' : '', '><a href="', $scripturl, '?action=mgallery"><strong>' , $txt['mgallery_gallery'] , '</strong></a></li>';

  // the [member] list button
   if ($context['allow_memberlist'])
      echo '<li', $current_action == "mlist" ? ' class="current"' : '', '><a href="', $scripturl, '?action=mlist"><strong>' , $txt[331] , '</strong></a></li>';


   // If the user is a guest, show [login] button.
   if ($context['user']['is_guest'])
      echo '<li', $current_action == "login" ? ' class="current"' : '', '><a href="', $scripturl, '?action=login"><strong>' , $txt[34] , '</strong></a></li>';


   // If the user is a guest, also show [register] button.
   if ($context['user']['is_guest'])
      echo '<li', $current_action == "register" ? ' class="current"' : '', '><a href="', $scripturl, '?action=register"><strong>' , $txt[97] , '</strong></a></li>';


   // Otherwise, they might want to [logout]...
   if ($context['user']['is_logged'])
      echo '<li><a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '"><strong>' , $txt[108] , '</strong></a></li>';

   echo '</ul>';
}


I have no idea where to start on the shoutbox its self. Im useing Efsane Atomic theme. Any help is welcome


edit:  trying the package parser

Xboers

Where should I post?

Is there a fuction on this chat whereby I could set a MINIMUM post size? I would like to have the people on my chat post no less than 20 words and if they do and error message telling then that: "Sorry, this is a discussion Chat and your reply must consist of more than twenty words. Please try again."

Why is it everybody knows more than me?

mrtrc266

Quote from: Xboers on March 08, 2009, 04:57:34 AM
Where should I post?

Is there a fuction on this chat whereby I could set a MINIMUM post size? I would like to have the people on my chat post no less than 20 words and if they do and error message telling then that: "Sorry, this is a discussion Chat and your reply must consist of more than twenty words. Please try again."

Not sure how to get a custon error message but here it the code that will set the min/max charcters..

/yourforum/chat/lib/config.php

find
// Max messageText length:
$config['messageTextMaxLength'] = 1040;


and change to whatever you'd like

mrtrc266

@ Damien666

GL w/ the Parser, attatch up your theme files if you have any troubles.

Xboers

Quote from: mrtrc266 on March 08, 2009, 10:41:18 AM
Quote from: Xboers on March 08, 2009, 04:57:34 AM
Where should I post?

Is there a fuction on this chat whereby I could set a MINIMUM post size? I would like to have the people on my chat post no less than 20 words and if they do and error message telling then that: "Sorry, this is a discussion Chat and your reply must consist of more than twenty words. Please try again."

Not sure how to get a custon error message but here it the code that will set the min/max charcters..

/yourforum/chat/lib/config.php

find
// Max messageText length:
$config['messageTextMaxLength'] = 1040;


and change to whatever you'd like

Tried to put in a MIN string but that did not word.

Thanks mrtc266, I need to NOT limit the words Max, but the words MIN
Why is it everybody knows more than me?

mrtrc266

Oooops, sorry I misread your post. That's what I get for posting BEFORE coffee ;D.

Not sure about that one, will look into it though after work. Just at a quick glance there are 9 files with 12 referrences to the messageTextMaxLength. Might be a tough one.

Advertisement: