Tutorial: how to COMPLETELY integrate FlashChat into SMF so you have a cool CHAT

Started by marcnyc, October 09, 2004, 07:21:56 AM

Previous topic - Next topic

Xarcell

Quote from: jay_nasty on February 19, 2005, 07:30:36 PM
anytime i replace the code like described in the tutorial

else {
     echo '<a href="', $GLOBALS['boardurl'], '/FlashChat/flashchat.php">',
     ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url']
     . '/chat_icon.gif" alt="FlashChat" style="margin: 2px 0;"
     border="0" />' : "FlashChat"),'</a>';

    echo '<a href="', $scripturl, '?action=logout;sesc=', $context['session_id'],
    '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url']
    . '/' . $context['user']['language'] . '/logout.gif" alt="' . $txt[108]
    . '" style="margin: 2px 0;" border="0" />' : $txt[108]),'</a>';
}

in my /themes/curve/index.template


nothing happens!

when i edit my

/themes/default/index.
#

i get

Template Parse Error!
It seems something has gone sour on the forum with the template system. This problem should only be temporary, so please come back later and try again. If you continue to see this message, please contact the administrator.

You can also try refreshing this page.


my actual theme is curve and i dont wont to change it


can anyone help me

i tried everything

I get the exact same error...

-Xarcell

Xarcell

I got it to work, instead of adding it all, I just added


     echo '<a href="', $GLOBALS['boardurl'], '/FlashChat/flashchat.php">',
     ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url']
     . '/chat_icon.gif" alt="FlashChat" style="margin: 2px 0;"
     border="0" />' : "FlashChat"),'</a>';

right under "else"

-Xarcell

Xarcell

Ok, I got the chat working, but then I took the next step and tried to get it "within" the forums using the info from the tutorial. For some reason teh page won't load. I checked my chat.template to make sure the url us correct. It is because I can direct link to it. the action=chat seem to be working just fine, I just get a 404 error within the iframe.

What else could it be?

-Xarcell

Xarcell

It works and works well. I just redid the chat.template file and bling, it appeared.

Xarcell

I also tried something else. I posted that iframe in the "static page mod".

Looks a tad cleaner....

-Xarcell

Mungkumu

Pheasant Plucker and Owdy (or anybody who can do PHP better than I :) ):

I used PP's "Who's Online" tip a few posts up, and it's working great...but is there a way to preface the list of names with "Who's Chatting:"?? All I'm getting now is a list of names without any sort of info about what it means...I'm sure it's an easy fix but I'm not handy enough with coding to figure it out, so any help would be much appreciated...

Owdy

You can include Flash chats info.php in SMF's Boardindex.template.php
Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

Mungkumu

Ahhh, I figured out how to do what I wanted. Very easy indeed. Thanks!

Jako

How could I integrate FlashChat ONTO the index of my forum? Like, I want the FlashChat on top, then the forum boards below. Any ideas?
Maximus: Brothers, what we do in life... echoes in eternity.


Owdy

Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

Kindred

there's a problem with this...

(someone on the flashchat forums asked, essentially the same thing. They wanted to use the flashchat as an enhanced shoutbox)

SMF, as standard, reloads the whole page each time a new page is called.   I have not yet seen it run in an iframe environent.
If you just icnlude the flashchat window in a frame above the SMF forum, then each time someone goes to a page in SMF, they will be logged out and logged back in to flashchat.

Flashchat is a CHAT program... not a shoutbox.
if you want a shotubox, install the SMF shoutbox mod...   there are even ways to take the entries from the shoutbox and import then into flashchat...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Owdy

Serious, frames. Top frame flash chat, bottom frame smf. But remember, frames are devils work! :P
Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

Jako

Maximus: Brothers, what we do in life... echoes in eternity.


Owdy

Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

Estwingr

  I need a little help.  I installed both of the user displays, the one that shows the number of users and the one that shows the users name.  The only problem I have is that on some of my pages it shows the users on the same line as the link tree.  Here is the code I have
echo '
Currently there ' . $singularplural1 . ' <font color="#FF0000">' . $chatcount . ' User'.$singularplural2.' in the Chat&nbsp;&nbsp;</font>';
             include ('http://www.mopartruckworld.com/forum/chat/info.php');

       }


  Can I put a <br> in there some where?  I tried many, many times but since I don't know php I didn't know where to put it.   I don't even know if I can use that.  I just need a way to show this info on its own line on my forum.  Thanks!!

Jeff

Kindred

well, you could try putting a <br /> at the start of the echo statement...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Davy-D

Hi marcnyc,

works just greatly smooth. I really like the message about the users currently in chat in the header. Is it possible to add a line for "users currently logged into the board" ?

Thanks a lot for the great tutorial again,
Davy-D

scrawl


thanks heaps for that marcnyc, came in very handy you're a legend.

Kindred

Davy-D,

The alreeady exists in the info center at the bottom of the main screen....   if you want to put it elsewhere on your screen, then open BoardIndex.template.php and copy the code for it inti index.template.php, right near where you added your chatting code.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Davy-D

Kindred,

thanks for that hint. I managed to edit the line as I wanted. The only problem is that I also want to make "not-logged-in" people to see how many people are signed in, chatting, and reviewing the index site.
Guest access is disabled though. The original hack from marcnyc showed the number also on the login site, my personal hack doesnt show any other number. What is the reason ?

UPDATE:
Okay, in the index page, I have now "Chatters online" and "Users in Forum" (by querying the DB table smf_log_online for the amount). But I want to list the guests which are not logged in due to restricted rights as well. How can I differentiate them ? Asked differently: why in the index page, the array $context is empty ?

UPDATE2:
Okay okay, I am stupid - but sometimes learning quickly ;). I managed to differentiate now the 2 items by matching the SQL query one time for "not-user-id-0" and one time "user-id-0". Thanks a lot for all help, thanks for this nice community forum and last but not least for SMF and mySQL.

cu,
Davy

Advertisement: