Customization 101 - Digital Collections as University of Nevada, Reno

advertisement
CONTENTdm
Customization 101
Glee Willis
Digital Projects Librarian
University of Nevada, Reno
CONTENTdm
Customization 101
By way of intro, our collections “start” page at UNR is at
http://contentdm.library.unr.edu and looks like this:
We’ll focus
on our Images
Of Lake Tahoe
Collection right
now:
CONTENTdm
Customization 101
A typical collection “portal” at UNR looks like this:
CONTENTdm
Customization 101
Basic topics to be covered:
Customizing Display Views
 Editing Web Template Files
 Creating Custom Queries and Results

Customizing Display Views
Grid view
Thumbnail view
Note: Two other views: “bibliographic view” and “hierarchichal view” but
they aren’t used very often.
Customizing Display Views
Caveat!!
 IMPORTANT: Customizing the display view does NOT
guarantee that this view is what the end user sees because s/he has
control over the display view via the “preferences” user controls
 ALSO: The default display view can be overwritten by a
predefined query created using the “Custom Queries and Results”
(CQR) tool …
 AND: The end user’s “view” preferences even overwrite the
view that is configured in a predefined query!
“View” option
Preferences screen
Customizing Display Views
Overview
 Default display view is “grid”
 You have control over the fields displayed in “grid”, but out-of-the box,
they are: Thumbnail, Title, Subject, and Description
 The variable in CONTENTdm’s PHP code for customizing the display
view is called CISOMODE and it occurs in both the browse.php and
results.php files
Editing Web Template Files
Default header
Header
examples
from our
collections
Editing Web Template Files
Frequently customized web template files:
Global style file (STY_global_style.php)
 to change background color
 caption font type and color
 layout of the collection pages
Note: If a collection has been customized by the creation of its own
“style” file, CONTENTdm will invoke it.
For example: STY_nevagpub_style.php
Header file
 to make changes in the header on all or specific web template pages
Footer file
 to make changes in the footer on all or specific web template pages
Localization files
 to change navigational, button, and message text
Editing Web Template Files
Anatomy of a CONTENTdm header display – pt.1
nevagpub_menu.php
nevagpub_header.php
Each link in the [collection-name]_menu.php file is configurable.
Examples:
the code for the home link (above) is:
<a class="genmenu" href=“nvagpubsabout.html"><?=L_HOME?></a>
the code for the browse link (above) is:
<a class="genmenu" href=“http://tinyurl.com/2gq66f”> <?=L_BROWSE?></a>
Editing Web Template Files
Anatomy of a CONTENTdm header display – pt.2
nevagpub_menu.php
nevagpub_header.php
Default (out-of-the-box) code in [collection-name]_header.php:
<td rowspan="2" nowrap="nowrap"><img src="<?=$dmdir?>images/logo64.gif"
width="64" height="64" alt="<?=L_COMPANY_LOGO?>"
TITLE="<?=L_COMPANY_LOGO?>" /><img src="<?=$dmdir?>images/spacer.gif"
width="5" height="1" border="0" alt="" /></td>
Customized replacement code with local “header” graphic file:
<tr><td><img src="/cdm4/images/header_nvagpubs_brn.jpg"></td></tr>
Editing Web Template Files
Variables in the “style” file control the look of the web templates.
My handy-dandy web template customization diagram:
Editing Web Template Files
Examples of commonly customized variables in the “style” file:
define("S_COPYRIGHT_COLOR", "#0f0600"); // #99a99a: copyright font color
define("S_GENMENU_BG", "#0F0600"); // #99a99a: top menu background color
define("S_GENMENU_COLOR", "#F7EBD1"); // #404040: top menu font color
define("S_HEADER_BG", "#EFDAAF"); // #3e647e: header background color
define("S_HEADER_COLOR", "#cdd3cd"); // #cdd3cd: header text color
define("S_LINK_COLOR", "#990000"); // #448ccb: link color
define("S_LINK_HOVER_COLOR", "#977834"); // #990000: link hover color
Editing Web Template Files
The Localization files contain variables that control the text that
appears on buttons, forms, and pages throughout the web templates.
Navigational and function wording:
LOC_document.php within the compound object viewer
LOC_favorites.php
within My Favorites, Slideshow, and Compare views
LOC_global.php
for terms uses in all pages (ex: email address + company name)
LOC_preferences.php within My Preferences
LOC_results.php
within Browse and Results pages
LOC_search.php
within Search pages
LOC_viewer.php
within the Item viewer
Example from LOC_global.php file:
Default text = “my favorites”
Variable name = L_MY_FAVORITES
UNR’s text = “my saved items”
Creating Custom Queries and Results
The custom queries and results (CQR) wizard is used to generate
HTML code that can be pasted into web pages that include suggested
searches of your collections
Example of a drop-down list created via the CQR wizard
Creating Custom Queries and Results
Anyone can use the CQR wizard to generating HTML code for
pre-defined queries against anyone’s CONTENTdm collections.
You just need to know the name of the CONTENTdm server.
Our CQR wizard is at:
http://contentdm.library.unr.edu/cdm4/cqr/cqr1.php
The CQR wizard looks like this:
Creating Custom Queries and Results
Types of query elements:
 simple hyperlink – creates a hyperlink to specify a single query
(NOTE: not to be confused with a reference URL, which is the
unique identifier for a CONTENTdm record)
 drop-down list – defines a drop-down list to specify multiple
options from which the user can select a query
 index box – specifies a field from which to generate a
non-dynamicly-generated list of search terms
 (custom) browse – define a browse page of records in a
non-default order, such as chronological order
default parameters for a browse or results display
Creating Custom Queries and Results
 Pre-defined queries can be created for searches of a single
collection or across multiple or all collections
Let’s walk through using the CQR wizard to create a predefined
query across all of our collections
Select the “search across
all collections” option
Creating Custom Queries and Results
 For this predefined query, we want to create a phrase search
across all fields for “virginia street”
 And we click on preview to make sure the results match our
expectations
Creating Custom Queries and Results
 Checking the preview screen:
Then close the preview window, and click on the next button
at the bottom of the CQR wizard window
Creating Custom Queries and Results
 Now, you need to configure a few more things before your
HTML code is ready to be embedded in a web page
 Insert your server name before the first forward slash in
the first box (so, in my case, I’d type in: http://contentdm.library.unr.edu)
Creating Custom Queries and Results
 We almost always select thumbnails for our results display
 Again, click on the next button at the bottom of the CQR
wizard window
Creating Custom Queries and Results
 Now copy the HTML code that the CQR wizard has created
on your behalf onto the target web page for predefined queries
It’s definitely
NOT the
prettiest code
in the world !
<a href="http://contentdm.library.unr.edu/cdm4/results.php?
CISORESTMP=results.php&CISOVIEWTMP=item_viewer.php
&CISOMODE=thumb&CISOGRID=
thumbnail,A,1;title,A,1;subjec,A,0;descri,200,0;none,A,0;20;
relevancy,none,none,none,none&CISOBIB=title,A,1,N;subjec,A,0,N;
descri,200,0,N;none,A,0,N;none,A,0,N;20;relevancy,none,none,none,none
&CISOTHUMB=20%20(4x5);relevancy,none,none,none,none
&CISOTITLE=20;title,none,none,none,none&CISOHIERA=20;
subjec,title,none,none,none&CISOSUPPRESS=0&CISOTYPE=link
&CISOOP1=exact&CISOFIELD1=title&CISOBOX1=virginia+street
&CISOOP2=exact&CISOFIELD2=subjec&CISOBOX2=&CISOOP3=exact
&CISOFIELD3=descri&CISOBOX3=&CISOOP4=exact
&CISOFIELD4=CISOSEARCHALL&CISOBOX4=
&c=exact&CISOROOT=all">query name</a>
Creating Custom Queries and Results
 The dropdown code that includes our “picnics” search looks like this:
<tr>
<td class="nav"><b>Select a Topic:</b><br />
<input type="hidden" name="CISOOP1" value="any" />
<input type="hidden" name="CISOROOT" value="/tahoe" />
<input type="hidden" name="CISORESTMP" value="/cdm4/results.php" />
<input type="hidden" name="CISOVIEWTMP" value="/cdm4/item_viewer.php" />
<input type="hidden" name="CISOMODE" value="thumb" />
<input type="hidden" name="CISOGRID" value="thumbnail,A,1;title,A,1;subjec,A,0;descri,200,0;0,A,0;10" />
<input type="hidden" name="CISOBIB" value="title,A,1,N;subjec,A,0,N;descri,K,0,N;0,A,0,N;0,A,0,N;10" />
<input type="hidden" name="CISOTHUMB" value="20 (4x5);title,none,none,none,none" />
<select name="CISOPARM">
<option value="/tahoe :CISOSEARCHALL:aerial">Aerial views</option>
<option value="/tahoe :subjec:beaches">Beaches</option>
<option value="/tahoe :CISOSEARCHALL:steamers steamboat boat">Boats and steamers</option>
<option value="/tahoe :subjec:casinos">Casinos</option>
<option value="/tahoe :CISOSEARCHALL:fish fishing">Fishing</option>
<option value="/tahoe :CISOSEARCHALL:golf">Golf</option>
<option value="/tahoe :subjec:picnics">Picnics</option>
<option value="/tahoe :descri:postcard">Postcards</option>
<option value="/tahoe :CISOSEARCHALL:class">Summer diary</option>
<option value="/tahoe :subjec:Washo">Washoe Indians</option>
<option value="/tahoe :CISOSEARCHALL:levels">Water level surveys</option>
<option value="/tahoe :CISOSEARCHALL:falls">Waterfalls</option>
</select>  </td>
<td class="nav" valign="bottom">
<input type="image" src="images/go.gif" border="0" name="submit" width="24" height="24" /></td>
</tr>
Creating Custom Queries and Results
 Note: We use “plain English” for the names of the topics
<option value="/tahoe :CISOSEARCHALL:aerial">Aerial views</option>
<option value="/tahoe :subjec:beaches">Beaches</option>
<option value="/tahoe :CISOSEARCHALL:steamers steamboat boat">Boats and steamers</option>
<option value="/tahoe :subjec:casinos">Casinos</option>
<option value="/tahoe :CISOSEARCHALL:fish fishing">Fishing</option>
<option value="/tahoe :CISOSEARCHALL:golf">Golf</option>
<option value="/tahoe :subjec:picnics">Picnics</option>
<option value="/tahoe :descri:postcard">Postcards</option>
<option value="/tahoe :CISOSEARCHALL:class">Summer diary</option>
<option value="/tahoe :subjec:Washo">Washoe Indians</option>
<option value="/tahoe :CISOSEARCHALL:levels">Water level surveys</option>
<option value="/tahoe :subjec:waterfalls">Waterfalls</option>
CONTENTdm
Customization 101
Contact information:
Glee Willis
Digital Projects Librarian
University of Nevada, Reno
775-682-5641
willis@unr.edu
Download