Fork me on GitHub

How to open module in a new window?  Bottom

  • Hi,

    I currently use PostNuke for a community support forum, and webchat thanks to the ToChat module.

    However i'd like to be able to open the ToChat module in a new window so people can continue to surf the site whilst web-chatting.

    Any help / advice would be appreciated.

    Thanks

    c
  • If you are using straight up HTML commands, then you would open the item in a new window by placing this

    Quote

    "target="_blank
    at the end of your HTML command.

    If you are wanting to do this to a PostNuke module, then you would instead have a line similiar to this

    Quote

    index.php?module=modulename&func=main
    where the function may or may not be main, just have to see what the module needs, and then after main follow it with

    Quote

    "target="_blank
    .

    I am not familiar with the chat module you are using, but you may want to have a look at spchat as it will open up in a new window of its own and allow the user to still navigate through the site while chatting, at least it does for me.

    Hope this helps.
  • Thanks - SP Chat seems to do what i need.. but i'm still interested in getting my old chat system in new window.

    Thanks again.

    c
  • I'm trying to do the exact same thing, except I want the ToChat module to load without anything around it (so its like another IM window on the users monitor).

    Code

    <?php

    if (!defined("LOADED_AS_MODULE"))
    {
        die ("You can't access this file directly...");
        }

    $ModName = basename( dirname( __file__ ) );

    modules_get_language();

    include("header.php");
    include ("modules/ToChat/config.cfg");
       
        OpenTable();
    echo "<table border=\"0\" align=\"center\">\n";
    echo "<td><form name=\"jform\">\n";
    echo "<table border=\"0\">\n";
        if (!pnUserLoggedIn()) {
        echo "<font size=\"2\">"._TOCHATOFM." <a href=\"user.php?op=register&module=NS-NewUser\">"._TOCHATREN."</a>"._TOCHATAM." <a href=\"user.php?op=loginscreen&module=NS-User\">"._TOCHATLOGIN."</a>  -</b></td></font>\n";
        echo "</td></tr>\n";
        }
        else {
        $username = pnUserGetVar('uname');
        echo "<td align=\"center\">\n";

    echo "<applet code=\"IRCApplet.class\" archive=\"irc.jar,pixx.jar\" width=\"$width\" height=\"$height\" align=\"center\" codebase=\"$codebase\">\n";
    echo "<param name=\"CABINETS\" value=\"irc.cab,securedirc.cab,pixx.cab\">\n";

    echo "<param name=\"nick\" value=\"$username\" />\n";
    echo "<param name=\"alternatenick\" value=\"$username???\" />\n";
    echo "<param name=\"name\" value=\"$username "._TOCHATURL."\" />\n";
    echo "<param name=\"host\" value=\"$server\">\n";
    echo "<param name=\"port\" value=\"$port\" /-->\n";
    echo "<param name=\"gui\" value=\"pixx\" />\n";

    // Alternate servers list, This is experimental code beware.
    echo "<param name=\"alternateserver1\" value=\"$alternateserver1\" />\n";
    echo "<param name=\"alternateserver2\" value=\"$alternateserver2\" />\n";

    echo "<param name=\"quitmessage\" value=\"$QuitMessage\" />\n";
    echo "<param name=\"asl\" value=\"$asl\" />\n";
    echo "<param name=\"useinfo\" value=\"$useinfo\" />\n";
    echo "<param name=\"userid\" value=\"$userid\" />\n";
    echo "<param name=\"command1\" value=\"/join $channel\" />\n";
    echo "<param name=\"command2\" value=\"/nickserv identify $npassword\" />\n";
    echo "<param name=\"authorizedjoinlist\" value=\"$authorizedjoinlist\" />\n";
    echo "<param name=\"authorizedleavelist\" value=\"$authorizedleavelist\" />\n";

    echo "<param name=\"authorizedcommandlist\" value=\"$authorizedcommandlist\" />\n";

    echo "<!--param name=\"password\" value=\"$serverpass\" /--> \n";
    echo "<param name=\"autoconnection\" value=\"$autoconnection\" />\n";
    echo "<param name=\"language\" value=\"$language\" />\n";
    echo "<param name=\"soundbeep\" value=\"$soundbeep\" />\n";
    echo "<param name=\"soundquery\" value=\"$soundquery\" />\n";


    // Style configs smilicons and such
    echo "<param name=\"style:bitmapsmileys\" value=\"$smileys\" />\n";
    echo "<param name=\"style:smiley1\" value=\":) img/sourire.gif\" />\n";
    echo "<param name=\"style:smiley2\" value=\" <img src="http://community.zikula.org/images/smilies/icon_smile.gif" alt="icon_smile" />  img/sourire.gif\" />\n";
    echo "<param name=\"style:smiley3\" value=\" <img src="http://community.zikula.org/images/smilies/icon_biggrin.gif" alt="icon_biggrin" />  img/content.gif\" />\n";
    echo "<param name=\"style:smiley4\" value=\":d img/content.gif\" />\n";
    echo "<param name=\"style:smiley5\" value=\" <img src="http://community.zikula.org/images/smilies/icon_eek.gif" alt="icon_eek" />  img/OH-2.gif\" />\n";
    echo "<param name=\"style:smiley6\" value=\":o img/OH-1.gif\" />\n";
    echo "<param name=\"style:smiley7\" value=\" <img src="http://community.zikula.org/images/smilies/icon_razz.gif" alt="icon_razz" />  img/langue.gif\" />\n";
    echo "<param name=\"style:smiley8\" value=\":p img/langue.gif\" />\n";
    echo "<param name=\"style:smiley9\" value=\" <img src="http://community.zikula.org/images/smilies/icon_wink.gif" alt="icon_wink" />  img/clin-oeuil.gif\" />\n";
    echo "<param name=\"style:smiley10\" value=\";) img/clin-oeuil.gif\" />\n";
    echo "<param name=\"style:smiley11\" value=\" <img src="http://community.zikula.org/images/smilies/icon_frown.gif" alt="icon_frown" />  img/triste.gif\" />\n";
    echo "<param name=\"style:smiley12\" value=\":( img/triste.gif\" />\n";
    echo "<param name=\"style:smiley13\" value=\":-| img/OH-3.gif\" />\n";
    echo "<param name=\"style:smiley14\" value=\":| img/OH-3.gif\" />\n";
    echo "<param name=\"style:smiley15\" value=\":'( img/pleure.gif\" />\n";
    echo "<param name=\"style:smiley16\" value=\":$ img/rouge.gif\" />\n";
    echo "<param name=\"style:smiley17\" value=\":-$ img/rouge.gif\" />\n";
    echo "<param name=\"style:smiley18\" value=\"(H) img/cool.gif\" />\n";
    echo "<param name=\"style:smiley19\" value=\"(h) img/cool.gif\" />\n";
    echo "<param name=\"style:smiley20\" value=\":-@ img/enerve1.gif\" />\n";
    echo "<param name=\"style:smiley21\" value=\":@ img/enerve2.gif\" />\n";
    echo "<param name=\"style:smiley22\" value=\":-S img/roll-eyes.gif\" />\n";
    echo "<param name=\"style:smiley23\" value=\":s img/roll-eyes.gif\" />\n";

    echo "<param name=\"style:floatingasl\" value=\"$floatingasl\" />\n";
    echo "<param name=\"style:righttoleft\" value=\"$righttoleft\" />\n";

    echo "<param name=\"pixx:nicklistwidth\" value=\"$nicklistwidth\" \>\n";
    echo "<param name=\"pixx:highlight\" value=\"$highlight\" />\n";
    echo "<param name=\"pixx:highlightnick\" value=\"$highlightnick\" />\n";
    echo "<param name=\"pixx:timestamp\" value=\"$timestamp\" />\n";
    // Menu Buttons
    echo "<param name=\"pixx:showchanlist\" value=\"$showchanlist\" />\n";
    echo "<param name=\"pixx:showabout\" value=\"$showabout\" />\n";
    echo "<param name=\"pixx:showconnect\" value=\"$showconnect\" />\n";
    echo "<param name=\"pixx:showhelp\" value=\"$showhelp\" />\n";
    echo "<param name=\"pixx:helppage\" value=\"$helppage\" />\n";

    echo "<param name=\"pixx:nickfield\" value=\"$nickfield\" />\n";
    echo "<param name=\"pixx:showclose\" value=\"$showclose\" />\n";
    echo "<param name=\"pixx:showdock\" value=\"$showdock\" />\n";

    echo "<param name=\"pixx:styleselector\" value=\"$styleselector\" />\n";
    echo "<param name=\"pixx:setfontonstyle\" value=\"$setfontonstyle\" />\n";

    // Support for some color themage for PIXX GUI
    if ($theme!="default") {
    include ("$theme.theme");
    }

    echo "<h1>"._TOCHATCHATURL."</h1>\n";
    echo ""._TOCHATINFO."\n";
    echo "</applet></td></tr></table></form></td></table>\n";
    echo ""._TOCHATCOPY."\n";
        CloseTable();
    include("footer.php");
    }
    ?>

This list is based on users active over the last 60 minutes.