News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

AjaxChat Integration (latest version 3.2.1)

Started by .HuNTeR., August 27, 2008, 12:59:06 AM

Previous topic - Next topic

tfs

Quote from: xxxwindsor on March 23, 2009, 01:38:08 AM
Quote from: mrtrc266 on March 23, 2009, 12:50:38 AM
@ xxxwindsor  If I understand you correctly I believe that if you don't check the option to "open chat in pop up" that it will not open in a new window.
That's what I though and I have double checked to make sure it is not checked. Still launches new window though.

The chat window will always be in a new browser windw, but when you select the checkbox to open in a "pop up" it will look nicer because the browser controls will not be visible.  It makes it look like an application window rather than a browser window.
A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.

mrtrc266

#941
Quote from: xxxwindsor on March 23, 2009, 01:38:08 AM
Quote from: mrtrc266 on March 23, 2009, 12:50:38 AM
@ xxxwindsor  If I understand you correctly I believe that if you don't check the option to "open chat in pop up" that it will not open in a new window.
That's what I though and I have double checked to make sure it is not checked. Still launches new window though.

You can change this in your index.template.php

Find
empty($modSettings['chatPopUp']) ? 'target="_blank"' : '
Replace with
empty($modSettings['chatPopUp']) ? '"' : '

This will make the chat NOT open in a new window regardless of your settings.

I would recommend that you also do the Redirect the Logout edit otherwise when your users log out of the chat they will be taken to the chat loggin screen. You can follow the instructions HERE

Hope that's what you lookin for.


okchunter

Quote from: okchunter on March 22, 2009, 06:38:17 PM
Quick question is there a way to set it up so that when someone logs out it closes the pop up window?

Anyone have any idea on this? I know you can set it up so it goes back to the forum on the config file but is there a setting that will close the window all together when they click logout?

Mr_Lon

Is there a way to change the size of the PopUp window? I would like to make it a little larger.
Lon


jiminoregon

Quote from: mrtrc266 on March 23, 2009, 10:43:07 AM
Quote from: xxxwindsor on March 23, 2009, 01:38:08 AM
Quote from: mrtrc266 on March 23, 2009, 12:50:38 AM
@ xxxwindsor  If I understand you correctly I believe that if you don't check the option to "open chat in pop up" that it will not open in a new window.
That's what I though and I have double checked to make sure it is not checked. Still launches new window though.

You can change this in your index.template.php

Find
empty($modSettings['chatPopUp']) ? 'target="_blank"' : '
Replace with
empty($modSettings['chatPopUp']) ? '"' : '

This will make the chat NOT open in a new window regardless of your settings.

I would recommend that you also do the Redirect the Logout edit otherwise when your users log out of the chat they will be taken to the chat loggin screen. You can follow the instructions HERE

Hope that's what you lookin for.



mrtrc266,

I must be missing something...in smf 2.0 I can't find empty($modSettings['chatPopUp']) ? 'target="_blank"' : '
Quote from: mrtrc266 on March 23, 2009, 10:43:07 AM
Quote from: xxxwindsor on March 23, 2009, 01:38:08 AM
Quote from: mrtrc266 on March 23, 2009, 12:50:38 AM
@ xxxwindsor  If I understand you correctly I believe that if you don't check the option to "open chat in pop up" that it will not open in a new window.
That's what I though and I have double checked to make sure it is not checked. Still launches new window though.

You can change this in your index.template.php

Find
empty($modSettings['chatPopUp']) ? 'target="_blank"' : '
Replace with
empty($modSettings['chatPopUp']) ? '"' : '

This will make the chat NOT open in a new window regardless of your settings.

I would recommend that you also do the Redirect the Logout edit otherwise when your users log out of the chat they will be taken to the chat loggin screen. You can follow the instructions HERE

Hope that's what you lookin for.


Quote from: mrtrc266 on March 23, 2009, 10:43:07 AM
Quote from: xxxwindsor on March 23, 2009, 01:38:08 AM
Quote from: mrtrc266 on March 23, 2009, 12:50:38 AM
@ xxxwindsor  If I understand you correctly I believe that if you don't check the option to "open chat in pop up" that it will not open in a new window.
That's what I though and I have double checked to make sure it is not checked. Still launches new window though.

