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

Recent

Welcome to TinyPortal. Please login or sign up.

April 18, 2024, 08:44:29 PM

Login with username, password and session length
Members
  • Total Members: 3,885
  • Latest: Growner
Stats
  • Total Posts: 195,164
  • Total Topics: 21,219
  • Online today: 203
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 1
  • Guests: 96
  • Total: 97
  • tino

FNW Ajax Chat v0.10

Started by feline, October 23, 2007, 08:01:54 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

feline

Just I have upload the first release of FNW Ajaxchat on my site.
This is the Popup version as run on my site.
A "inside forum" version follow.

Inside the archive you find a small "Block Code Snippet" for TinyPortal to get a list of online Chatuser in a sideblock.

A complete documentation you can found at:
http://feline-networks.com/index.php?page=fnw_ajaxchat_install

Download (registered user)
http://feline-networks.com/index.php?action=tpmod;dl=item105

Fel

alhaudhie

how can i make clikcable image in the left block that user can click that image and then enter to the chat.

i dont want to put it in the menubar...

TQ

Dragooon

Don't know the full story about the Ajax chat here but for the Clickable image thingy....
<a href="YOUR URL"><img src="YOUR IMAGE URL" /></a>

alhaudhie

this is the index php

// --- start ajaxchat
// Show the [chat] button.
if(allowedTo('can_chat'))
echo ($context['browser']['is_ie4']) ? '<td class="maintab_active_first">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_back" onclick="openChat();">
<a noref style="cursor:pointer;">Chat', (isset($context['chatuser']) && $context['chatuser'] > 0 ? ' ['.$context['chatuser'].'] <img style="margin:-3px 0px;" src="'. $settings['default_images_url'] .'/chat.gif" />' : ''), '</a>
</td>';
// --- end ajaxchat


i dont want to use this in menubar...
but i want to put and image in left/right block that user can click it to enter the chat room...


Dragooon

Try this
<img src="Your img" onclick="openChat(); />

alhaudhie


G6Cad

Feline will happliy give you support for her script on her site.
http://feline-networks.com

feline

Try this for the php TpBlock ...


// TinyPortal Chat User Online block
global $context, $boardurl;
echo '
<script type="text/javascript">
<!--
function openChat()
{
var leftPos = screen.width/2 - 355;
var topPos = screen.availHeight/2 - 265;
var chat = window.open("'.$boardurl.'/fnw_ajaxchat/index.php", "Chat", "width=700,height=500,left="+leftPos+",top="+topPos+",dependent=yes,location=no,menubar=no,resizable=yes,scrollbars=no,status=no,toolbar=no");
chat.focus();
}
-->
</script>
<div class="smalltext">';
if(allowedTo('can_chat'))
echo '
<a noref style="cursor:pointer;">
<img src="'.$settings['default_imags_url'].'/chatonline.gif" style="margin: 0;" align="bottom" alt="" onclick="openChat();" />
</a>';
else
echo '
<img src="'.$settings['default_imags_url'].'/chatonline.gif" style="margin: 0;" align="bottom" alt="" />';

echo '
<b>'.$txt[158].'</b>';
if (isset($context['chatuser']) && $context['chatuser'] > 0)
{
echo'
<hr />
</div>';
foreach($context['chatonline'] as $row)
{
echo '
<div class="smalltext">
<a href="'. $scripturl .'?action=profile;u='. $row['userID'] .'" style="color:'.$row['onlineColor'].';"><b>'. $row['userName']. '</b></a>  ('. ($row['channel'] == 0 ? 'Public' : 'Support'). ')
</div>';
}
}
else
echo '
</div>';


Fel

clintre

Very nice, works like a champ!

stormlrd

I'll have to play with it when i get a chance, sounds like a fun addition feline excellent