How to install Inmagic Webpublisher 12 on Windows 7

by Peter Tyrrell Wednesday, October 14, 2009 1:12 PM

Disclaimer: Not officially supported. Plunging heedlessly on...

1 - Back up INI files

First back up all your .ini files. Be sure you are getting the CORRECT copy of the ini file: the ini files in the Program Files directory are access-protected in Vista and Win7 because the Program Files area is a forbidden zone. You must open the ini file with elevated privileges, like with Notepad "run as administrator", and save it somewhere safe.

  • dbtwpub.ini
  • inmagic.ini
  • dbtext.ini

2 - Upgrade from previous version

If you want to upgrade from previous version of WPP instead installing a fresh copy, uninstall the previous version MANUALLY first, because the WPP 12 installer tries to uninstall without elevated permission, and thus fails.

3 - Run installer as admin

Run the WPP 12 installer with administrator privileges. If you have a setup.exe you can right-click to "run as administrator".

My preview version of the installer is an *.msi file only, which doesn't have a right-click "run as admin" option. Instead, I launch the msi with msiexec from an elevated command prompt:

  1. Search for "cmd.exe" from Windows Start Menu
  2. Right-click cmd.exe and "run as administrator"
  3. Change directory to location of the msi, e.g. cd c:\users\ptyrrell\downloads
  4. Run the msi with the msiexec /i option, e.g. msiexec /i "Inmagic DBText WebPublisher PRO.msi"

4 - Fulfill prerequisites

The installer is cleverer than previous versions when checking for prerequisites, so you'll probably have to go and install or enable various Windows features before continuing.

wpp12_prereqs 

IIS 6 Compatibility (IIS7 only) seems to be satisfied by enabling the "IIS Metabase and IIS 6 configuration compatibility" Windows feature.

wpp12_iis6

Be warned: if you don't run the installer with elevated privileges, you will continue to fail the prerequisite check even after installing/enabling the right prerequisites!

 

5 - Test the install

Restore your backed up ini files. Run a query on the sample cars textbase to ensure WPP is returning results as expected.

If you are installing on a 64 bit machine, you need to enable 32 bit applications on the relevant application pool as covered in this previous post called How to Install Webpublisher on 64-bit IIS 7.

6 - Be the star you know you are

You did it! Now cut out a cardboard star with safety scissors, pencil "STAR HACKER" on it, and get your mum to pin it to your chest, glitter optional. Salute yourself in the mirror. Star! Hacker!

Highlight search terms with jQuery

by Peter Tyrrell Thursday, September 03, 2009 12:04 PM

Overview

Highlight words and phrases within specified elements on the page. Search syntax is trimmed or eradicated, stopwords and words less than 3 characters  are ignored.

Ingredients

You will need:

   1:  
   2: /*
   3:     methods to help highlight search words and terms 
   4:     depends on jquery
   5:     Peter Tyrrell, August 2009
   6: */
   7:  
   8: // 
   9: var highlightTermsIn = function(jQueryElements, terms) {
  10:     var wrapper = ">$1<b style='font-weight:normal;color:#000;background-color:rgb(255,255,102)'>$2</b>$3<";
  11:     for (var i = 0; i < terms.length; i++) {
  12:         var regex = new RegExp(">([^<]*)?("+terms[i]+")([^>]*)?<","ig");
  13:         jQueryElements.each(function(i) {
  14:             $(this).html($(this).html().replace(regex, wrapper));
  15:         }); 
  16:     };
  17: }
  18:  
  19: // returns array of unique search terms (words, phrases) found in value        
  20: var parseSearchTerms = function(value) {
  21:     
  22:     // split string on spaces and respect double quoted phrases
  23:     var splitRegex = /(\u0022[^\u0022]*\u0022)|([^\u0022\s]+(\s|$))/g;
  24:     var rawTerms = value.match(splitRegex);
  25:     
  26:     var terms = [];            
  27:     for (var i = 0; i < rawTerms.length; i++) {
  28:         
  29:         // trim whitespace, quotes, apostrophes and query syntax special chars
  30:         var term = rawTerms[i].replace(/^[\s\u0022\u0027+-][\s\u0022\u0027+-]*/, '').replace(/[\s*~\u0022\u0027][\s*~\u0022\u0027]*$/, '').toLowerCase();
  31:         
  32:         // ignore if <= 2 chars
  33:         if (term.length <= 2) {
  34:             continue;
  35:         }
  36:         
  37:         // ignore stopwords
  38:         var stopwords = ["about","are","from","how","that","the","this","was","what","when","where","who","will","with","the"];
  39:         var isStopword = false;
  40:         for (var j = 0; j < stopwords.length; j++) {
  41:             if (term == stopwords[j]) {
  42:                 isStopword = true;
  43:                 break;
  44:             }
  45:         }
  46:         if (isStopword === true) {
  47:             continue;
  48:         }
  49:         
  50:         // add term to term list
  51:         terms[terms.length] = term;
  52:     }
  53:     return terms;
  54: }

Example 1

Pass an array of terms to be highlighted in jquery-selected elements:

   1: <script type="text/javascript">
   2:     $(document).ready(function() {
   3:         var searchTerms = ["banana", "monkey"];
   4:         // highlight valid terms in search results          
   5:         highlightTermsIn($("#HighlightWrapper"), searchTerms);        
   6:     });
   7: </script>

Example 2

Parse raw search input to strip out stopwords, query syntax characters, and wee short words less than 3 characters that do nobody any good. Quoted phrases are treated as a single term.

   1: <script type="text/javascript">
   2:     var rawSearch = "give the banana* to a monkey";
   3:     var termsToHighlight = parseSearchTerms(rawSearch);
   4:     // termsToHighlight now = ["give", "banana", "monkey"]
   5: </script>

Example 3

Put it all together to retrieve raw search input from the query string, parse out terms to highlight, and highlight within specified containers.

   1: <script type="text/javascript">
   2:     $(document).ready(function() {
   3:         // get quick search value from query string
   4:         var quickSearch = $.query.get("q");
   5:         // highlight valid terms in divs marked class="HighlightWrapper"        
   6:         highlightTermsIn($("div.HighlightWrapper"), parseSearchTerms(quickSearch));
   7:     });     
   8: </script>

Acknowledgements

 

Tags: javascript

What I have learned the hard way (as usual) with VMWare

by Peter Tyrrell Wednesday, May 27, 2009 11:41 AM

Always take snapshots when the guest is powered-down.

Although in VMWare Workstation you can take a snapshot at any time, you cannot clone a snapshot taken of a powered-on guest.

So for example, I patched a new Windows Server 2003 guest OS with dozens of Windows Updates, installed SQL Server, installed and configured SQL Server Reporting Services, etc. It took hours. I made snapshots at each phase, and indeed was able to revert back to one after screwing up royally. However, when I later went to clone the "all patches" snapshot to re-use the guest somewhere else, I was unable to do so because the guest had been on when I took the snapshot. I pulled out all my teeth in frustration and smashed them with a hammer, then began uninstalling everything after the patches.

Check the guest firewall settings if you have host-to-guest network problems

If you have double-checked that the virtual network settings are not to blame for an inability of the host to communicate with the guest, then ensure the guest firewall settings are not blocking incoming requests.

In my case the guest was using bridged networking and could ping the host and connect to the internet via the LAN gateway. The host could not ping the guest, the reason being that the guest firewall disallowed incoming echo requests by default. Further, since I wanted to use the guest as an http server, I needed to allow http requests at the firewall level. The agony preceding this discovery was akin to a hot knife stabbing repeatedly into my liver.

32 bit guests created on a 64 bit host can only be deployed on a 32 bit host if the deployed host hardware supports 64 bit processing

This one is counterintuitive. Just because it's a 32 bit guest doesn't mean it's going to run on a 32 bit host.

Newer machines tend to support 64 bit processing. Older ones don't. It's entirely possible that a host will be running a 32 bit OS but be 64 bit capable. How do you know? Download CPU-Z and it will examine the hardware and tell you. The VMWare CPU Identification Utility might also help, but I'm unclear as to whether it just checks for a 64 bit OS, or hardware 64 bit capability.

Tags:

The importance of beauty

by Peter Tyrrell Tuesday, April 21, 2009 10:55 AM

A fine article from the good people at A List Apart (the website for people who make websites). I always strive for aesthetically pleasing design in my work at Andornot. It just feels better when it looks good.

In Defense of Eye Candy
"Research proves attractive things work better. How we think cannot be separated from how we feel. The next time a boss, client, or co-worker scoffs at the notion that beauty is an important aspect of interface design, point their peepers here."

http://www.alistapart.com/articles/indefenseofeyecandy

 

Tags:

really truly private variables in javascript

by Peter Tyrrell Monday, March 09, 2009 9:09 AM

I just read, and then for good measure re-read, "JavaScript: The Good Parts" by Douglas Crockford, who is probably the foremost javascript authority on planet Earth. The book blew my mind. I thought I knew javascript; I thought I had a pretty good grasp of it; before I picked up this book I would have referred to myself as a javascript expert when introducing myself at parties. It turns out I had a lot more to think about. I find this delightful.

One of the valuable lessons I learned is a javascript module pattern, discussed with examples at the YUI (Yahoo! User Interface) blog: http://yuiblog.com/blog/2007/06/12/module-pattern/. The take home message is that you can create objects that support private members. I didn't even know that was possible, but it turns out that it is, due to function scope and the concept of closure. It took me a few reads with furrowed brow to grok closure, so I can hardly explain it quickly, but essentially:

  1. A function can return a function and then wink out of existence.
  2. The returned inner function retains access to other members and data defined in its original parent function.
  3. Those other members and data are not directly accessible anymore, so they are private.

Fantastic.

Tags: javascript

Month List