You can change this in your index.template.php

Find
empty($modSettings['chatPopUp']) ? 'target="_blank"' : '
Replace with
empty($modSettings['chatPopUp']) ? '"' : '

This will make the chat NOT open in a new window regardless of your settings.

I would recommend that you also do the Redirect the Logout edit otherwise when your users log out of the chat they will be taken to the chat loggin screen. You can follow the instructions HERE

Hope that's what you lookin for.



mrtrc266,

I must be missing something...in smf 2.0 I can't find "empty($modSettings['chatPopUp']) ? 'target="_blank"' : '"

The closest code is:

if ($modSettings['chatPopUp']){
         $context['menu_buttons']['chat']['href'] .= '" onclick="openWindow(this.href);this.blur();return false;';
         echo '
               <script type="text/javascript">
             function openWindow(url,width,height,options,name) {
                width = width ? width : 800;
               height = height ? height : 600;
              options = options ? options : \'resizable=yes\';
              name = name ? name : \'openWindow\';
              window.open(
                 url,
                 name,
                 \'screenX=\'+(screen.width-width)/2+\',screenY=\'+(screen.height-height)/2+\',width=\'+width+\',height=\'+height+\',\'+options
              )

Any ideas how to have this open in a seperate popup?

Thanks...Jim

mrtrc266

@ jiminoregon 

That was actually from a user the DID NOT want the chat to open in a new window.

Your request is
QuoteAny ideas how to have this open in a seperate popup?

To have it open in a Pop Up window for RC1 go to Admin/Configuration/Modifications/Chat and check "chat in popup page?"

jiminoregon

Quote from: mrtrc266 on March 24, 2009, 02:04:13 AM
@ jiminoregon 

That was actually from a user the DID NOT want the chat to open in a new window.

Your request is
QuoteAny ideas how to have this open in a seperate popup?

To have it open in a Pop Up window for RC1 go to Admin/Configuration/Modifications/Chat and check "chat in popup page?"


I did that...but if that setting is checked or unchecked it opens in a new window...hmmm something odd..Any ideas?

Thanks...BTW I saw your site...very nice...

mrtrc266

Ohhh so you DO NOT want it to open in a new window? Sorry bout that I got confused when you said "Any ideas how to have this open in a seperate popup?"

I have dug around on how to do that for RC1 but can't figure it out at the moment. I will keep trying but hopefully Hunter will have a solution when he gets back on.

Thanks for the comliment on the site :)

jiminoregon

Quote from: mrtrc266 on March 24, 2009, 02:27:37 AM
Ohhh so you DO NOT want it to open in a new window? Sorry bout that I got confused when you said "Any ideas how to have this open in a seperate popup?"

I have dug around on how to do that for RC1 but can't figure it out at the moment. I will keep trying but hopefully Hunter will have a solution when he gets back on.

Thanks for the comliment on the site :)


I want it to work just like your site...when you hit chat...a popup opens.  No matter if i check or uncheck "open in popup" it works the same...

Maybe I could use a monster mask...and scare the heck outta my installation...lol...

Jim

mrtrc266

LOL, what's the URL to your site? PM me if you don't want it public

Danpotter

please i want this in my urban theme

im usng smf 1.1.8 pls provide me the changes to be made in all theme modifyng stuff and all, other ways pls....

herohenson

mr mrtrc here's my site www.pinoygroundz.comuf.com my chat is not working., ill pm u a dummy account so you check whats wrong with my site., the chat and shoutbox is not working, sorry for my late reply.. im glad for your response about my problem..

reeldragon

Hello it works now but cam somebody say how to change de background color in the shoutbox? i want to make it black.

greetz bazzie

mrtrc266

#954
Quote from: Danpotter on March 24, 2009, 03:27:53 AM
please i want this in my urban theme

im usng smf 1.1.8 pls provide me the changes to be made in all theme modifyng stuff and all, other ways pls....

@ Danpotter please read this, it will explain how to get this going on your theme.
http://www.simplemachines.org/community/index.php?topic=257973.msg1981766#msg1981766

@herohenson
PM Sent

@ reeldragon
you can play with colors of the shoutbox in yourforum/chat/css/shoutbox.css
Find for the shoutbox background colors. Also there are many other settings as well, alternating posts background etc.
#ajaxChatContent {

mrtrc266

#955
Quote from: llinocoe on March 23, 2009, 09:47:41 PM


@ llinocoe
Try this....

Find yourforum/chat/lib/config.php
$config['contentType'] = null;
Replace with
$config['contentType'] = 'text/html';


jiminoregon

Quote from: mrtrc266 on March 24, 2009, 02:27:37 AM
Ohhh so you DO NOT want it to open in a new window? Sorry bout that I got confused when you said "Any ideas how to have this open in a seperate popup?"

I have dug around on how to do that for RC1 but can't figure it out at the moment. I will keep trying but hopefully Hunter will have a solution when he gets back on.

Thanks for the comliment on the site :)


No problem...I like the way yours works.  Push chat...and a popup window opens.  It's odd because checking the open in popup box doesn't seem to have an effect on my forum.  Hmmm...

One more question, if you don't mind.  Is there a way to change the location and size of the shoutbox?

Thx...Jim

mrtrc266

#957
@ jiminoregon

To change the size of the shoutbox open yourforum/chat/css/shoutbox.css and find then change to what you'd like. Leave the overflow to auto or else it won't scroll. You will have to refresh or clean your cache for the change to take effect.
#ajaxChatContent #ajaxChatChatList {
height:163px;
overflow:auto;
}



To change the location of the shoutbox open /yourforum/Themes/yourtheme/index.template.php and play around with the positioning of the code below. Of course make a backup before you begin.
//shoutBox
if (!empty($modSettings['enableShoutBox'])){
if (allowedTo('shout_access')){
// We'll have to use the cookie to remember the shoutBox header...
if ($context['user']['is_guest'])
$options['sb_collapsed'] = !empty($_COOKIE['sb_collapsed']);

echo '
<script language="JavaScript" type="text/javascript">
var sb_current_header = ', empty($options['sb_collapsed']) ? 'false' : 'true', ';

function ajax_shoutBox_collapse(mode)
{';

if ($context['user']['is_guest'])
echo '
document.cookie = "sb_collapsed=" + (mode ? 1 : 0);';
else
echo '
smf_setThemeOption("sb_collapsed", mode ? 1 : 0, null, "', $context['session_id'], '");';

echo '
document.getElementById("ajax_shoutbox_collapse").src = smf_images_url + (mode ? "/expand.gif" : "/collapse.gif");

document.getElementById("ShoutBox").style.display = mode ? "none" : "";

sb_current_header = mode;
}
</script>';

if (!empty($modSettings['anyPageShoutBox']) || isset($context['chat_isHome'])){
echo'
<div class="tborder" style="margin: 10px 0 10px 0;">
<div class="catbg" style="padding: 5px 15px 5px 10px;margin:0 auto;">
<a rel="nofollow" href="#" onclick="ajax_shoutBox_collapse(!sb_current_header)"><img id="ajax_shoutbox_collapse" src="', $settings['images_url'], empty($options['sb_collapsed']) ? '/collapse.gif' : '/expand.gif','" alt="*" style="margin-right: 5px;"  /></a>', $txt['shoutBox'], '
</div>
<div id="ShoutBox"', empty($options['sb_collapsed']) ? '' : ' style="display: none;"', '>
', getShoutBoxContent() ,'
</div>
</div>';
}
}
}

mrtrc266

#958
Quote from: Mr_Lon on March 23, 2009, 09:21:43 PM
Is there a way to change the size of the PopUp window? I would like to make it a little larger.
Lon

Try playing with this....

For SMF 1.1.8 and RC1
Find yourforum/Themes/yourtheme/index.template.php and change width and height to whatever you like

            function openWindow(url,width,height,options,name) {
                width = width ? width : 800;
                height = height ? height : 600;
                options = options ? options : \'resizable=yes\';


jiminoregon

Thanks for all the help...everything works fine except the chat won't open in a popout like on your site.  I see you use SMF1.1.8 and I'm using SMF 2 RC1.  Maybe there is something buggy about SMF 2 that isn't accepting that popout code.

If anyone's using SMF 2, and getting the popout chat window to work...let us know...

Jim

Advertisement: