TinyPortal

Development => Resources => Topic started by: feline on October 23, 2007, 08:01:54 PM

Title: FNW Ajax Chat v0.10
Post by: feline on October 23, 2007, 08:01:54 PM
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
Title: Re: FNW Ajax Chat v0.10
Post by: alhaudhie on November 04, 2007, 04:54:39 PM
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
Title: Re: FNW Ajax Chat v0.10
Post by: Dragooon on November 04, 2007, 05:00:26 PM
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>
Title: Re: FNW Ajax Chat v0.10
Post by: alhaudhie on November 04, 2007, 05:19:57 PM
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...

Title: Re: FNW Ajax Chat v0.10
Post by: Dragooon on November 04, 2007, 05:23:38 PM
Try this
<img src="Your img" onclick="openChat(); />
Title: Re: FNW Ajax Chat v0.10
Post by: alhaudhie on November 04, 2007, 05:44:10 PM
not succeed...
Title: Re: FNW Ajax Chat v0.10
Post by: G6Cad on November 04, 2007, 06:25:17 PM
Feline will happliy give you support for her script on her site.
http://feline-networks.com
Title: Re: FNW Ajax Chat v0.10
Post by: feline on November 05, 2007, 10:27:49 AM
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
Title: Re: FNW Ajax Chat v0.10
Post by: clintre on November 06, 2007, 02:10:30 AM
Very nice, works like a champ!
Title: Re: FNW Ajax Chat v0.10
Post by: stormlrd on November 06, 2007, 04:12:32 AM
I'll have to play with it when i get a chance, sounds like a fun addition feline excellent