Library Web Site Content Management Options Using PHP
Library Web Site Content Management Options Using PHP Mark Dahl Lewis & Clark College Portland, Oregon
Problem of content management l l l Building and maintaining a web site requires the collaboration of multiple specialists Designers, writers, editors, programmers, etc. Even in a small environment (college library with 25 employees) collaboration required
Content management systems l l l Software packages designed for the construction and maintenance of large web sites Expensive In use in some higher ed environments and libraries
Characteristics of content management systems l l l Separation of content from presentation Defined document schemas Access and workflow controls
Our solution l l l Not a full blown content management system A mixture of commercial and homegrown tools Achieves some of the features of full blow system • • • Separation of content from presentation Defined document schemas (metadata) Limited workflow controls
We sought a system that: l l Allowed multiple staff members to edit pages on the site with little knowledge of HTML or web editing tools Separated the content of the site from the presentation as much as possible Structured data to promote consistency and ease of migration to future platforms Allowed data used redundantly to be updated in one central location
Two-pronged strategy l All pages on site l Only our research resources pages • Distributed updating • Separation of content from presentation • Structured data • Redundant data in one place
Informational pages l Structured data and redundancy of data not as important as these pages (hours, library mission statement, etc. did not adhere to specific schema. )
Part 1: the template system l l Built to support the “interior pages” of our website that all feature a sidebar and banner (including pages edited by our resources editor to be discussed shortly) These pages are also available in textonly format (that is, with the sidebar and banner removed)
Template page in graphical mode:
Template page in text-mode:
Dreamweaver environment l Template system inadequate • Certain regions fixed, unchangeable • Certain regions editable • Doesn’t display CSS coding correctly • Won’t let you flip between different versions of • template (text and graphical) Hard to change templates globally across multiple Dreamweaver sites
Solution: Templates + include files and PHP l Use server-side includes for the code to display • Graphical sidebar/banner • Text-only banner l PHP browser-sniffer code checks for compatibility with CSS 2 compatible browser
Central links file l l l The main set of links on the interior sidebar and on homepage are controlled with a central file PHP code automatically inserts the links from this file The code creates flyouts as needed
Central links file
Fine-tuning Content Mgmt. Sometimes, Dreamweaver can be an awkward tool for staff: • It’s easy to check out files and forget to check them in • You must be conscious of remote and local files • There are many options for editing and formatting
Macromedia to the rescue with: Contribute l l l Allows users to simply browse to a page and click edit to edit page Checkin/checkout of files handled transparently Respects Dreamweaver templates, synchronizes to latest version of templates Can restrict access to certain files Can restrict types of edits (dynamic pages, fonts, etc. )
Keys to flexibility of our site’s look: l l Template system keeps content within certain parts of the pages Server side includes allow banner/sidebar to be changed centrally An attached stylesheet allows font and site colors to be changed globally This fall, we changed the fonts used across the whole site
Part 2: The resources editor l l l Like most academic libraries, we maintain web pages that direct users to databases, electronic reference works, and “web sites” These web pages are organized by subject We built a database driven system to maintain these pages
The resources editor l It meets objectives 3 -4 that I mentioned earlier: • • l Structured data as much as possible to promote consistency and ease of migration to future platforms Allow redundant data used across the site to be updated in a central location We designed a database driven system for organizing research resources (including databases, web sites, and links to library catalog records of print resources)
Goals for the resources editor: l l Consistent metadata for each resource Same data presented in multiple places kept in one place Flexibility in displaying resources (A-Z list, by pathfinder) Can be used to edit resources by the relatively untrained
The precedent l l There are many examples of libraries building database driven systems to organize resources on their web sites Open source projects available for this: • Scout portal toolkit • My. Library • Research. Guide
Building our own l l l Existing code base from work at Central Oregon Community College Linux OS Apache Web Server PHP scripting Postgre. SQL relational database
Why build our own? l l l Special requirements for organization into pathfinders Complete display flexibility (fussy librarians) Laziness More on this later
Resources database l l Each resource represents a research database, web site, or reference to printed library material Kept in a ‘resources’ SQL table Fields in table loosely based on Dublin Core metadata standard: publisher, title, description, coverage, etc. Resource editor: staff interface to allow adding and editing of new resources
Building pathfinders l l l Each pathfinder would have a unique name corresponding to an L&C discipline: History, Psychology, Sociology & Anthropology, etc. Resources would be organized into librariandefined categories (history databases, history metasites, etc. ) Resources would be put in a certain order within those categories
Resources & Pathfinders Resources: Pathfinders: News -Academic Search Premier -Anthropological Literature -Historical Abstracts -Internet Movie Database -Lexis-Nexis Film Anthropology History
Pathfinder SQL table l l l Contains references to resources Each row contains: • ID of resource • Name of pathfinder in which resource is found • Name of category in pathfinder • Position within category Link to resources table to create pathfinders
This shows the basic structure of a pathfinder: category resource
Staff interface to pathfinder l l l Allows staff to search for resources or pick from drop-down menu Pick appropriate spot in pathfinder, then add resource Staff can also add and move categories
Displaying the data l Done by creating a PHP class within an HTML document
Displaying the data l l Our librarians can create the PHP class in their web page in order to display resources Or they can simply send a parameter to an existing page custom built to display pathfinders: http: //library. lclark. edu/reference/resourcedisplay. php? subject=History
Display options l l l Display pathfinder normally (brief description of databases, extended description of websites) Display 1 category of a pathfinder within a normal web page Display data about single resource List all databases A-Z List all full text databases
Special features l l l Easy ability to link to print resources in catalog Staff member updating data has name/time updated recorded Book reviews field for info about how to find book reviews on a particular item
Future enhancements l l Patrons can build their own pathfinders Patrons can comment on resources Electronic resources management features Search
Reflections on doing it on our own. l l Kind of like reinventing the wheel But we do have special features of our system others (My. Library, Research. Guide, Scout Portal Toolkit) don’t: • • Resource records can be used across multiple pathfinders (Research. Guide doesn’t support) We support categories and unique order within categories Many display options (brief, combined, alphabetical, full-text only) Special fields (book review, database/website)
Technical details l l l SQL databases (resources, subjects (pathfinders), links) Query class (for querying database and returning result sets) PHP, built for Postgre. SQL db Displayclass extends queryclass, can be called with various parameters to display resources as desired
Technical details l Staff interface (PHP) l Written using Nusphere PHPEd (allows FAST PHP debugging and testing) • Separate from other • Uses queryclass for lookups • Not object oriented • Writes to database without using special class
References: l l l This presentation: http: //www. lclark. edu/~dahl/presentations/ Web site discussed: http: //library. lclark. edu/ Macromedia: http: //www. macromedia. com Nusphere PHPEd: http: //www. nusphere. com Oss 4 lib Open Source Systems for Libraries (links to Research. Guide, My. Library, Scout Portal Toolkit): http: //oss 4 lib. sourceforge. net
- Slides: 48