photo-album-procs.tcl

TCL library for the photo-album system

Location:
packages/photo-album/tcl/photo-album-procs.tcl
Created:
December 14, 2000
Authors:
Tom Baginski <bags@arsdigita.com>
Jeff Davis <davis@xorch.net>
CVS Identification:
$Id: photo-album-procs.tcl,v 1.29 2018/08/14 19:51:10 gustafn Exp $

Procedures in this file

Detailed information

pa_all_photos_in_album (public)

 pa_all_photos_in_album album_id

returns a list of all the photo_ids in an album sorted in ascending order pull value from cache if already there, caches result and returns result if not

Parameters:
album_id (required)

Partial Call Graph (max 5 caller/called nodes):
%3 pa_all_photos_on_page pa_all_photos_on_page (public) pa_all_photos_in_album pa_all_photos_in_album pa_all_photos_on_page->pa_all_photos_in_album pa_count_photos_in_album pa_count_photos_in_album (public) pa_count_photos_in_album->pa_all_photos_in_album pa_page_of_photo_in_album pa_page_of_photo_in_album (public) pa_page_of_photo_in_album->pa_all_photos_in_album packages/photo-album/www/album-export.tcl packages/photo-album/ www/album-export.tcl packages/photo-album/www/album-export.tcl->pa_all_photos_in_album packages/photo-album/www/base-photo.tcl packages/photo-album/ www/base-photo.tcl packages/photo-album/www/base-photo.tcl->pa_all_photos_in_album util_memoize util_memoize (public) pa_all_photos_in_album->util_memoize

Testcases:
No testcase defined.

pa_all_photos_in_album_internal (private)

 pa_all_photos_in_album_internal album_id

queries and returns a list of all photo_ids in album_id in ascending order

Parameters:
album_id (required)

Partial Call Graph (max 5 caller/called nodes):
%3 db_list db_list (public) pa_all_photos_in_album_internal pa_all_photos_in_album_internal pa_all_photos_in_album_internal->db_list

Testcases:
No testcase defined.

pa_all_photos_on_page (public)

 pa_all_photos_on_page album_id page

returns a list of the photo_ids on page page of album_id list is in ascending order

Parameters:
album_id (required)
page (required)

Partial Call Graph (max 5 caller/called nodes):
%3 packages/photo-album/www/album.tcl packages/photo-album/ www/album.tcl pa_all_photos_on_page pa_all_photos_on_page packages/photo-album/www/album.tcl->pa_all_photos_on_page packages/photo-album/www/photos-edit.tcl packages/photo-album/ www/photos-edit.tcl packages/photo-album/www/photos-edit.tcl->pa_all_photos_on_page pa_all_photos_in_album pa_all_photos_in_album (public) pa_all_photos_on_page->pa_all_photos_in_album parameter::get parameter::get (public) pa_all_photos_on_page->parameter::get

Testcases:
No testcase defined.

pa_assert_dir (private)

 pa_assert_dir [ -check_base_path ] dir_path

Ensures that dirname exists under the PhotoDir Directory If -check_base_path flag specified, proc also checks if base path exists and adds it if necessary Won't cause an error if the directory is already there. Better than the stardard mkdir because it will make all the directories leading up to dirname borrowed from 3.4 download code

Switches:
-check_base_path (optional, boolean)
Parameters:
dir_path (required)

Partial Call Graph (max 5 caller/called nodes):
%3 acs_root_dir acs_root_dir (public) parameter::get parameter::get (public) pa_assert_dir pa_assert_dir pa_assert_dir->acs_root_dir pa_assert_dir->parameter::get

Testcases:
No testcase defined.

pa_clipboards_multirow (public)

 pa_clipboards_multirow [ -create_new ] [ -force_default ] user_id \
    datasource

creates a multirow datasource with the existing clipboards

Switches:
-create_new (optional, boolean)
add a "Create new folder" entry to list
-force_default (optional, boolean)
create the datasource with a default folder even if none exist
Parameters:
user_id (required)
the owner id for the folders
datasource (required)
the datasource name to use.
Author:
Jeff Davis davis@xarg.net
Created:
2002-10-30

Partial Call Graph (max 5 caller/called nodes):
%3 packages/photo-album/www/photo.tcl packages/photo-album/ www/photo.tcl pa_clipboards_multirow pa_clipboards_multirow packages/photo-album/www/photo.tcl->pa_clipboards_multirow db_multirow db_multirow (public) pa_clipboards_multirow->db_multirow template::multirow template::multirow (public) pa_clipboards_multirow->template::multirow

Testcases:
No testcase defined.

pa_context_bar_list (public)

 pa_context_bar_list [ -final final ] item_id

Constructs the list to be fed to ad_context_bar appropriate for item_id. If -final is specified, that string will be the last item in the context bar. Otherwise, the name corresponding to item_id will be used. modified from fs_context_bar

Switches:
-final (optional)
Parameters:
item_id (required)

Partial Call Graph (max 5 caller/called nodes):
%3 packages/photo-album/www/album-add.tcl packages/photo-album/ www/album-add.tcl pa_context_bar_list pa_context_bar_list packages/photo-album/www/album-add.tcl->pa_context_bar_list packages/photo-album/www/album-chunk.tcl packages/photo-album/ www/album-chunk.tcl packages/photo-album/www/album-chunk.tcl->pa_context_bar_list packages/photo-album/www/album-delete.tcl packages/photo-album/ www/album-delete.tcl packages/photo-album/www/album-delete.tcl->pa_context_bar_list packages/photo-album/www/album-edit.tcl packages/photo-album/ www/album-edit.tcl packages/photo-album/www/album-edit.tcl->pa_context_bar_list packages/photo-album/www/album-move.tcl packages/photo-album/ www/album-move.tcl packages/photo-album/www/album-move.tcl->pa_context_bar_list db_1row db_1row (public) pa_context_bar_list->db_1row db_list_of_lists db_list_of_lists (public) pa_context_bar_list->db_list_of_lists pa_get_root_folder pa_get_root_folder (public) pa_context_bar_list->pa_get_root_folder

Testcases:
No testcase defined.

pa_count_pages_in_album (public)

 pa_count_pages_in_album album_id

returns the number of pages in album_id

Parameters:
album_id (required)

Partial Call Graph (max 5 caller/called nodes):
%3 packages/photo-album/www/album.tcl packages/photo-album/ www/album.tcl pa_count_pages_in_album pa_count_pages_in_album packages/photo-album/www/album.tcl->pa_count_pages_in_album packages/photo-album/www/photos-edit.tcl packages/photo-album/ www/photos-edit.tcl packages/photo-album/www/photos-edit.tcl->pa_count_pages_in_album pa_count_photos_in_album pa_count_photos_in_album (public) pa_count_pages_in_album->pa_count_photos_in_album parameter::get parameter::get (public) pa_count_pages_in_album->parameter::get

Testcases:
No testcase defined.

pa_count_photos_in_album (public)

 pa_count_photos_in_album album_id

returns count of number of photos in album_id

Parameters:
album_id (required)

Partial Call Graph (max 5 caller/called nodes):
%3 pa_count_pages_in_album pa_count_pages_in_album (public) pa_count_photos_in_album pa_count_photos_in_album pa_count_pages_in_album->pa_count_photos_in_album packages/photo-album/www/album-delete.tcl packages/photo-album/ www/album-delete.tcl packages/photo-album/www/album-delete.tcl->pa_count_photos_in_album packages/photo-album/www/album.tcl packages/photo-album/ www/album.tcl packages/photo-album/www/album.tcl->pa_count_photos_in_album packages/photo-album/www/photos-edit.tcl packages/photo-album/ www/photos-edit.tcl packages/photo-album/www/photos-edit.tcl->pa_count_photos_in_album pa_all_photos_in_album pa_all_photos_in_album (public) pa_count_photos_in_album->pa_all_photos_in_album

Testcases:
No testcase defined.

pa_expand_archive (public)

 pa_expand_archive upload_file tmpfile [ dest_dir_base ]

Given an uploaded file in file tmpfile with original name upload_file extract the archive and put in a tmp directory which is the return value of the function

Parameters:
upload_file (required)
tmpfile (required)
dest_dir_base (optional, defaults to "extract")

Partial Call Graph (max 5 caller/called nodes):
%3 packages/photo-album/www/photos-add-2.tcl packages/photo-album/ www/photos-add-2.tcl pa_expand_archive pa_expand_archive packages/photo-album/www/photos-add-2.tcl->pa_expand_archive

Testcases:
No testcase defined.

pa_file_info (public)

 pa_file_info file

return the image information from a given file

Parameters:
file (required)

Partial Call Graph (max 5 caller/called nodes):
%3 pa_load_images pa_load_images (public) pa_file_info pa_file_info pa_load_images->pa_file_info packages/photo-album/www/photo-add-2.tcl packages/photo-album/ www/photo-add-2.tcl packages/photo-album/www/photo-add-2.tcl->pa_file_info parameter::get parameter::get (public) pa_file_info->parameter::get

Testcases:
No testcase defined.

pa_flush_photo_in_album_cache (public)

 pa_flush_photo_in_album_cache album_id

Clears the cacheed value set by pa_all_photos_in_album for a single album Call proc on any page that alters the number or order of photos in an album.

Parameters:
album_id (required)

Partial Call Graph (max 5 caller/called nodes):
%3 packages/photo-album/www/album-delete.tcl packages/photo-album/ www/album-delete.tcl pa_flush_photo_in_album_cache pa_flush_photo_in_album_cache packages/photo-album/www/album-delete.tcl->pa_flush_photo_in_album_cache packages/photo-album/www/photo-add-2.tcl packages/photo-album/ www/photo-add-2.tcl packages/photo-album/www/photo-add-2.tcl->pa_flush_photo_in_album_cache packages/photo-album/www/photo-delete.tcl packages/photo-album/ www/photo-delete.tcl packages/photo-album/www/photo-delete.tcl->pa_flush_photo_in_album_cache packages/photo-album/www/photo.tcl packages/photo-album/ www/photo.tcl packages/photo-album/www/photo.tcl->pa_flush_photo_in_album_cache packages/photo-album/www/photos-add-2.tcl packages/photo-album/ www/photos-add-2.tcl packages/photo-album/www/photos-add-2.tcl->pa_flush_photo_in_album_cache util_memoize_flush util_memoize_flush (public) pa_flush_photo_in_album_cache->util_memoize_flush

Testcases:
No testcase defined.

pa_get_exif_data (public)

 pa_get_exif_data file

Returns a array get list with the some of the exif data or an empty string if the file is not a jpg file uses jhead Keys: Aperture Cameramake Cameramodel CCDWidth DateTime Exposurebias Exposuretime Filedate Filename Filesize Film Flashused Focallength Focallength35 FocusDist Jpegprocess MeteringMode Resolution

Parameters:
file (required)

Partial Call Graph (max 5 caller/called nodes):
%3 pa_load_images pa_load_images (public) pa_get_exif_data pa_get_exif_data pa_load_images->pa_get_exif_data

Testcases:
No testcase defined.

pa_get_folder_description (public)

 pa_get_folder_description folder_id

Returns the description of a folder.

Parameters:
folder_id (required)

Partial Call Graph (max 5 caller/called nodes):
%3 packages/photo-album/www/folder-edit.tcl packages/photo-album/ www/folder-edit.tcl pa_get_folder_description pa_get_folder_description packages/photo-album/www/folder-edit.tcl->pa_get_folder_description db_string db_string (public) pa_get_folder_description->db_string

Testcases:
No testcase defined.

pa_get_folder_name (public)

 pa_get_folder_name folder_id

Returns the name of a folder.

Parameters:
folder_id (required)

Partial Call Graph (max 5 caller/called nodes):
%3 packages/photo-album/www/folder-edit.tcl packages/photo-album/ www/folder-edit.tcl pa_get_folder_name pa_get_folder_name packages/photo-album/www/folder-edit.tcl->pa_get_folder_name db_string db_string (public) pa_get_folder_name->db_string

Testcases:
No testcase defined.

pa_get_root_folder (public)

 pa_get_root_folder [ package_id ]

Returns the folder_id of the root folder for an instance of the photo album system. If no root folder exists, as when a new package instance is accessed for the first time, a new root folder is created automatically with appropriate permissions If value has be previously requested, value pulled from cache

Parameters:
package_id (optional)

