FlashChat Integration

Started by Tyrsson, January 05, 2007, 03:44:53 AM

Previous topic - Next topic

Draco_Wolf

Quote from: Simplemachines Cowboy on February 03, 2007, 11:41:32 PM
To solve the log out pop-up problem:

Find the dologout.php file in your chat folder.
Make a copy, and place the copy in your main SMF root folder.
Edit the 2nd line of the file to reflect the proper path.
This is mine; FlashChat is in the /chat folder.
require_once('chat/inc/common.php');



After I copy and paste, my flash chat cannot use anymore. Can anyone fix this ??

Sidhe

Hi... I am also running the Amber theme and have had a hard time getting a button/link to appear on the top menu.  I did exactly as suggested below... and there is now a link on the menu bar... but it has no text... just a blank space that links to the chat.  Any ideas?

SMF 1.1.2,  Amber theme... otherwise the same as the original poster of this questions.

Thank you.


Quote from: Daniel15 on January 11, 2007, 05:32:21 AM
Quote from: SMURF6060 on January 10, 2007, 09:45:50 PM

QuoteBut how would i get it to show in the menu task bar?
QuoteYou'd need to ask the author of the theme how to add a new button.
If you provide a link to the theme download, I'll take a look at it ;)

hxxp:www.tinyportal.net/index.php?action=tpmod;dl=item506 [nonactive]
is the download link for BLOC'S  amber theme for smf 1.1 final
OK, in Themes/amber11final/index.template.php, find:

if (in_array($_GET['action'],array('search','admin','calendar','profile','mlist','register','login','pm','help')))

Replace with:

if (in_array($_GET['action'],array('search','admin','calendar','profile','mlist','register','login','pm','help','chat')))


Also, find:

// The [calendar]!
if ($context['allow_calendar'])
echo $tab1, $ca== 'calendar' ? '1' : '2' , '"><a href="', $scripturl, '?action=calendar">'.$txt['calendar24']. '</a></td>';

Add after:

// FlashChat!
if ($context['user']['is_logged'])
echo $tab1, $ca== 'chat' ? '1' : '2' , '"><a href="', $scripturl, '?action=chat">'.$txt['fc_chat']. '</a></td>';


QuoteI've decided I'd like to keep all the functions of the mod but I would like to have the chat window seperated again from the forum page.  Is this possible to do without too much trouble?
Nope, no trouble at all :). Simply changing the link to the default FlashChat one will do this.
In Themes/default/index.template.php, find:

<a href="', $scripturl, '?action=chat">' , $txt['fc_chat'] , '</a>

Replace with:

<a href="', $GLOBALS['boardurl'], '/chat/flashchat.php">' , $txt['fc_chat'] , '</a>


In the future, there may be an option to enable or disable this in the admin panel :)


ronnie41

Quote from: sciurus on January 10, 2007, 11:31:11 AM
Great mod, no probems to install, simple instructions to follow to edit custom template.

I wish it was that simple cose i have the following problem.

I do these steps.

I have download the mod ( trough smf )
I try to instal then this happens.

ftpserver: localhost            port:21
username: i fill in
password: i fill in
lokal pad to smf: i have tried everything but nothing seems to work!!! what in the name of god do i have to fill in here, i have tried my www.myadres and more  of it but i do not get it running.

i have already installed flashchat and that is running ok, but i not cant get it running trough the forum.
it makes me crazy and hope somebody can help to get this running ok.

thanks for the help.

Greetz Ronnie

k.trout

One solution for my situation might be to simply un-install the flashchat integration mod and then re-install.  The present installation of this mod was done when my version of flashchat was not integrated into the SMF board.  Does anyone have any experience with using un-install with this mod?  Are there risks involved?  If not it looks like that may be my best option.  Thanks for any feedback on this.

K

ckgb

Hello,

I am trying to figure out how to moderate this integrated chat. Install/Integration and mod installation all went with no problem. Everything works fine.

But moderation is something I can not figurte out.

1. First of all administrator seems not to be able to ban users. Cause all it does is kick them out of the room which they can reenter right away.

2. Id does not matter which way a user was banned (forum or chat) - this user can re-enter the chat and talk in there. Basically ban does not work.

....... what needs to be done to ban permanently? Not temporarily kick out..

3. What is the way to give someone chat moderator rights?

Thank you.

Col

Hi Daniel,

You've done a nice job.

I've combined the code you pasted in the first few pages so that I have the chat room open in its own window, and without being embedded within the forum index page. This means that members can roam the forum, and listen out for when someone enters the chat room. Also, they will have no forum buttons to click, etc., which would log them out if used in chat room view.

