Customizing Pawtucket - Plugins

From CollectiveAccess Documentation
Jump to: navigation, search

Pawtucket plugins are PHP classes you can write to extend Pawtucket with specialized functionality. For more information on creating plugins for Pawtucket, see Pawtucket plugins. Pawtucket comes with two plugins: "simpleGallery" and "Bristol."

simpleGallery

The simpleGallery plugin outputs a Gallery interface that is automatically populated with content from the Sets you create in Providence. Sets are selected to appear in this section based on their type and access settings. You can configure which type set is used in the Gallery section by defining the variable "simpleGallery_set_type" in app.conf. All sets with this type whose access is set to public will appear in the Gallery section.

To turn on the simpleGallery plugin set "enabled" to 1 in simpleGallery/conf/simpleGallery.conf. A link to the gallery section will be automatically be included in the site's main navigation. To change its location in the menu, set "position_top_level_nav_item_before" to the menu code to place the simpleGallery link before. This plugin provides an easy way to create slideshows of content. The views used to present the simpleGallery plugin are in plugins/simpleGallery/views/default. The plugin will look for a folder that corresponds to the assigned theme's name. If a folder of that name is not found, it will use the views within the "default" folder.

The following is a brief description of each view in simpleGallery's views/default folder. File names marked with an * indicates that you will most likely need to modify this file:

default/ajax_item_info_html.php View loaded through an ajax call that formats a set's object information in an overlay panel on the current set's detail page.
default/intro_text_html.php* Gallery page text, by default this has place holder Lorem ipsum text that should be replaced.
default/landing_html.php Formats Gallery landing page. Contains a list of all featured sets that link to detail pages for the set. Intro text included from intro_text_html.php
default/set_info_html.php Formats set's detail page. Contains descriptive text for the set and a grid of images representing each object in the set. Also has a list of links to other gallery sets.
default/tooltip_html.php Formats tooltips used in set_info_html.php.


Configuration Options (simpleGallery.conf)

enabled Set to 1 to enable plugin, or 0 to turn it off.
position_top_level_nav_item_before The link to simpleGallery will be inserted before the menu item you enter on this line.
set_description_element_code The element code for the description field in the Set Editor. This is usually "description," but you can look this up under Manage > System Configuration > Metadata Elements
set_item_description_element_code The element code for the description field in the Set Items Editor. This is usually "description," but you can look this up under Manage > System Configuration > Metadata Elements
Namespaces

Variants
Actions
Navigation
Tools
User
Personal tools