Custom Queries and Results (CQR)

With minor changes, dmBridge is compatible with CQR generated by the CONTENTdm® CQR generator. The CQR generator returns code pointing to /cdm4/browse.php; this needs to be changed to /dm/objects/ (or wherever your templates are located) to work with dmBridge.

A custom query consists of the URL of a PHP script (/cdm4/results.php) followed by a series of "key-value pairs." Below is a custom query with key-value pairs split apart onto their own lines for readability:

/cdm4/results.php
?CISORESTMP=/cdm4/results.php
&CISOVIEWTMP=/cdm4/item_viewer.php
&CISOMODE=thumb
&CISOGRID=thumbnail,A,1;title,A,1;note,A,0...
&CISOBIB=title,A,1,N;note,A,0,N;creato,200...
&CISOTHUMB=20%20%284x5%29;title,none...
&CISOHIERA=20;creato,title,none,none,none
&CISOTYPE=link
&CISOOP1=exact
&CISOFIELD1=local
&CISOBOX1=vinas
&CISOOP2=exact
&CISOFIELD2=creato
&CISOBOX2=
&CISOOP3=exact
&CISOFIELD3=origin
&CISOBOX3=
&CISOOP4=exact
&CISOFIELD4=CISOSEARCHALL
&CISOBOX4=
&c=exact
&CISOROOT=/showgirls

There are quite a few key-value pairs here. dmBridge needs only the ones that begin with CISOOP, CISOFIELD, CISOBOX, and CISOROOT (which mean matching mode, field, search string, and collection alias, respectively). As far as dmBridge is concerned, it's safe to delete the rest, or keep them - it doesn't matter. The above CONTENTdm® CQR converted to dmBridge format would look like:

/dm/objects/
?CISOOP1=exact
&CISOFIELD1=local
&CISOBOX1=vinas
&CISOROOT=/showgirls

As you can see, we have dropped anything not starting with CISOOP, CISOFIELD, CISOBOX, or CISOROOT. We have also dropped CISOOP 2 through 4, CISOFIELD 2 through 4, and CISOBOX 2 through 4, because they were empty. (If the CISOOP of a particular number is empty, it and the corresponding CISOFIELD and CISOBOX can be dropped.)

  • CISOBOX is a search string
  • CISOOP is a field matching mode (all, any, none, exact)
  • CISOFIELD is a field nickname
  • CISOROOT is a collection alias