Anyway, I need to make a couple of modifications. I use php includes to show who's online on my webpages. I'd like to show who's in the chat room too. can you give me pointer, or better still, the code! ;) I'd also like to rearrange the info in Users Online, so that:

4 Guests, 6 Users
Users active in past 15 minutes:
member A, member B, etc.
3 user(s) currently in chat:
member 1, member 2, member 3

I'd like to then port this to the webpages with a php include. Actually, if you don't mind me saying so, I think your mod would benefit from this modest tweak to the display of the stats. Perhaps even a box line separating the two sets of stats?

Anyway, any help you can offer would be greatly appreciated.

Thanks.

seelie

This should be a quickie ...

Currently, I have this code to open Flashchat w/o forum around it.

<a href="', $GLOBALS['boardurl'], '/chat/flashchat.php >' , $txt['fc_chat'] , '</a>

Where exactly would I place the target=_blank and any height / width declarations to spawn a new, smaller window?

boki

I've installed mod file (test was successful), but afther that I get the following error message in forum:

Table 'drugacen_smforum.flashchat_connections' doesn't exist
File: /home/drugacen/public_html/smf/Sources/BoardIndex.php
Line: 359

Do you have any idea why?

Thanks

mtncat

Got this form Veronica's post on Tufat forum:

Change in /chat/inc/cmses/smfCMS2.php add the bold underlined text:

function getUser($userid) {

    $rv = NULL;
    if(($rs = $this->getUserStmt->process($userid)) && ($rec = $rs->next())) {
      $rec['roles'] = $this->getRoles($rec['status']);
      $rec['login'] = $rec['realName'];
      $rv = $rec;
    }


and also the bold underlined text (note the comma sign must be added too)


$this->getUserStmt  = new Statement("SELECT ID_MEMBER AS id, memberName AS login, ID_GROUP as status, realName FROM {$GLOBALS['db_prefix']}members WHERE ID_MEMBER=? LIMIT 1");


Now users will autologin or login with their SMF memberName but FlashChat will show their SMF realName in the chat rooms


Thanks Veronica!!

aislin

I seem to have inadvertently done something others were trying to do on purpose! I moved my forum to a different dir and the chat works fine except that when you click to go to another section of the forum the little logout window doesn't appear, and the users stay in the users in chat list even when they've logged off the forum. I have absolutely no idea what I did. Any help would be appreciated!   

mtncat

Quote from: aislin on March 31, 2007, 05:04:36 AM
I seem to have inadvertently done something others were trying to do on purpose! I moved my forum to a different dir and the chat works fine except that when you click to go to another section of the forum the little logout window doesn't appear, and the users stay in the users in chat list even when they've logged off the forum. I have absolutely no idea what I did. Any help would be appreciated!   

I think that happens when a user doesn't click the Flashchat logout button on the top right of the Chat Window.  I have mine opening in a new window, that allows me to stay in the chat window even if not logged into SMF.  Flashchat will autologin if you are signed into SMF, but will not autologout when you logout   or timeout from SMF.

Quote from: seelie on March 28, 2007, 11:42:30 AM
This should be a quickie ...

Currently, I have this code to open Flashchat w/o forum around it.

<a href="', $GLOBALS['boardurl'], '/chat/flashchat.php >' , $txt['fc_chat'] , '</a>

Where exactly would I place the target=_blank and any height / width declarations to spawn a new, smaller window?


I've been playing with this too... no luck yet.  If someone can show us how to do this... that'd be pretty awesome!!

Col

Hi Seelie and mtncat,

To have the chatroom open in a new window, and without it being embedded within the forum template, edit index.template.php in your theme folder:

Search:
<a href="', $scripturl, '?action=chat">' , $txt['fc_chat'] , '</a>

Replace with:
<a href="', $GLOBALS['boardurl'], '/chat/flashchat.php" target="_blank">' , $txt['fc_chat'] , '</a>

Backup first, etc., etc.

k.trout

Col!  Thanks for posting the code.  Just on a whim I went to my index.template.php and plugged in that code for what I had there and voila!  This solved my problem of the chat icon not functioning on the main page.  Now it works like a charm and the users are noted in the users online and it opens a new page.  I'm not sure why it fixed it but it did. Many thanks.

Now all I need to know is how to get the "Classic" theme to work with the mod and I will be good to go.  Anyone worked with that theme?

nafishasan60

 Error in Package Installation
At least one error was encountered during a test installation of this package. It is strongly recommended that you do not continue with installation unless you know what you are doing, and have made a backup very recently. This error may be caused by a conflict between the package you're trying to install and another package you have already installed, an error in the package, a package which requires another package that you don't have installed yet, or a package designed for another version of SMF.

Execute Modification     ./chat/inc/flashChatTag.php     File not found
10.    Execute Modification    ./chat/inc/cmses/smfCMS2.php    File not found

seelie

#234
Thanks :)

One last question.  I use the Default-MC theme.  I've got all the users in chat portions all edited in to index.template.php and boardindex.template.php

However, one small problem.  I figured I'd be clever and add the same integrated bit to the Info Center up top that my theme uses .   What I edited in works, but ~only~ shows up on the index page of the forum.  Dive deeper into the forum, and it doesn't show, though name, messages, time, etc show globally.  Any ideas?

This is the pertinent bit I have in index.template.php

// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{
echo '
  <a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a>  |
  <a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a><br />';

// Only tell them about their messages if they can read their messages!
if ($context['allow_pm'])
echo ' ', $txt[152], ' <a href="', $scripturl, '?action=pm">', $context['user']['messages'], ' ', $context['user']['messages'] != 1 ? $txt[153] :

$txt[471], '</a>', $txt['newmessages4'], ' ', $context['user']['unread_messages'], ' ', $context['user']['unread_messages'] == 1 ? $txt['newmessages0'] :

$txt['newmessages1'];
echo '.<br />';

// --- Begin FlashChat integration ---
// If there's users in the chat
if (!empty($context['users_chat']))
echo '
<br />
', $txt['fc_users_online'], ':<br />', implode(', ', $context['list_users_chat']);
// --- End FlashChat integration ---



Col

nafishasan60,

Have you installed Flashchat BEFORE installing this mod? Maybe I've misunderstood the error (being a non-coder), but this mod purely integrates Flashchat into your SMF forum more fully.

Col

Quote from: seelie on March 28, 2007, 11:42:30 AM
This should be a quickie ...

Currently, I have this code to open Flashchat w/o forum around it.

<a href="', $GLOBALS['boardurl'], '/chat/flashchat.php >' , $txt['fc_chat'] , '</a>

Where exactly would I place the target=_blank and any height / width declarations to spawn a new, smaller window?

I've just reread this: can you not just include something like this (untested):

<a href="', $GLOBALS['boardurl'], '/chat/flashchat.php" target="_blank" height="400" width="500">' , $txt['fc_chat'] , '</a>

seelie

Quote from: Col on April 02, 2007, 12:46:58 PM
Quote from: seelie on March 28, 2007, 11:42:30 AM
This should be a quickie ...

Currently, I have this code to open Flashchat w/o forum around it.

<a href="', $GLOBALS['boardurl'], '/chat/flashchat.php >' , $txt['fc_chat'] , '</a>

Where exactly would I place the target=_blank and any height / width declarations to spawn a new, smaller window?

I've just reread this: can you not just include something like this (untested):

<a href="', $GLOBALS['boardurl'], '/chat/flashchat.php" target="_blank" height="400" width="500">' , $txt['fc_chat'] , '</a>

It works fine, but ignores the height and width.  I believe I'll have to use some sort of javascript to control the h/w of the new window.  Of course, no users have mentioned ~wanting~ an auto-magically smaller window, so I may leave well enough elone ;)

Col

You should be able to set the height and width within the Flashchat template though! As you said, not really an issue anyway.

seelie

Any hints on the below and why the integration bit I added only appears on the index page of the forum?


Quote from: seelie on April 02, 2007, 12:30:56 PM
Thanks :)

One last question.  I use the Default-MC theme.  I've got all the users in chat portions all edited in to index.template.php and boardindex.template.php

However, one small problem.  I figured I'd be clever and add the same integrated bit to the Info Center up top that my theme uses .   What I edited in works, but ~only~ shows up on the index page of the forum.  Dive deeper into the forum, and it doesn't show, though name, messages, time, etc show globally.  Any ideas?

This is the pertinent bit I have in index.template.php

// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{
echo '
  <a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a>  |
  <a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a><br />';

// Only tell them about their messages if they can read their messages!
if ($context['allow_pm'])
echo ' ', $txt[152], ' <a href="', $scripturl, '?action=pm">', $context['user']['messages'], ' ', $context['user']['messages'] != 1 ? $txt[153] :

$txt[471], '</a>', $txt['newmessages4'], ' ', $context['user']['unread_messages'], ' ', $context['user']['unread_messages'] == 1 ? $txt['newmessages0'] :

$txt['newmessages1'];
echo '.<br />';

// --- Begin FlashChat integration ---
// If there's users in the chat
if (!empty($context['users_chat']))
echo '
<br />
', $txt['fc_users_online'], ':<br />', implode(', ', $context['list_users_chat']);
// --- End FlashChat integration ---




Advertisement: