TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,973
  • Latest: NonStop
Stats
  • Total Posts: 196,236
  • Total Topics: 21,353
  • Online today: 577
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 145
  • Total: 145

Flash Chat Integration with TP (Half Done) Help needed

Started by funxlab, January 31, 2007, 10:53:29 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

funxlab

After going through several posts Flash CHat is integrated with SMF and TP and is using SMF database.

http://www.simplemachines.org/community/index.php?topic=27137.0
http://www.tinyportal.net/index.php?topic=3035.0
http://www.simplemachines.org/community/index.php?PHPSESSID=e98275adbeb4111cb7cd5f24ae4a1392&topic=27137.0



But as these posts demand I am unable to find required code
<a href="', $GLOBALS['boardurl'], '/FlashChat/flashchat.php">
in index.template.php both in default theme and Dilber MC theme that I am using on my TP.

I can see Flash Chat always loading when follwing code is inserted in a frontpage php block.
echo '<iframe width="100%" [b]height="100%"[/b] src="http://casestudents.net/chat/flashchat.php"></iframe>';

But the thing now is that
1- Flash Chat is not using my forum's theme (Dilber MC)
2- It always opens when my site is launched. I want a clickable link for the chat on the top menu which when clicked shows the flash chat loaded for logged in users or login menu for guest on the homepage between left and right blocks.

hmmmm is that possible ? Kindly see my site here http://casestudents.net

Any help will be greatly appreciated.
Best regards for all of you.
Jim.




whoesa

Hi there,

I used this to integrate flashchat in TP and SMF:

http://www.simplemachines.org/community/index.php?topic=66561.0

Maybe you can try and see if this helps a bit more...

funxlab

whoesa
I have been to this link before but this code doesnt create a link in theme I am using (Dilber MC) only a small gap between two buttons can be seen. Unfortunately Theme Author isnt very helpful in this regard. :(
Thank you for your reply.
Regards,
Jim

whoesa

Hi funxlab,

I don't have this theme installed but i took a quick look at it. Can you try this:

Add somewhere in Themes/default/languages/index.english.php:
$txt['chat_1'] = 'Chat';

And somewhere in Themes/dilbermc/index.template.php:
// Show the [chat] button.
      if ($context['user']['is_logged'])
echo'
<td align="center" class="menubg' , $current_action == 'chat' ? '2' : '' , '">
<a href="', $scripturl, '?action=chat">' , $txt['chat_1'] , '</a>
</td>';


Also in Themes/dilbermc/index.template.php, find:
if ($context['current_action'] == 'search2')
$current_action = 'search';


Add this code AFTER the above:

if ($context['current_action'] == 'chat')
$current_action = 'chat';


Hope this works...

funxlab

#4
Whoesa,
This gives me following error.

Fatal error: smf_main() [function.require]: Failed opening required '/home/casestud/public_html/Sources/Chat.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/casestud/public_html/index.php on line 357

But still your reply helped me a lot coz now I have a bit idea how to add a Button to Top menu, I am trying to add 3 Buttons. Do you have any idea how to remove help, members list and search buttons from the top menu ?

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


and

// How about the [search] button?
if ($context['allow_search'])
echo'
<td align="center" class="menubg' , $current_action == 'search' ? '2' : '' , '">
<a href="', $scripturl, '?action=search">' , $txt[182] , '</a>
</td>';

And
// Show the [help] button.
echo'
<td align="center" class="menubg' , $current_action == 'help' ? '2' : '' , '">
<a href="', $scripturl, '?action=help">' , $txt[119] , '</a>
</td>';


will remove member list, help and search from the top menu or I need to remove anything else as well?

Best regards and thanks once again. My index.template.php is in attachment.

Jim

whoesa

Ok i attached your index.template file.

You still need to add this code somewhere in Themes/default/languages/index.english.php:
$txt['chat_1'] = 'Chat';

funxlab

Whoesa,
Thank you for your help, But there is a problem, I can see only Downloads added, Contact and Chat are not appearing. I want to forget Flash Chat and want this link for chat (This is Ajax Chat ) and Contact instead
http://casestudents.net/index.php?action=tpvchat
and
http://casestudents.net/index.php?action=contact

I know I m asking too much but that is something which is kinda headache though I understand the logic a bit :P
Regards,
Jim

funxlab

wow, its working   :2funny:
I mean I can see contact as well when I sign in.
How can I remove search, members and Help dear Whoesa  :P

whoesa

Hmmm it is working just fine on my testsite..

You don't see contact page even when you logged in? Is it the contact page from SMFHacks?

I don't know that other chat but i read on their site : WARNING! This is an alpha version, please report any problems or suggestions to our fourms, SMF Achat has only been tested on SMF versions 1.1 RC2 and RC3, please tell us if you get it working on other versions!
I'm afraid you better ask there for this chat support.. :-\

whoesa

Quote from: funxlab on February 01, 2007, 04:07:31 PM
wow, its working   :2funny:
I mean I can see contact as well when I sign in.
How can I remove search, members and Help dear Whoesa  :P


Ok to be clear on this...you don't want a Flashchat button and you want to remove the SEARCH, HELP and MEMBER buttons?

This website is proudly hosted on Crocweb Cloud Website Hosting.