ocPortal Tutorial: Providing galleries
Written by Chris Graham, ocProducts
{!DOC_GALLERIES} This tutorial describes the basic gallery features, and how to use them.Table of contents
Gallery structure
|
Viewing a gallery that has a subgallery |
Galleries may have 'representative images' (rep-images). When a user views a gallery with sub-galleries, the sub-galleries are actually shown with their rep-images, so as to make them look more attractive and give an impression of the contents. Rep-images may be chosen when adding or editing a gallery, or when adding an image to a gallery it can be chosen that that image shall also become the rep-image.
Galleries
|
A gallery in flow mode |
Galleries are given a name, and a title. The name should be a code-name that can easily be typed in a URL, rather than a cleanly readable name. For example, 'holiday2004' would be a good gallery name for a gallery with title, 'Holiday Pictures, 2004 (Sweden)'.
|
A gallery in multi-page mode |
- Flow mode - this is intended for galleries that don't have a large number of entries.
- Multi-page mode - this mode provides page browsing features, with the images presented in vertical sequence.
From the gallery, the user can choose any of the available entries (images or videos), and the chosen entry will be presented to the user on a full wide page.
Gallery index
A gallery index is provided that lists all galleries in the system. Galleries that are empty are omitted from this list.Watermarking
When you add or edit a gallery you may choose watermarks to be automatically added to any of the 4 corners of any added images that you select to be watermarked. A watermark is just a semi-transparent image that is overlaid across images as an official mark, or to prevent unauthorised reproduction. If you wish to place a watermark on an edge, you simply make a corner watermark image that includes enough transparency to change the location for the main image to be placed.Watermarks are actually 'inherited' in the tree structure: in other words, when adding an image, watermarks will be chosen from the first gallery back down towards the root gallery that actually defines watermarks. You do not need to specify any watermarks at all if you do not want to.
Teasers
|
Viewing a gallery image |
Videos
Galleries have powerful video support. ocPortal will actually look at the file types of uploaded videos and use carefully crafted templates that use browser plug-ins that are most appropriate to that file type. For example, QuickTime files will be displayed with HTML to use the QuickTime plugin.In addition, ocPortal has a unique (to our knowledge) feature, whereby video widths, heights and lengths will, where possible, be automatically detected from the file itself. This is made possible by special code we developed that actually reads the main video file formats.
Ordering
|
Adding an image to a gallery |
The rule is very simple: ocPortal will order by file-name if when taking all numbers out of all file-names in the gallery, the file-names are all the same.
For example, a gallery with the following named files would not be ordered according to a scheme:
- foo.png
- foo1.png
- foo2.png
- foo2something.png
FLV files
ocPortal can also support FLV files. To do this, extract FLVplayer to the data directory.Concepts
- Gallery
- A category for images and videos
- Rep-image
- An image chosen to represent a category, when a box for it is displayed
- Teaser page
- A page that only shows gallery rep-images and details, intended for sites where the gallery requires subscription (stock art sites, auction sites, etc.)
- Watermark
- A standard mark shown on an image to mark it's identity, often done for a number of different reasons
- Flow mode
- The gallery view mode intended for attractive display of small galleries
- Subgallery
- A gallery placed beneath another gallery



