• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

How do I add a chat application?

ineedhelp

Well-known member
#1
Hi - can someone help me please with the following....

<!-- mytab -->
<li class="navTab PopupClosed"><a href="http://tinychat.com/xxxxxxxxx"class="navLink">Chatroom</a></li>
I entered the code into the Templates > Navigation tab

But it takes me off my site and directs to the LINK - I dont want this to happen... I want the link to open within my site, within the xenforo default template i am using and for the chatroom to be EMBEDDED into the template. So all xenforo template headers, footers, and menus remain intact.

The link also currently displays to Guests allowing them to go to the Link........ I want them to be able to see the Link BUT I dont want them to be accessing the page without logging in or signing up.

----------------
And why is it better to use xen:link and xen:phrase. rather any other way?

If someone can give me the xenlink and xen:phrase method, that would be ideal...... Please also tell me the coding and how and where to enter this coding....

Please will someone help and guide me by providing the correct coding so I can copy/paste it into the correct place.

I'm learning as I go along, so thank u for helping me in advance.
 

Brogan

XenForo moderator
Staff member
#2
Embed the URL in a XenForo Page using an iframe.

Set the permissions for the page to disallow guests from accessing the Page.

Phrases are useful if they are used throughout the code; you only need to update the phrase and it will update all templates which use it.
The also allow for translations to be used.
 

ineedhelp

Well-known member
#3
If you see click on the tiny chat link above - I only want to embed the actual Chatroom.... not all of the tiny chat page...... can you tell me how I can achieve this please?

How and where would i set the permissions?

Do you I need to use Phrases? Where do i enter it and what would the phase be?
 

Brogan

XenForo moderator
Staff member
#4
I'm not familar with that software, you will have to confirm whether just the chat window can be embedded using an iframe (it should be possible).

Permissions are set in the ACP for users, user groups and nodes.

It's up to you whether you use phrases or hard coded text.
Phrases are created in the ACP; you decide what title the phrase should have, and the content.
 

James

Well-known member
#5
HTML:
<object type="application/x-shockwave-flash" id="tinyembed" align="top" width="100%" height="730" data="http://tinychat.com/tinychat.swf">
<param name="quality" value="high">
<param name="scale" value="noscale">
<param name="allowFullScreen" value="true">
<param name="wmode" value="transparent">
<param name="allowScriptAccess" value="always">
<param name="menu" value="false">
<param name="salign" value="t">
<param name="flashvars" value="roomVar=halfasleepguy&amp;embedMode=true&amp;pageVar=http://tinychat.com/halfasleepguy&amp;askJoin=auto&amp;apiVar=list&amp;extDomain=tinychat.com&amp;langVar=en">
</object>
That should work.
 

ineedhelp

Well-known member
#6
HTML:
<object type="application/x-shockwave-flash" id="tinyembed" align="top" width="100%" height="730" data="http://tinychat.com/tinychat.swf">
<param name="quality" value="high">
<param name="scale" value="noscale">
<param name="allowFullScreen" value="true">
<param name="wmode" value="transparent">
<param name="allowScriptAccess" value="always">
<param name="menu" value="false">
<param name="salign" value="t">
<param name="flashvars" value="roomVar=halfasleepguy&amp;embedMode=true&amp;pageVar=http://tinychat.com/halfasleepguy&amp;askJoin=auto&amp;apiVar=list&amp;extDomain=tinychat.com&amp;langVar=en">
</object>
That should work.
That's almost perfect, thanks, couple of things wrong with it.... it displayed 2 big allows on the left side?

And also, how to imbed it into a Tab page using iFrame.

Thanks.

If I pm you my side along with a temp member registration login and password, can u check it for me, that way you will understand what i'm exactly saying?
 

James

Well-known member
#7
To change its width/height, just edit the width and height attributes on the <object /> element.

You don't need to embed it into a page, just use the code I pasted inside a XenForo Page.
 

ineedhelp

Well-known member
#8
To change its width/height, just edit the width and height attributes on the <object /> element.

You don't need to embed it into a page, just use the code I pasted inside a XenForo Page.
Yes, the embedding is ok......

But how do I embed inside a Xenforo Page? I entered the code and it pasted the chatroom onto the homepage of the forums.

I've created a Tab called Chatroom - i want it linked and imbed in that...... I've only created a Tab, not a page

Can you tell me how to link a tab to a page for this chatroom pls.
 
R

ragtek

Guest
#10
To get the right url use:
PHP:
XenForo_Link::buildPublicLink('pages', array('node_name' => 'yourpagename'))
 
R

ragtek

Guest
#14
Sorry.
I thought you're using the event listener system...

Code:
<li class="navTab PopupClosed"><a href="{xen:link 'pages', {xen:array 'node_name=xxx'}}........................
should work
 
R

ragtek

Guest
#17
{xen:link pages/chatroom} worked fine :p
This could make problems with add-ons which are changing the page routes..
I know, most users doesn't have this, but once you install a add-on doing this, have fun searching for the problem:p
 

James

Well-known member
#18
This could make problems with add-ons which are changing the page routes..
I know, most users doesn't have this, but once you install a add-on doing this, have fun searching for the problem:p
With that logic I shouldn't use {xen:link members, $user} or {xen:link forums, $forum} or {xen:link help/smilies} just in case I decide to install an add-on that changes the route ;)
 
R

ragtek

Guest
#19
With that logic I shouldn't use {xen:link members, $user} or {xen:link forums, $forum} just in case I decide to install an add-on that changes the route ;)
Why?
They all use using the xenforo link builder & the route for this.
And xen:link pages/chatroom isn't using it....
 
R

ragtek

Guest
#20
Easy to test:

Open: XenForo_Route_Prefix_Pages

replace
public function buildLink($originalPrefix, $outputPrefix, $action, $extension, $data, array &$extraParams)
{
return XenForo_Link::buildBasicLinkWithStringParam($outputPrefix, $action, $extension, $data, 'node_name');
}
with

public function buildLink($originalPrefix, $outputPrefix, $action, $extension, $data, array &$extraParams)
{

echo 'using page link builder ' . $originalPrefix . ' - ' . print_r($data) ."\n";
return XenForo_Link::buildBasicLinkWithStringParam($outputPrefix, $action, $extension, $data, 'node_name');
}

and include

{xen:link pages/chatroom}
{xen:link 'pages', {xen:array 'node_name=xxx'}}

into a template and check the output...