Partial Call Graph (max 5 caller/called nodes):
%3 pa_context_bar_list pa_context_bar_list (public) pa_get_root_folder pa_get_root_folder pa_context_bar_list->pa_get_root_folder pa_is_type_in_package pa_is_type_in_package (private) pa_is_type_in_package->pa_get_root_folder packages/photo-album/www/album-chunk.tcl packages/photo-album/ www/album-chunk.tcl packages/photo-album/www/album-chunk.tcl->pa_get_root_folder packages/photo-album/www/album-move.tcl packages/photo-album/ www/album-move.tcl packages/photo-album/www/album-move.tcl->pa_get_root_folder packages/photo-album/www/folder-delete.tcl packages/photo-album/ www/folder-delete.tcl packages/photo-album/www/folder-delete.tcl->pa_get_root_folder ad_conn ad_conn (public) pa_get_root_folder->ad_conn util_memoize util_memoize (public) pa_get_root_folder->util_memoize

Testcases:
No testcase defined.

pa_get_root_folder_internal (private)

 pa_get_root_folder_internal package_id

Returns the folder_id of the root folder for an instance of the photo album system. If no root folder exists, as when a new package instance is accessed for the first time, a new root folder is created automatically with appropriate permissions

Parameters:
package_id (required)

Partial Call Graph (max 5 caller/called nodes):
%3 db_string db_string (public) pa_new_root_folder pa_new_root_folder (private) pa_get_root_folder_internal pa_get_root_folder_internal pa_get_root_folder_internal->db_string pa_get_root_folder_internal->pa_new_root_folder

Testcases:
No testcase defined.

pa_grant_privilege_to_creator (public)

 pa_grant_privilege_to_creator object_id [ user_id ]

Grants a set of default privileges stored in parameter PrivilegeForCreator on object id to user_id. If user_id is not specified, uses current user.

Parameters:
object_id (required)
user_id (optional)

Partial Call Graph (max 5 caller/called nodes):
%3 pa_load_images pa_load_images (public) pa_grant_privilege_to_creator pa_grant_privilege_to_creator pa_load_images->pa_grant_privilege_to_creator packages/photo-album/www/album-add.tcl packages/photo-album/ www/album-add.tcl packages/photo-album/www/album-add.tcl->pa_grant_privilege_to_creator packages/photo-album/www/folder-add.tcl packages/photo-album/ www/folder-add.tcl packages/photo-album/www/folder-add.tcl->pa_grant_privilege_to_creator ad_conn ad_conn (public) pa_grant_privilege_to_creator->ad_conn db_exec_plsql db_exec_plsql (public) pa_grant_privilege_to_creator->db_exec_plsql parameter::get parameter::get (public) pa_grant_privilege_to_creator->parameter::get

Testcases:
No testcase defined.

pa_image_width_height (public)

 pa_image_width_height filename width_var height_var

Uses ImageMagick program to get the width and height in pixels of filename. Sets height to the variable named in height_var in the calling level. Sets width_var to the variable named in width_var in the calling level. I Use ImageMagick instead of AOLserver function because it can handle more than just gifs and jpegs.

Parameters:
filename (required)
width_var (required)
height_var (required)

Partial Call Graph (max 5 caller/called nodes):
%3 parameter::get parameter::get (public) pa_image_width_height pa_image_width_height pa_image_width_height->parameter::get

Testcases:
No testcase defined.

pa_insert_image (public)

 pa_insert_image name photo_id item_id rev_id user_id peeraddr \
    context_id title description mime_type relation is_live path \
    height width size
Parameters:
name (required)
photo_id (required)
item_id (required)
rev_id (required)
user_id (required)
peeraddr (required)
context_id (required)
title (required)
description (required)
mime_type (required)
relation (required)
is_live (required)
path (required)
height (required)
width (required)
size (required)

Partial Call Graph (max 5 caller/called nodes):
%3 pa_load_images pa_load_images (public) pa_insert_image pa_insert_image pa_load_images->pa_insert_image ad_conn ad_conn (public) pa_insert_image->ad_conn db_exec_plsql db_exec_plsql (public) pa_insert_image->db_exec_plsql

Testcases:
No testcase defined.

pa_is_album_p (public)

 pa_is_album_p album_id [ package_id ]

returns "t" if album_id is a pa_album that is a child of the root folder for the package, else "f"

Parameters:
album_id (required)
package_id (optional)

