Novell Home

Enable/Disable the Chat Gadget in Virtual Office (Updated for Open Enterprise Server)

Novell Cool Solutions: Feature
By Daniel Shelley

Digg This - Slashdot This

Posted: 16 Mar 2005
 

Daniel Shelley is a Novell engineer on the Virtual Office Team.

Versions of Virtual Office released after NetWare 6.5 SP1 are shipped with the Chat gadget disabled, including the NLS and OES releases of Virtual Office. Earlier releases of Virtual Office shipped with the Chat gadget enabled.

If you just want to enable/disable this one feature, here is one way you could do it for all the teams at once with a small tweak to the XSL stylesheets. How you do this is slightly different for Virtual Office 1.5 and later, first released in OES.

Browse your file system and find the file, object_scheme.xsl. The path to this file is going to be slightly different depending on the version of Virtual Office and the platform it was released on.

  • For NetWare 6.5 through NetWare 6.5 sp3:
    tomcat\4\webapps\nps\portal\stylesheets\skins\virtualOffice\devices\default\object_scheme.xsl
  • For NLS:
    /var/opt/novell/iManager/nps/portal/stylesheets/skins/virtualOffice/devices/default/object_scheme.xsl)
  • For NetWare OES:
    tomcat\4\webapps\vo\portal\stylesheets\skins\virtualOffice\devices\default\object_scheme.xsl
  • For Linux OES:
    /var/opt/novell/tomcat4/webapps/vo/portal/stylesheets/skins/virtualOffice/devices/default/object_scheme.xsl
  • Open it for editing with something besides notepad.exe. DON'T USE NOTEPAD! Notepad will add "extra" stuff to the file which the xsl parser will choke on. You may want to back this file up before you do this - just in case.

    For VO 1.0 -- 1.3 do the following:

    Go down to lines 263-264 and make a small change.

    Here is the context in the file where you will make the change:

    <!-- Column 2 is built here. -->
    <td valign="top" width="250">
      <!--                                                          
      Since Column 3 does not exist in the
      two-column layout, we'll force all
      Gadgets that could have accidentally been
      assigned to Column 3 to show up at the
      bottom of Column 2.
    -->
      <table border="0" cellpadding="0" cellspacing="0" width="100%">
        <!-- Disallow Chat Gadget display -->
        <xsl:for-each select="Gadget[@position!='Column 1' and starts-with(@position,'Column') and @title!='Chat']">
          <xsl:sort order="ascending" select="@position"/>
          <xsl:sort data-type="number" order="ascending" select="@priority"/>
          <xsl:sort order="ascending" select="@title"/>
          <tr>
            <td>
                <xsl:call-template name="Portal.Gadget"/>
            </td>
          </tr>
          <!-- Spacer Row (EMPTY) -->
          <tr>
             <td height="10">
                 <img alt="" height="10" src="{$Portal.ResourcePath}/stylesheets/skins/{$Portal.Stylesheet.Name}/images/cp.gif"/>
             </td>
          </tr>
        </xsl:for-each>
      </table>
    </td>

    Find the line that processes each of the gadgets assigned to Column 2.

    Disable the Chat Gadget -- replace with these two lines.

    <!-- Disallow Chat Gadget display -->
    <xsl:for-each select="Gadget[@position!='Column 1' and starts-with(@position,'Column') and @title!='Chat']">

    Enable the Chat Gadget -- replace with these two lines.

    <!-- Allow Chat Gadget display -->
    <xsl:for-each select="Gadget[@position!='Column 1' and starts-with(@position,'Column')]">

    Save this file. All you need to do now is refresh the VO system. All xsl files are cached in memory for speed, so you can either restart tomcat or go into iManager, select the configuration view, select the iManager Configuration Snapin, select the Portal task, and then click on the Refresh Portal Link. You want to refresh the "Stylesheets for backend rendering."

    For VO 1.5+ do the following:

    By default VO 1.5 has the chat gadget off. To turn it on, go down to line 270. You will find the following piece of code that prevents the chat gadget from showing up.

    <!-- *********** Disallow Chat Gadget display ************** -->
    <xsl:if test="CustomConfig/Setting/Value != '/stylesheets/skins/virtualOffice/images/chat_user.gif'">                                            	<tr>
    		<td>
    			<xsl:call-template name="Portal.Gadget"/>
    		</td>
    	</tr>
    	<!-- Spacer Row (EMPTY) -->
    	<tr>
    		<td height="10">
    			<img alt="" height="10" src="{$Portal.ResourcePath}/stylesheets/skins/{$Portal.Stylesheet.Name}/images/cp.gif"/>
    		</td>
    	</tr>
    </xsl:if>
    

    Comment out line 271 which starts with ?<xsl:if? and line 283, ?</xsl:if>?, leaving the lines between them. To comment out the lines, surround the text with <!-- --> like you would in a standard html file.

    Save this file. All you need to do now is refresh the VO system. All xsl files are cached in memory for speed, so you can either restart tomcat or log in to VO as an administrator, select the Portal Administration link, and then click on the Refresh Portal link. You want to refresh the "Stylesheets for backend rendering."


    Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com

    © 2014 Novell