WordPress.org

Ready to get started?Download WordPress

Forums

Buddypress-Ajax-Chat
Having problem to open the chat in new window (12 posts)

  1. hozefasmile2007
    Member
    Posted 3 years ago #

    Hi I am using wordpress 3.0.1 MU intallation.
    I am using a custom theme for my website. It is working well in my site but when I go to Buddypres - chat settings and select the option yes for "Full blown chat open in new window" and test the site, I found that nothing is showing on the site and the theme sidebar also get displaced. I want to open the chat page on separate window. Which file will have the settings for this to make it happen? I am using Mozilla firefox as a browser. Please help me with this issue

  2. Dfa327
    Member
    Posted 3 years ago #

    Are there any errors in the Firefox error console?

  3. common8308
    Member
    Posted 3 years ago #

    I'm having the exactly same error that the OP experienced. I'm using Chrome and WP 3.1.2 + BP 1.2.8.

  4. Dfa327
    Member
    Posted 3 years ago #

    Did you check the chrome error console?

    99% of the time it is due to a rogue javascript error that has nothing to do with the chat plugin. Please check that.

  5. common8308
    Member
    Posted 3 years ago #

    I tried firefox error console and it shows this error in the chat page.

    document.getElementById("buddypress_ajax_chat_ad_frame") is null.
    http://mysiteURL/wp-content/plugins/buddypress-ajax-chat/bp-chat/chat/index.php?channel=Public

    WHen I click the link I see this part is highlighted.
    document.getElementById("buddypress_ajax_chat_ad_frame").src = url;

    Nothing further error is found yet.

  6. Dfa327
    Member
    Posted 3 years ago #

    That helped a million!!! Thanks:) I just uploaded a fix for it. Thanks again:)

  7. common8308
    Member
    Posted 3 years ago #

    Thanks for the fast update, Dfa327. I really appreciate your hard work.
    But it still has the exactly same problem the op experienced without any script error.

  8. common8308
    Member
    Posted 3 years ago #

    One more update about this.

    Tested with:
    Freshly installed WP 3.1.2 + BP 1.2.8 + Buddypress-ajax-chat 1.4.2
    No plugin except for buddypress is installed and basic BP theme is used.

    The same problem occurs.

  9. Dfa327
    Member
    Posted 3 years ago #

    That's interesting as I just did a fresh install of wp, bp and the chat plugin and no errors at all.

    Perhaps you have a caching problem enabled and are still looking at old files?

  10. common8308
    Member
    Posted 3 years ago #

    I looked into the code and found the error $forumName variable is not used properly..

    In the /wp-contents/plugins/buddypress-ajax-chat/bp-chat.php

    It worked when I replaced line 341-342

    echo __('<p>Notice a popup window will try to appear.<br />  If you are using I.E. you might need to hold down the CTRL key when clicking on chat to allow the popup screen to appear.</p><p>If all else fails you can <a target=\'_new\' href="', 'bp-chat'); echo get_bloginfo('wpurl') . "/wp-content/plugins/buddypress-ajax-chat/bp-chat/chat/index.php?channel=$forumName"; echo __('> click here</a> for a new chat window.', 'bp-chat');
                echo "<script>window.open('" . get_bloginfo('wpurl') . "/wp-content/plugins/buddypress-ajax-chat/bp-chat/chat/index.php?channel=$forumName" . "', 'BuddypressAjaxChat', 'menubar=no,resizable=no,status=no,toolbar=no,location=no,directories=no,height=600,width=700');</script>";

    to this,

    echo "<p>Notice a popup window will try to appear.<br />  If you are using I.E. you might need to hold down the CTRL key when clicking on chat to allow the popup screen to appear.</p><p>If all else fails you can <a target='_new' href=" . get_bloginfo('wpurl') . "/wp-content/plugins/buddypress-ajax-chat/bp-chat/chat/index.php?channel=".$forumName."> click here</a> for a new chat window.";
                echo "<script>window.open('" . get_bloginfo('wpurl') . "/wp-content/plugins/buddypress-ajax-chat/bp-chat/chat/index.php?channel=".$forumName."', 'BuddypressAjaxChat', 'menubar=no,resizable=no,status=no,toolbar=no,location=no,directories=no,height=600,width=700');</script>";
  11. Dfa327
    Member
    Posted 3 years ago #

    I don't think the problem is with the $forumName, but using __ syntax on a changing variable. I can see that not matching in the language files.

    I'll make an update and remove the __ syntax. That should solve it.

    Thanks:)

  12. Dfa327
    Member
    Posted 3 years ago #

    Hi Again,

    I found the issue. It was missing an ending quote! I made the fix and uploaded 1.4.3. Thanks for your help with this.

    Thanks,
    Dave:)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic