26
CONTENTdm CONTENTdm Customization 101 Customization 101 Glee Willis Glee Willis Digital Projects Librarian Digital Projects Librarian University of Nevada, Reno University of Nevada, Reno

CONTENTdm Customization 101 Glee Willis Digital Projects Librarian University of Nevada, Reno

Embed Size (px)

Citation preview

Page 1: CONTENTdm Customization 101 Glee Willis Digital Projects Librarian University of Nevada, Reno

CONTENTdmCONTENTdm

Customization 101Customization 101

Glee WillisGlee WillisDigital Projects LibrarianDigital Projects Librarian

University of Nevada, RenoUniversity of Nevada, Reno

Page 2: CONTENTdm Customization 101 Glee Willis Digital Projects Librarian University of Nevada, Reno

CONTENTdmCONTENTdm

Customization 101Customization 101By way of intro, our collections “start” page at UNR is athttp://contentdm.library.unr.edu and looks like this:

We’ll focuson our ImagesOf Lake TahoeCollection right now:

Page 3: CONTENTdm Customization 101 Glee Willis Digital Projects Librarian University of Nevada, Reno

CONTENTdmCONTENTdm

Customization 101Customization 101

A typical collection “portal” at UNR looks like this:

Page 4: CONTENTdm Customization 101 Glee Willis Digital Projects Librarian University of Nevada, Reno

CONTENTdmCONTENTdm

Customization 101Customization 101

Customizing Display Views Editing Web Template Files Creating Custom Queries and Results

Basic topics to be covered:

Page 5: CONTENTdm Customization 101 Glee Willis Digital Projects Librarian University of Nevada, Reno

Grid view

Thumbnail view

Note: Two other views: “bibliographic view” and “hierarchichal view” butthey aren’t used very often.

Customizing Display Views

Page 6: CONTENTdm Customization 101 Glee Willis Digital Projects Librarian University of Nevada, Reno

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!

Preferences screen

“View” option

Customizing Display Views

Page 7: CONTENTdm Customization 101 Glee Willis Digital Projects Librarian University of Nevada, Reno

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

Customizing Display Views

Page 8: CONTENTdm Customization 101 Glee Willis Digital Projects Librarian University of Nevada, Reno

Editing Web Template FilesEditing Web Template FilesDefault header

Headerexamplesfrom our collections

Page 9: CONTENTdm Customization 101 Glee Willis Digital Projects Librarian University of Nevada, Reno

Editing Web Template FilesEditing Web Template FilesFrequently 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

Page 10: CONTENTdm Customization 101 Glee Willis Digital Projects Librarian University of Nevada, Reno

Editing Web Template FilesEditing Web Template FilesAnatomy of a CONTENT dm header display – pt.1

nevagpub_menu.php

nevagpub_header.php

Each link in the [collection-name]_menu.php file is configurable.

<a class="genmenu" href=“nvagpubsabout.html"><?=L_HOME?></a>

Examples: the code for the home link (above) is:

<a class="genmenu" href=“http://tinyurl.com/2gq66f”> <?=L_BROWSE?></a>the code for the browse link (above) is:

Page 11: CONTENTdm Customization 101 Glee Willis Digital Projects Librarian University of Nevada, Reno

Editing Web Template FilesEditing Web Template FilesAnatomy of a CONTENT dm header display – pt.2

nevagpub_menu.php

nevagpub_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>

Default (out-of-the-box) code in [collection-name]_header.php:

Customized replacement code with local “header” graphic file:<tr><td><img src="/cdm4/images/header_nvagpubs_brn.jpg"></td></tr>

Page 12: CONTENTdm Customization 101 Glee Willis Digital Projects Librarian University of Nevada, Reno

Editing Web Template FilesEditing Web Template Files

My handy-dandy web template customization diagram:

Variables in the “style” file control the look of the web templates.

Page 13: CONTENTdm Customization 101 Glee Willis Digital Projects Librarian University of Nevada, Reno

Editing Web Template FilesEditing Web Template FilesExamples 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

Page 14: CONTENTdm Customization 101 Glee Willis Digital Projects Librarian University of Nevada, Reno

Editing Web Template FilesEditing Web Template FilesThe Localization files contain variables that control the text thatappears 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 PreferencesLOC_results.php within Browse and Results pagesLOC_search.php within Search pagesLOC_viewer.php within the Item viewer

Example from LOC_global.php file: Variable name = L_MY_FAVORITES

Default text = “my favorites” UNR’s text = “my saved items”

Page 15: CONTENTdm Customization 101 Glee Willis Digital Projects Librarian University of Nevada, Reno

Creating Custom Queries and ResultsCreating Custom Queries and Results

Example of a drop-down list created via the CQR wizard

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

Page 16: CONTENTdm Customization 101 Glee Willis Digital Projects Librarian University of Nevada, Reno

Creating Custom Queries and ResultsCreating Custom Queries and ResultsAnyone 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:

Page 17: CONTENTdm Customization 101 Glee Willis Digital Projects Librarian University of Nevada, Reno

Creating Custom Queries and ResultsCreating 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 orderdefault parameters for a browse or results display

Page 18: CONTENTdm Customization 101 Glee Willis Digital Projects Librarian University of Nevada, Reno

Creating Custom Queries and ResultsCreating 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 acrossall collections” option

Page 19: CONTENTdm Customization 101 Glee Willis Digital Projects Librarian University of Nevada, Reno

Creating Custom Queries and ResultsCreating 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

Page 20: CONTENTdm Customization 101 Glee Willis Digital Projects Librarian University of Nevada, Reno

Creating Custom Queries and ResultsCreating 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

Page 21: CONTENTdm Customization 101 Glee Willis Digital Projects Librarian University of Nevada, Reno

Creating Custom Queries and ResultsCreating 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)

Page 22: CONTENTdm Customization 101 Glee Willis Digital Projects Librarian University of Nevada, Reno

Creating Custom Queries and ResultsCreating 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

Page 23: CONTENTdm Customization 101 Glee Willis Digital Projects Librarian University of Nevada, Reno

Creating Custom Queries and ResultsCreating 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

<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>

It’s definitelyNOT the prettiest codein the world !

Page 24: CONTENTdm Customization 101 Glee Willis Digital Projects Librarian University of Nevada, Reno

Creating Custom Queries and ResultsCreating 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>&nbsp; </td> <td class="nav" valign="bottom"> <input type="image" src="images/go.gif" border="0" name="submit" width="24" height="24" /></td> </tr>

Page 25: CONTENTdm Customization 101 Glee Willis Digital Projects Librarian University of Nevada, Reno

Creating Custom Queries and ResultsCreating 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>

Page 26: CONTENTdm Customization 101 Glee Willis Digital Projects Librarian University of Nevada, Reno

CONTENTdmCONTENTdm

Customization 101Customization 101

Glee WillisGlee WillisDigital Projects LibrarianDigital Projects Librarian

University of Nevada, RenoUniversity of Nevada, Reno775-682-5641

[email protected]@unr.edu

Contact information:Contact information: