Tuesday, March 19, 2013

Hiding the secondary menu on a single page in Drupal

If you want to hide the secondary menu on a single page in Drupal, this doesn't seem to be possible through the Administration web interface. You can disable all Secondary menus on your website, through the Appearance settings of your team (Appearance -> Settings -> name of your theme), but this is not what we are trying to achieve here.

You can disable the secondary menu on a single page however, by adding a few lines of code to your CSS files. Before you start editing your CSS files, you need to uniquely identify the page on which you want to hide the secondary menu. Drupal by default generates a unique ID for each page as a class ID of the body element in the format "page-<NAME>". You can lookup this value by using the Developer Tools of your browser and checking the class attribute of the body HTML element.



Then add the following lines of code to your CSS file:

.page-<NAME> #submenu{
 display:none;
}

The secondary menu section on a Drupal page is identified with the "submenu" id. The display:none property hides an element, and it will not take up any space. So this code snippet in your CSS file will avoid that the submenu is displayed on the page identified by string value after the "." class selector.

Author: Kristof Lievens

Tuesday, March 12, 2013

Central Administration of TIBCO Enterprise Message Service (EMS)

In the summer of 2012, Tibco launched a new version of its messaging bus called Enterprise Message Service (EMS). TIBCO Enterprise Message Service lets applications consume or publish messages according to the Java Message Service (JMS) API.

One of the new features, is the ability to perform central administration through a standard web browser. In the past you mainly had 3 options to ‘control’ your EMS server:
  • The command line utility tibemsadmin
  • The EMS plugin of Tibco Administrator
  • A tool, like Gems or Hermes, created by a third-party

The Central Administration feature, installed automatically with EMS 7.0, offers you:
  • A web-based graphical user interface for configuring TIBCO EMS servers
  • Centralized configuration, allowing administrators to apply configuration changes across multiple TIBCO Enterprise Message Service servers from a single location
  • Support on Windows, Linux, and Mac platforms

How to get the central administration running on your machine.

After the installation of version 7 of Tibco Enterprise Message Service you need to convert the ’old style’ tibemsd.conf to a JSON (JavaScript Object Notation) file. The text-based tibemsd.conf file is not compliant with the Central Configuration feature and EMS servers started with a tibemsd.conf file cannot be managed using the Central Administration server.

Command: tibemsconf2json.bat -conf source-file.conf -json output-file.json


Note: when ems is configured as windows service, you need to tweak the registry key to change the startup parameter tibemsd.conf to tibemsd.json (HKEY_LOCAL_MACHINE\SYSTEM\ControlSet00X\services\tibemsd\Parameters)

Once converted, you can start your EMS server but now using the json configuration file.

Creating a configuration file

Although not mandatory, you can configure the server using a properties file to hold Central Administration server options.  Example:
com.tibco.emsca.data.dir=c:/tibcoems7/tibco/cfgmgmt/emsca_data
com.tibco.emsca.http.hostport=*:8080

I’ve saved mine as emsca.properties in the EMS_HOME/bin location.

Start the central administration server with the command tibemsca.bat (or tibemsca.sh). By default the server will look for a file called emsca.properties in the current working directory.


By default, the Central Administration server does not automatically configure an SSL connection or requires users to pass login credentials. The Central Administration server uses the same username and password to log into the EMS server as was used to log in to the Central Administration web interface. But as said by default there is no login and so it uses user ‘admin’ with no password.  You’ll have to configure JAAS authentication to make it work with a password. (I’ll leave some room for a next blog post).

Default screen after installation

When typing  a name (e.g. local_ems_instance) without spaces, clicking on create, and passing a url of your EMS server (e.g.  tcp://localhost:7222) you are good to go!


Configuring your EMS server using the web portal.

Author: Günther