wiki:ice_messaging

Version 4 (modified by Nick Holden, 12 years ago) ( diff )

--

The ice_messaging drupal module is used to access the MS SQL database containing the received ICE messages.

Some of the drupal 7 documentation still refers to the old syntax for database queries, even while demonstrating the drupal database abstraction layer. The best and most consistent documentation for building database queries is http://drupal.org/node/310075

ice_messaging uses the datatables module to provide fancy presentation. The datatables modules requires manual installation of the DataTables jQuery plugin, and this is very fussy about directory names. Just be careful.

Within drupal, switching to the alternative database is done using:

  db_set_active('YourDatabaseKey');

  // execute queries here

  db_set_active(); // without the paramater means set back to the default for the site

This assumes the YourDatabaseKey connection has been defined in /sites/default/settings.php

The sqlsrv project provides a SQL server driver, but it only works on Windows servers. There's a fork of sqlsrv which uses dblib to work on linux: http://drupal.org/sandbox/rgeorgy/1775970

To run that, we need to 'sudo apt-get install php5-sybase git' then 'git clone http://git.drupal.org/sandbox/rgeorgy/1775970.git dblib_driver_for_sql_server'

Then 'sudo drush dl datatables'. Then do the manual installation of DataTables jQuery plugin, rename the intermediate directory to 'dataTables' and then 'sudo drush en datatables'. That will enable the necessary additional prerequisites.

Then enable the dblib module and set up a link from /includes/database/dblib to the module's dblib directory.

Finally, enable the ice_messaging module. After that, everything should work.

Attachments (1)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.