Partial Call Graph (max 5 caller/called nodes):
%3 packages/photo-album/www/album-delete.tcl packages/photo-album/ www/album-delete.tcl pa_is_album_p pa_is_album_p packages/photo-album/www/album-delete.tcl->pa_is_album_p packages/photo-album/www/album-edit.tcl packages/photo-album/ www/album-edit.tcl packages/photo-album/www/album-edit.tcl->pa_is_album_p packages/photo-album/www/album-move.tcl packages/photo-album/ www/album-move.tcl packages/photo-album/www/album-move.tcl->pa_is_album_p packages/photo-album/www/album.tcl packages/photo-album/ www/album.tcl packages/photo-album/www/album.tcl->pa_is_album_p packages/photo-album/www/photo-add-2.tcl packages/photo-album/ www/photo-add-2.tcl packages/photo-album/www/photo-add-2.tcl->pa_is_album_p pa_is_type_in_package pa_is_type_in_package (private) pa_is_album_p->pa_is_type_in_package

Testcases:
No testcase defined.

pa_is_folder_p (public)

 pa_is_folder_p folder_id [ package_id ]

returns "t" if folder_id is a folder that is a child of the root folder for the package, else "f"

Parameters:
folder_id (required)
package_id (optional)

Partial Call Graph (max 5 caller/called nodes):
%3 packages/photo-album/www/album-add.tcl packages/photo-album/ www/album-add.tcl pa_is_folder_p pa_is_folder_p packages/photo-album/www/album-add.tcl->pa_is_folder_p packages/photo-album/www/album-move.tcl packages/photo-album/ www/album-move.tcl packages/photo-album/www/album-move.tcl->pa_is_folder_p packages/photo-album/www/folder-add.tcl packages/photo-album/ www/folder-add.tcl packages/photo-album/www/folder-add.tcl->pa_is_folder_p packages/photo-album/www/folder-delete.tcl packages/photo-album/ www/folder-delete.tcl packages/photo-album/www/folder-delete.tcl->pa_is_folder_p packages/photo-album/www/folder-edit.tcl packages/photo-album/ www/folder-edit.tcl packages/photo-album/www/folder-edit.tcl->pa_is_folder_p pa_is_type_in_package pa_is_type_in_package (private) pa_is_folder_p->pa_is_type_in_package

Testcases:
No testcase defined.

pa_is_photo_p (public)

 pa_is_photo_p photo_id [ package_id ]

returns "t" if photo_id is a pa_photo that is a child of the root folder for the package, else "f"

Parameters:
photo_id (required)
package_id (optional)

Partial Call Graph (max 5 caller/called nodes):
%3 packages/photo-album/www/base-photo.tcl packages/photo-album/ www/base-photo.tcl pa_is_photo_p pa_is_photo_p packages/photo-album/www/base-photo.tcl->pa_is_photo_p packages/photo-album/www/photo-delete.tcl packages/photo-album/ www/photo-delete.tcl packages/photo-album/www/photo-delete.tcl->pa_is_photo_p packages/photo-album/www/photo-iconic.tcl packages/photo-album/ www/photo-iconic.tcl packages/photo-album/www/photo-iconic.tcl->pa_is_photo_p packages/photo-album/www/photo.tcl packages/photo-album/ www/photo.tcl packages/photo-album/www/photo.tcl->pa_is_photo_p pa_is_type_in_package pa_is_type_in_package (private) pa_is_photo_p->pa_is_type_in_package

Testcases:
No testcase defined.

pa_is_type_in_package (private)

 pa_is_type_in_package item_id content_type [ package_id ]

returns "t" if item_id is of the specified content_type and is a child of the root folder of the package, else returns "f"

Parameters:
item_id (required)
content_type (required)
package_id (optional)

Partial Call Graph (max 5 caller/called nodes):
%3 pa_is_album_p pa_is_album_p (public) pa_is_type_in_package pa_is_type_in_package pa_is_album_p->pa_is_type_in_package pa_is_folder_p pa_is_folder_p (public) pa_is_folder_p->pa_is_type_in_package pa_is_photo_p pa_is_photo_p (public) pa_is_photo_p->pa_is_type_in_package db_string db_string (public) pa_is_type_in_package->db_string pa_get_root_folder pa_get_root_folder (public) pa_is_type_in_package->pa_get_root_folder

