ocPortal Tutorial: Advanced galleries
Written by Chris Graham, ocProducts
The ocPortal gallery system provides a number of advanced features – this tutorial will describe some of them.Table of contents
Importing
|
The interface to import to a gallery |
When importing a gallery this way, no descriptions are added for the entries. However it is possible to add descriptions, and customise other details, simply by editing the entries individually.
There is an additional "import to gallery" feature that works on the premise that any image or video file located in the uploads/galleries directory should be pointed to by an entry in the system. Any such file that is not pointed to, is labelled as an 'orphaned file', and the import feature allows such files to be chosen selectively and imported into any gallery. This is useful because you can upload large file sets directly to uploads/galleries and then batch-add them.
If you have a CSV (spreadsheet) file named uploads/galleries/descriptions.csv, with the first column containing filenames, and the second column containing descriptions, then this will be checked when bulk importing files.
Also, EXIF data (in JPEG and TIFF files) will be checked for descriptions (PHP 4.2+ only).
The orphaned files importer will auto-select any orphaned files that are put in a directory of the same name as the gallery you are importing. This is useful if you have been organising your gallery images/videos into a directory structure before-hand, as it stops you having to manually re-select what-goes-where when you do the import. Note that the gallery structure is only one-level-deep, there is no support for subdirectory nesting; however, that is not required anyway as gallery names must be unique and thus there is no potential for directory name conflict.
Exporting
For members that have permission, gallery contents may be downloaded in a ZIP file archive, from a download link presented at the bottom of a gallery screen.These ZIP files contain only the actual image and video files, and not any meta content such as descriptions.
Member Galleries – quick start
|
Editing a gallery to be a member gallery container |
|
Making a personal gallery by adding an image |
To enable this:
- make sure members have permission to "Add image/video". You can check this from the Permissions Tree Editor at the "Module: galleries" node (probably under the Welcome or Site zone, depending on your set up). You can either assign this permission explicitly, or let it get inherited from the global "Submit mid-impact (medium visibility) content" privilege.
- and also permission to have personal categories. You can do this in the Permissions Tree Editor, or again by setting the privilege globally.
- Make sure members have View Access to the Content Management zone. This can again be done in the Permissions Tree Editor, at "Zone: Content Management".
- Add/edit a gallery (the "Galleries home" gallery will do, if you want personal galleries to be created directly underneath this) to have the 'Personal category container' option ticked (checked). You can find this on the gallery add/edit form under 'Advanced'.
- On the same add/edit gallery form, make sure that the gallery you add/edit also has "Accept images" and "Accept videos" enabled (assuming you want to allow both images and videos). This is because the properties of this gallery will be transferred to new personal galleries underneath it.
Members may have multiple personal galleries if you set multiple galleries to be 'Personal category container'.
Member Galleries – full explanation
|
A personal gallery as displayed in the container gallery |
- displayed as belonging to them
- display their profile details
- and only addable-to (by default) by them
The settings of new personal galleries are based on:
- hard-coded defaults
- the settings of the container gallery
- the permissions of the container gallery
|
The naming scheme that identifies personal galleries |
|
Viewing an image in a member gallery |
- (root)
- Germany Holiday Photos 2004 (*)
- Benjamin's Photos (+)
- Harry's Photos (+)
- School Photos
- Secondary School (*)
- Benjamin's Photos (+)
- Harry's Photos (+)
- Julie's Photos (+)
- Primary School (*)
- Benjamin's Photos (+)
- Harry's Photos (+)
- Secondary School (*)
- Germany Holiday Photos 2004 (*)
(*) denotes a personal gallery container
(+) denotes a personal gallery created upon adding by the owner
Personal galleries may only be submitted to by the owner of the personal gallery, unless the "Submit to categories belonging to other members" privilege is assigned.
Limiting member galleries
There are permissions and configuration options relating to the gallery system that allow you to limit the number of entries that members may have in their own galleries.ocPortal provides this functionality using a three-tiered system:
- low limit on entries in member galleries
- high limit on entries in member galleries
- no limit on entries in member galleries
The tier that a member resides in is based on usergroup permissions with two privileges which may be set for usergroups:
- has high limit in member galleries
- has no limit in member galleries



