Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Topic started by: Goosemoose on April 21, 2004, 06:55:26 PM

Title: [DONE] Integrated Chat v1.1 for SMF BETA 4
Post by: Goosemoose on April 21, 2004, 06:55:26 PM
NOTE THIS IS FOR BETA4, BETA5 HAS BEEN RELEASE IN ANOTHER THREAD


Okay, I have received numerous emails for this. Please let me know how it goes and if you see any problems. Make sure you backup your files before you do this. If you had this running on a YabbSE forum that you upgraded then you don't need to run the chatdb.php file as your settings already exist in the database.

This is an integration to use an IRC room hosting by Brodle at everywherechat for FREE

You can see an example at http://www.goosemoose.com/rfc  I have also added a section in the bottom of the main page that lists the users logged into chat.

You can download the file at:
Download here (http://www.goosemoose.com/integratedchat_1.1_SMFB4.zip)
Title: Re: Integrated Chat v1.1 done
Post by: brodle on April 21, 2004, 07:11:54 PM
I own the chat community and work on the java chat we use to power this mod. If anyone has any specific questions about the chat or any special needs let me know. [email protected]

Warning I only check email about 3 times a week, if you reply to this forum post Ill get your questions faster.

brodle


Title: Re: Integrated Chat v1.1 done
Post by: ms_ukyankee on April 21, 2004, 07:41:54 PM
Brilliant, thank you. My users were suffering from withdrawls. ;)
Title: Re: Integrated Chat v1.1 done
Post by: Tomer on April 22, 2004, 06:48:27 PM
Didnt test it yet but looks very good, very nice my friend, maybe they can add it to the upcoming SMF versions.
Title: Re: Integrated Chat v1.1 done
Post by: brodle on April 22, 2004, 09:54:41 PM
In the old YABB someone created a super mod for the board that incorporated this mod and MANY others. Perhaps that will be the path going forward.

Thank you for the comments :)
Title: Re: Integrated Chat v1.1 done
Post by: someshta on April 24, 2004, 12:04:27 PM
Can anyone tell me how to install this mod?  The files are uploaded, but I can't figure out what goes next..
Title: Re: Integrated Chat v1.1 done
Post by: madmanrulez on April 25, 2004, 08:19:06 AM
is't possible for a popup version of the chat be aviliable?....since many ppl want to be in both at the same time
Title: Re: Integrated Chat v1.1 done
Post by: babylonking on April 25, 2004, 08:43:23 AM
Quote from: madmanrulez on April 25, 2004, 08:19:06 AM
is't possible for a popup version of the chat be aviliable?....since many ppl want to be in both at the same time

I second that  ;)

Good work goosemoose  :)
Title: Re: Integrated Chat v1.1 done
Post by: Goosemoose on April 25, 2004, 12:47:31 PM
The version that is installed is already a popup version. Simply click on the "float" button on the bottom of the screen when you load chat. I guess I could also make it open in a new window when you originall click on it if that is what you mean.

I am assuming that the install went smoothly since no one is saying anything?
Title: Re: Integrated Chat v1.1 done
Post by: ms_ukyankee on April 26, 2004, 02:06:17 PM
I've just installed, and it's great :), thank you for providing this to us early, but there is one little thing that I don't like. The point of having a pop up or floating window is so that you can browse other pages, use other windows, etc.. With this floating window, if you navigate to another page with the parent window, the child window disappears. So you have to have two windows open for one. Is that standard floating chat window behavior? I used to use the popup previously, it's not that big of a deal but some people are adverse to change. ;)
Title: Re: Integrated Chat v1.1 done
Post by: [Unknown] on April 26, 2004, 02:07:34 PM
I think that's just sorta how java works...

-[Unknown]
Title: Re: Integrated Chat v1.1 done
Post by: ms_ukyankee on April 26, 2004, 02:16:14 PM
Is there a step missing? I don't have the button in my menu. Which file would that go into?
Title: Re: Integrated Chat v1.1 done
Post by: [Unknown] on April 26, 2004, 02:26:13 PM
index.template.php.  Near the bottom, in the menu sub template....

-[Unknown]
Title: Re: Integrated Chat v1.1 done
Post by: ms_ukyankee on April 26, 2004, 02:44:31 PM
Thank you [Unknown], found it. Added this:

// If the user is a logged in, show chat button.
if ($context['user']['is_logged'])
{
echo '
<a href="', $scripturl, '?action=chat">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/chat.gif" alt="' . $txt['chatAlt'] . '" style="margin: 2px 0;" border="0" />' : $txt['chatAlt']), '</a>', $context['menu_separator'] ;
}

Title: Re: Integrated Chat v1.1 done
Post by: Homie on April 26, 2004, 02:55:46 PM
I Have a  question how do you install this. Is this a Mod. Is ther any Instructions  ???  >:(
Title: Re: Integrated Chat v1.1 done
Post by: ms_ukyankee on April 26, 2004, 03:06:43 PM
You can open the .mod file in the zip with a text editor like Notepad. Make the changes to the files as per the steps in the mod file. You can copy and paste the text in the steps. Upload the changed files and the files that came in the zip. The instructions are in there at the top too, follow those as well. :)
Title: Re: Integrated Chat v1.1 done
Post by: [Unknown] on April 26, 2004, 04:23:45 PM
Quote from: ms_ukyankee on April 26, 2004, 02:44:31 PM
Thank you [Unknown], found it. Added this:

// If the user is a logged in, show chat button.
if ($context['user']['is_logged'])
{
echo '
<a href="', $scripturl, '?action=chat">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/chat.gif" alt="' . $txt['chatAlt'] . '" style="margin: 2px 0;" border="0" />' : $txt['chatAlt']), '</a>', $context['menu_separator'] ;
}



Wow, it's even i18n.  Good job, I'm impressed ;).

-[Unknown]
Title: Re: Integrated Chat v1.1 done
Post by: ms_ukyankee on April 26, 2004, 04:52:50 PM
Quote from: [Unknown] on April 26, 2004, 04:23:45 PM

Wow, it's even i18n.  Good job, I'm impressed ;).

-[Unknown]

i18n? You lost me. I just copied and pasted one of the other button's code and changed the appropriate bits, don't give me too much credit, lol. ;)
Title: Re: Integrated Chat v1.1 done
Post by: [Unknown] on April 26, 2004, 04:54:43 PM
Well, i18n means "internationalization".  Technically, it means i + 18 letters + n.

Basically, I mean that the code you posted could be used even here, where some people use Spanish, Dutch, and German, while others use English.

-[Unknown]
Title: Re: Integrated Chat v1.1 done
Post by: theoscarspot.com on April 26, 2004, 05:16:39 PM
Please forgive a stupid question, but is this chat tied to any particular IRC server... or can you choose your own?
Title: Re: Integrated Chat v1.1 done
Post by: ms_ukyankee on April 26, 2004, 06:31:16 PM
Quote from: theoscarspot.com on April 26, 2004, 05:16:39 PM
Please forgive a stupid question, but is this chat tied to any particular IRC server... or can you choose your own?