Testcases:
No testcase defined.

pa_load_images (public)

 pa_load_images [ -remove remove ] [ -client_name client_name ] \
    [ -strip_prefix strip_prefix ] [ -description description ] \
    [ -story story ] [ -caption caption ] \
    [ -feedback_mode feedback_mode ] [ -package_id package_id ] \
    image_files album_id user_id

load a list of files to the provided album owned by user_id

Switches:
-remove (optional, defaults to "0")
1 to delete the file after moving to the content repository
-client_name (optional)
provide the name of the upload file (for individual uploads)
-strip_prefix (optional)
the prefix to remove from the filename (for expanded archives)
-description (optional)
-story (optional)
-caption (optional)
-feedback_mode (optional, defaults to "0")
to provide much info of the loading process on a bulk upload
-package_id (optional)
Optionally specify the package_id owning the album, if this is not called from a page within the photo-album package itself.
Parameters:
image_files (required)
list of files to process
album_id (required)
user_id (required)

Partial Call Graph (max 5 caller/called nodes):
%3 packages/photo-album/www/photo-add-2.tcl packages/photo-album/ www/photo-add-2.tcl pa_load_images pa_load_images packages/photo-album/www/photo-add-2.tcl->pa_load_images packages/photo-album/www/photos-add-2.tcl packages/photo-album/ www/photos-add-2.tcl packages/photo-album/www/photos-add-2.tcl->pa_load_images ad_conn ad_conn (public) pa_load_images->ad_conn cr_create_content_file cr_create_content_file (public) pa_load_images->cr_create_content_file db_dml db_dml (public) pa_load_images->db_dml db_exec_plsql db_exec_plsql (public) pa_load_images->db_exec_plsql db_nextval db_nextval (public) pa_load_images->db_nextval

Testcases:
No testcase defined.

pa_make_file_name (public)

 pa_make_file_name [ -ext ext ] id

constructs a filename for an image based on id and extension.

Switches:
-ext (optional)
Parameters:
id (required)

Partial Call Graph (max 5 caller/called nodes):
%3 pa_load_images pa_load_images (public) pa_make_file_name pa_make_file_name pa_load_images->pa_make_file_name

Testcases:
No testcase defined.

pa_make_new_image (public)

 pa_make_new_image base_image new_image geometry

Uses ImageMagick program to create a file named new_image from base_image that fits within a box defined by geometry. If geometry is just a number it will be used for both width and height. ImageMagick will retain the aspect ratio of the base_image when creating the new_image jhead -dt is called to delete any embedded thumbnail since digital camera thumbnails can be quite large and imagemagick does not remove them when converting (so thumbnails can end up being 8k for the thumbnail + 32k for the embedded thumbnail).

Parameters:
base_image (required)
original image filename
new_image (required)
new image filename
geometry (required)
string as passed to convert

Partial Call Graph (max 5 caller/called nodes):
%3 pa_load_images pa_load_images (public) pa_make_new_image pa_make_new_image pa_load_images->pa_make_new_image parameter::get parameter::get (public) pa_make_new_image->parameter::get

Testcases:
No testcase defined.

pa_new_root_folder (private)

 pa_new_root_folder [ package_id ]

Creates a new root folder for a package, and returns id. A hackish function to get around the fact that we can't run code automatically when a new package instance is created.

Parameters:
package_id (optional)

Partial Call Graph (max 5 caller/called nodes):
%3 pa_get_root_folder_internal pa_get_root_folder_internal (private) pa_new_root_folder pa_new_root_folder pa_get_root_folder_internal->pa_new_root_folder ad_conn ad_conn (public) pa_new_root_folder->ad_conn db_exec_plsql db_exec_plsql (public) pa_new_root_folder->db_exec_plsql db_string db_string (public) pa_new_root_folder->db_string db_transaction db_transaction (public) pa_new_root_folder->db_transaction parameter::get parameter::get (public) pa_new_root_folder->parameter::get

Testcases:
No testcase defined.

pa_page_of_photo_in_album (public)

 pa_page_of_photo_in_album photo_id album_id

returns the page number of a photo in an album If photo is not in the album returns -1

Parameters:
photo_id (required)
album_id (required)

Partial Call Graph (max 5 caller/called nodes):
%3 packages/photo-album/www/base-photo.tcl packages/photo-album/ www/base-photo.tcl pa_page_of_photo_in_album pa_page_of_photo_in_album packages/photo-album/www/base-photo.tcl->pa_page_of_photo_in_album packages/photo-album/www/photo-add-2.tcl packages/photo-album/ www/photo-add-2.tcl packages/photo-album/www/photo-add-2.tcl->pa_page_of_photo_in_album packages/photo-album/www/photo.tcl packages/photo-album/ www/photo.tcl packages/photo-album/www/photo.tcl->pa_page_of_photo_in_album packages/photo-album/www/photos-add-2.tcl packages/photo-album/ www/photos-add-2.tcl packages/photo-album/www/photos-add-2.tcl->pa_page_of_photo_in_album pa_all_photos_in_album pa_all_photos_in_album (public) pa_page_of_photo_in_album->pa_all_photos_in_album parameter::get parameter::get (public) pa_page_of_photo_in_album->parameter::get

Testcases:
No testcase defined.

pa_pagination_bar (public)

 pa_pagination_bar cur_id all_ids link [ what ]

given a current photo_id and an ordered list of all the photo_id in an album creates an html fragment that allows user to navigate to any photo by number next/previous

Parameters:
cur_id (required)
all_ids (required)
link (required)
what (optional)

Partial Call Graph (max 5 caller/called nodes):
%3 packages/photo-album/www/album.tcl packages/photo-album/ www/album.tcl pa_pagination_bar pa_pagination_bar packages/photo-album/www/album.tcl->pa_pagination_bar packages/photo-album/www/base-photo.tcl packages/photo-album/ www/base-photo.tcl packages/photo-album/www/base-photo.tcl->pa_pagination_bar packages/photo-album/www/photo.tcl packages/photo-album/ www/photo.tcl packages/photo-album/www/photo.tcl->pa_pagination_bar packages/photo-album/www/photos-edit.tcl packages/photo-album/ www/photos-edit.tcl packages/photo-album/www/photos-edit.tcl->pa_pagination_bar _ _ (public) pa_pagination_bar->_ pa_pagination_context_ids pa_pagination_context_ids (public) pa_pagination_bar->pa_pagination_context_ids

Testcases:
No testcase defined.

pa_pagination_context_ids (public)

 pa_pagination_context_ids curr ids [ context ]
Parameters:
curr (required)
ids (required)
context (optional, defaults to "4")

Partial Call Graph (max 5 caller/called nodes):
%3 pa_pagination_bar pa_pagination_bar (public) pa_pagination_context_ids pa_pagination_context_ids pa_pagination_bar->pa_pagination_context_ids

Testcases:
No testcase defined.

pa_pagination_get_total_pages (public, deprecated)

 pa_pagination_get_total_pages
Deprecated. Invoking this procedure generates a warning.

returns the total pages in a datasource defined by $sql The sql var must be defined at the calling level. Uplevel used so that any binde vars in query are defined

Partial Call Graph (max 5 caller/called nodes):
%3 ad_log_deprecated ad_log_deprecated (public) db_string db_string (public) parameter::get parameter::get (public) pa_pagination_get_total_pages pa_pagination_get_total_pages pa_pagination_get_total_pages->ad_log_deprecated pa_pagination_get_total_pages->db_string pa_pagination_get_total_pages->parameter::get

Testcases:
No testcase defined.

pa_pagination_ns_set_to_url_vars (private)

 pa_pagination_ns_set_to_url_vars set_id

helper procedure - turns an ns_set into a list of url_vars

Parameters:
set_id (required)

Partial Call Graph (max 5 caller/called nodes):
%3

Testcases:
No testcase defined.

pa_pagination_paginate_query (public, deprecated)

 pa_pagination_paginate_query sql page
Deprecated. Invoking this procedure generates a warning.

takes a query and returns a query that accounts for pagination

Parameters:
sql (required)
page (required)

Partial Call Graph (max 5 caller/called nodes):
%3 ad_log_deprecated ad_log_deprecated (public) parameter::get parameter::get (public) pa_pagination_paginate_query pa_pagination_paginate_query pa_pagination_paginate_query->ad_log_deprecated pa_pagination_paginate_query->parameter::get

Testcases:
No testcase defined.

pa_rotate (public)

 pa_rotate id rotation

Rotate a pic

Parameters:
id (required)
the photo_id to rotate
rotation (required)
the number of degrees to rotate
Author:
Jeff Davis davis@xarg.net
Created:
2002-10-30

Partial Call Graph (max 5 caller/called nodes):
%3 packages/photo-album/www/photo-edit.tcl packages/photo-album/ www/photo-edit.tcl pa_rotate pa_rotate packages/photo-album/www/photo-edit.tcl->pa_rotate packages/photo-album/www/photos-edit-2.tcl packages/photo-album/ www/photos-edit-2.tcl packages/photo-album/www/photos-edit-2.tcl->pa_rotate cr_fs_path cr_fs_path (private) pa_rotate->cr_fs_path db_dml db_dml (public) pa_rotate->db_dml db_foreach db_foreach (public) pa_rotate->db_foreach parameter::get parameter::get (public) pa_rotate->parameter::get

Testcases:
No testcase defined.

pa_walk (public)

 pa_walk dir

Walk starting at a given directory and return a list of all the plain files found

Parameters:
dir (required)

Partial Call Graph (max 5 caller/called nodes):
%3 packages/photo-album/www/photos-add-2.tcl packages/photo-album/ www/photos-add-2.tcl pa_walk pa_walk packages/photo-album/www/photos-add-2.tcl->pa_walk

Testcases:
No testcase defined.

photo_album::get_package_id_from_url (public)

 photo_album::get_package_id_from_url [ -url url ]

Returns package_id of instance from URL

Switches:
-url (optional)

Partial Call Graph (max 5 caller/called nodes):
%3 site_node::get_from_url site_node::get_from_url (public) photo_album::get_package_id_from_url photo_album::get_package_id_from_url photo_album::get_package_id_from_url->site_node::get_from_url

Testcases:
No testcase defined.

photo_album::list_albums_in_root_folder (public)

 photo_album::list_albums_in_root_folder \
    [ -root_folder_id root_folder_id ]

Returns a list of albums for a specific instance of photo-album

Switches:
-root_folder_id (optional)

Partial Call Graph (max 5 caller/called nodes):
%3 ad_conn ad_conn (public) db_list_of_lists db_list_of_lists (public) photo_album::list_albums_in_root_folder photo_album::list_albums_in_root_folder photo_album::list_albums_in_root_folder->ad_conn photo_album::list_albums_in_root_folder->db_list_of_lists

Testcases:
No testcase defined.

photo_album::photo::get (public)

 photo_album::photo::get -photo_id photo_id -array array \
    [ -user_id user_id ]

return an array with the photo data. elements are: photo_delete_p admin_p write_p album_write_p album_id caption description photo_id story title image_types (list of available related images "base" "viewer" "thumb") For each image type there is (eg viewer here): viewer_content viewer_content_length viewer_height viewer_image_id viewer_latest_revision viewer_live_revision viewer_name viewer_relation_tag viewer_width

Switches:
-photo_id (required)
-array (required)
-user_id (optional)

Partial Call Graph (max 5 caller/called nodes):
%3 photo_album::search::photo::datasource photo_album::search::photo::datasource (private) photo_album::photo::get photo_album::photo::get photo_album::search::photo::datasource->photo_album::photo::get ad_conn ad_conn (public) photo_album::photo::get->ad_conn db_1row db_1row (public) photo_album::photo::get->db_1row db_foreach db_foreach (public) photo_album::photo::get->db_foreach

Testcases:
No testcase defined.

photo_album::photo::package_url (public)

 photo_album::photo::package_url [ -photo_id photo_id ]

given a photo_id (can be an item or revision_id) return the package_url for the corresponding photo. does not include the site part just the path.

Switches:
-photo_id (optional)

Partial Call Graph (max 5 caller/called nodes):
%3 photo_album::search::photo::datasource photo_album::search::photo::datasource (private) photo_album::photo::package_url photo_album::photo::package_url photo_album::search::photo::datasource->photo_album::photo::package_url db_0or1row db_0or1row (public) photo_album::photo::package_url->db_0or1row site_node::get_element site_node::get_element (public) photo_album::photo::package_url->site_node::get_element

Testcases:
No testcase defined.
[ show source ]