Changeset 2953

Show
Ignore:
Timestamp:
11/04/06 01:42:27 (7 years ago)
Author:
qldrob
Message:

Add pop-out support for IRC client.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/branches/2.2/irc/module.xml

    r2773 r2953  
    22  <rawname>irc</rawname> 
    33  <name>Online Support</name> 
    4   <version>1.0.3</version> 
     4  <version>1.1</version> 
    55  <type>tool</type> 
    66  <category>Support</category> 
     7  <description>This module lets you connect to the IRC network where developers and other users chat. You can chat to the developers live, if you have problems</description> 
     8  <changelog>*1.1* First release for 2.2, changed the window so it pops-out of the normal web page</changelog> 
    79  <menuitems> 
    810    <irc>Online Support</irc> 
  • modules/branches/2.2/irc/page.irc.php

    r2872 r2953  
    9090  nick = prompt("What nickname would you like to use? If you leave this blank, a nick will be automatically generated for you.", nick); 
    9191  if ((nick == null) || (nick == '')) { 
     92    win = window.open("config.php?type=tool&display=<?php echo urlencode($display)?>&action=startreal&quietmode=yes", "IRC Support", "width=660, height=480, location=no, menubar=no, status=no, toolbar=no, scrollbars=no"); 
     93    win.resizeTo(660, 480); 
     94    win.focus(); 
    9295    return true; 
    9396  } else { 
     
    9699    setCookie('ircnick', nick, expiry); 
    97100    element.href += '&nick='+nick; 
     101    win = window.open("config.php?type=tool&display=<?php echo urlencode($display)?>&action=startreal&quietmode=yes&nick="+nick, "IRC Support", "width=660, height=480, location=no, menubar=no, status=no, toolbar=no, scrollbars=no"); 
     102    win.resizeTo(660, 480); 
     103    win.focus(); 
    98104    return true; 
    99105  } 
     
    107113  $nick = ''; 
    108114} 
     115 
     116// Supress all this when the IRC window pops out. 
     117if (!$quietmode) { 
    109118?> 
    110119 
     
    121130 
    122131<?php 
     132} // End header supression 
    123133switch ($action) { 
    124134  case "start": 
    125135?> 
    126  
    127136<p> 
    128137<?php  
    129138if (empty($nick)) echo _("When you connect, you will be automatically be named 'FreePBX' and a random 4 digit number, eg, FreePBX3486."); 
    130139echo _("If you wish to change this to your normal nickname, you can type '<b>/nick yournickname</b>', and your nick will change. This is an ENGLISH ONLY support channel. Sorry."); 
     140 
     141  break; 
     142  case "startreal": 
    131143?> 
    132144</p> 
     
    169181<?php echo _("This allows you to contact the FreePBX channel on IRC."); ?> 
    170182 
    171 <?php echo _("Note that when you click anywhere else, you will close your IRC session."); ?> 
    172  
    173 <?php echo _("It's suggested to use <b>'Open Link in New Window'</b> or <b>'Open Link In New Tab'</b> with Mozilla or Firefox."); ?> 
    174  
    175183<?php echo _("As IRC is an un-moderated international medium, AMP, FreePBX, Coalescent Systems, or any other party can not be held responsible for the actions or behaviour of other people on the network"); ?> 
    176184 
     
    183191<li> <?php echo _("Your FreePBX version:"); 
    184192           $ver=getversion(); 
    185            echo " (".$ver[0][0].")"; ?> 
     193           echo " (".$ver.")"; ?> 
    186194<li> <?php echo _("Your Kernel version:"); 
    187195           $ver=exec('uname -a');