It's nearly impossible to find an applet where you can choose your own server, unless you're running the irc server yourself and host your own chat applet. This one is from everywherechat.com. I've been using it for almost 2 years, no complaints, and fairly easy to use, supporting a lot of irc features such as file transfer, smileys, sounds, etc. :)
Title: Re: Integrated Chat v1.1 done
Post by: DeadlyDemon on April 27, 2004, 11:42:50 AM
Sorry bout this stupid question but when i open the .mod file it says Run integratedchat_1.1.mod in boardmodSE, what is boardmodSE?
Title: Re: Integrated Chat v1.1 done
Post by: ms_ukyankee on April 27, 2004, 11:46:20 AM
You don't have to use boardmod, you can follow the steps in the file, looking for text in the files named, and in the case, adding the text in the add after tags. Boardmod is a convenience for automatic installation of mods with a lot of steps. This mod is small. :)
Title: Re: Integrated Chat v1.1 done
Post by: DeadlyDemon on April 27, 2004, 12:14:30 PM
ok, it says i have to add :
// Integrated Chat 1.0 Settings
         array('select', 'chatLanguage', &$txt['chatLanguage'], 'm12', array('embedded' => 'English', 'french' => 'French', 'german' => 'German',
            'greek' => 'Greek', 'italian' => 'Italian', 'malaysian' => 'Malaysian', 'nepal' => 'Nepal', 'polish' => 'Polish',
            'spanish' => 'Spanish', 'turkey' => 'Turkish')),
         array('text', 'chatRoomName', &$txt['chatRoomName']),
         array('text', 'chatAppend', &$txt['chatAppend']),
         array('text', 'chatWidth', &$txt['chatWidth']),
         array('text', 'chatHeight', &$txt['chatHeight']),
         array('text', 'chatPassword', &$txt['chatPassword']),
         array('select', 'chatRoomsTab', &$txt['chatRoomsTab'], 'm12', array('true' => 'On', 'false' => 'Off')),

After &$txt['chatTitle'], but i cant find that anywhere in ModSettings.php
Title: Re: Integrated Chat v1.1 done
Post by: ms_ukyankee on April 27, 2004, 12:26:27 PM
I don't think that's quite right, let me explain:
<edit file>
sources/ModSettings.php
</edit file>

<search for>
array('text', 'cal_maxspan', &$txt['calendar53']),
</search>

<add after>
&$txt['chatTitle'],
// Integrated Chat 1.0 Settings
array('select', 'chatLanguage', &$txt['chatLanguage'], 'm12', array('embedded' => 'English', 'french' => 'French', 'german' => 'German',
'greek' => 'Greek', 'italian' => 'Italian', 'malaysian' => 'Malaysian', 'nepal' => 'Nepal', 'polish' => 'Polish',
'spanish' => 'Spanish', 'turkey' => 'Turkish')),
array('text', 'chatRoomName', &$txt['chatRoomName']),
array('text', 'chatAppend', &$txt['chatAppend']),
array('text', 'chatWidth', &$txt['chatWidth']),
array('text', 'chatHeight', &$txt['chatHeight']),
array('text', 'chatPassword', &$txt['chatPassword']),
array('select', 'chatRoomsTab', &$txt['chatRoomsTab'], 'm12', array('true' => 'On', 'false' => 'Off')),
</add after>

<search for>
'default_personalText', 'time_format',
</search>

<add after>
'chatLanguage', 'chatRoomName', 'chatAppend', 'chatWidth',
'chatHeight', 'chatPassword',
</add after>


You've got the right file, so well done there. :) However, for the first step, you need to find what's in the search for tags:

array('text', 'cal_maxspan', &$txt['calendar53']),


and add this after it:

&$txt['chatTitle'],
// Integrated Chat 1.0 Settings
array('select', 'chatLanguage', &$txt['chatLanguage'], 'm12', array('embedded' => 'English', 'french' => 'French', 'german' => 'German',
'greek' => 'Greek', 'italian' => 'Italian', 'malaysian' => 'Malaysian', 'nepal' => 'Nepal', 'polish' => 'Polish',
'spanish' => 'Spanish', 'turkey' => 'Turkish')),
array('text', 'chatRoomName', &$txt['chatRoomName']),
array('text', 'chatAppend', &$txt['chatAppend']),
array('text', 'chatWidth', &$txt['chatWidth']),
array('text', 'chatHeight', &$txt['chatHeight']),
array('text', 'chatPassword', &$txt['chatPassword']),
array('select', 'chatRoomsTab', &$txt['chatRoomsTab'], 'm12', array('true' => 'On', 'false' => 'Off')),


The steps are in pairs, first the <search for> then the add afters/replaces/add befores. Does that make sense?
Title: Re: Integrated Chat v1.1 done
Post by: DeadlyDemon on April 27, 2004, 12:29:12 PM
o..ok lol i get it now. but i cant find array('text', 'cal_maxspan', &$txt['calendar53']),  in ModSettings.php
Title: Re: Integrated Chat v1.1 done
Post by: ms_ukyankee on April 27, 2004, 12:36:47 PM
Lines 285-287:

// One day events or multi-day?
array('check', 'cal_allowspan', &$txt['calendar52']),
array('text', 'cal_maxspan', &$txt['calendar53']),
Title: Re: Integrated Chat v1.1 done
Post by: [Unknown] on April 27, 2004, 12:42:42 PM
It's changed for Beta 5 Public....

-[Unknown]
Title: Re: Integrated Chat v1.1 done
Post by: DeadlyDemon on April 27, 2004, 12:44:23 PM
 :o uhhh i got beta 5 public lol i forgot 2 mention that...doh
Title: Re: Integrated Chat v1.1 done
Post by: ms_ukyankee on April 27, 2004, 12:45:44 PM
What's changed, the mod? If so, I didn't know either.

Edit: Its dawned on me you mean the files, I haven't upgraded to B5 Public yet. Guess I'll do that tonight...
Title: Re: Integrated Chat v1.1 done
Post by: DeadlyDemon on April 27, 2004, 12:51:50 PM
hmmmm does it have 2 be under array('text', 'cal_maxspan', &$txt['calendar53']), wont it work under anything else?
Title: Re: Integrated Chat v1.1 done
Post by: ms_ukyankee on April 27, 2004, 01:15:57 PM
The arrays are different, just from a quick look. I'd have to really dig in to figure it out.

Any idea when an update to this mod might be coming? I was going to install it on my live board tonight. ::)
Title: Re: Integrated Chat v1.1 done
Post by: DeadlyDemon on April 29, 2004, 11:18:27 AM
uhh does that mean we have 2 wait till un update  ::)
Title: Re: Integrated Chat v1.1 done
Post by: MarcTouchsMySoul on April 30, 2004, 12:29:16 AM
Ok i am stuck

I got your directions
1. Upload files from mod into forum following directory structure in zip file
2  Run chatdb.php via web browser, delete chatdb.php
5. Run integratedchat_1.1.mod in boardmodSE
6. Go into your admin panel and edit the chat settings under mod settings.

But I am stuck on the 3rd direction..welll you have lit listed at 5. I cant find the boardmodSE i am stuck waiting to run the intergratedchat_1.1.mod  Please help.
Title: Re: Integrated Chat v1.1 done
Post by: Goosemoose on May 02, 2004, 02:26:58 AM
Marc,
Please read back a few notes to what ms_ukyankee said about step 3.


ms_ukyankee,
I'll take a look at beta 5 on monday when I'm at work and update the mod. I won't have time this weekend.
Title: Re: Integrated Chat v1.1 done
Post by: ms_ukyankee on May 02, 2004, 04:24:56 AM
Quote from: goosemoose on May 02, 2004, 02:26:58 AM
Marc,
Please read back a few notes to what ms_ukyankee said about step 3.


ms_ukyankee,
I'll take a look at beta 5 on monday when I'm at work and update the mod. I won't have time this weekend.

I understand that. I haven't upgraded yet anyway (no time), so I'm just going to skip it for now so I can get chat going for my users, and upgrade later when this mod is updated. :)
Title: Re: Integrated Chat v1.1 done
Post by: Goosemoose on May 02, 2004, 06:09:04 PM
I'll be done in about 30 minutes ;)
Title: [done] Re: Integrated Chat v1.1 for SMF BETA 4
Post by: Goosemoose on May 02, 2004, 07:47:59 PM
Okay, done and posted in a new thread.