• Publicity: Public Only All

email-image-procs.tcl

Tcl API for email_image store and manipulation

Location:
packages/acs-subsite/tcl/email-image-procs.tcl
Author:
Miguel Marin <miguelmarin@viaro.net) Viaro Networks (www.viaro.net>

Procedures in this file

Detailed information

email_image::add_relation (public)

 email_image::add_relation -user_id user_id -item_id item_id

Add a new relation between user_id and item_id

Switches:
-user_id (required)
-item_id (required)
the item_id of the image in the content repository

Partial Call Graph (max 5 caller/called nodes):
%3 email_image::edit_email_image email_image::edit_email_image (public) email_image::add_relation email_image::add_relation email_image::edit_email_image->email_image::add_relation email_image::new_item email_image::new_item (public) email_image::new_item->email_image::add_relation db_exec_plsql db_exec_plsql (public) email_image::add_relation->db_exec_plsql

Testcases:
No testcase defined.

email_image::create_type_folder_rel (public)

 email_image::create_type_folder_rel

Creates a new folder in the content repository with the name and label Email_Images. Also create a new type and register this type to the created folder. Makes a new relation type to associate the item_id (email_image in the content repository) with the user_id.

Partial Call Graph (max 5 caller/called nodes):
%3 content::folder::new content::folder::new (public) content::folder::register_content_type content::folder::register_content_type (public) content::type::new content::type::new (public) rel_types::new rel_types::new (public) email_image::create_type_folder_rel email_image::create_type_folder_rel email_image::create_type_folder_rel->content::folder::new email_image::create_type_folder_rel->content::folder::register_content_type email_image::create_type_folder_rel->content::type::new email_image::create_type_folder_rel->rel_types::new

Testcases:
No testcase defined.

email_image::edit_email_image (public)

 email_image::edit_email_image -user_id user_id -new_email new_email \
    [ -bgcolor bgcolor ] [ -transparent transparent ]

Creates a new email_image of the user with his/her new edited email on it and store it in the content repository under the Email_Images folder. If the user has an image already stored it makes a new revision of the image, if not, it creates a new item with the new image.

Switches:
-user_id (required)
-new_email (required)
-bgcolor (optional)
The background color of the image in the format \#xxxxxx, default to \#ffffff
-transparent (optional)
If you want the background color transparent set it to 1. Default to 1

Partial Call Graph (max 5 caller/called nodes):
%3 packages/acs-subsite/lib/user-info.tcl packages/acs-subsite/ lib/user-info.tcl email_image::edit_email_image email_image::edit_email_image packages/acs-subsite/lib/user-info.tcl->email_image::edit_email_image ad_conn ad_conn (public) email_image::edit_email_image->ad_conn ad_tmpdir ad_tmpdir (public) email_image::edit_email_image->ad_tmpdir content::item::new content::item::new (public) email_image::edit_email_image->content::item::new content::revision::new content::revision::new (public) email_image::edit_email_image->content::revision::new cr_filename_to_mime_type cr_filename_to_mime_type (public) email_image::edit_email_image->cr_filename_to_mime_type

Testcases:
No testcase defined.

email_image::get_email (public)

 email_image::get_email -user_id user_id

Returns the email of the user

Switches:
-user_id (required)

Partial Call Graph (max 5 caller/called nodes):
%3 email_image::edit_email_image email_image::edit_email_image (public) email_image::get_email email_image::get_email email_image::edit_email_image->email_image::get_email email_image::get_user_email email_image::get_user_email (public) email_image::get_user_email->email_image::get_email email_image::new_item email_image::new_item (public) email_image::new_item->email_image::get_email packages/acs-subsite/www/shared/send-email.tcl packages/acs-subsite/ www/shared/send-email.tcl packages/acs-subsite/www/shared/send-email.tcl->email_image::get_email db_string db_string (public) email_image::get_email->db_string

Testcases:
No testcase defined.

email_image::get_folder_id (public)

 email_image::get_folder_id

Returns the folder_id of the folder with the name "Email_Images"

Partial Call Graph (max 5 caller/called nodes):
%3 email_image::edit_email_image email_image::edit_email_image (public) email_image::get_folder_id email_image::get_folder_id email_image::edit_email_image->email_image::get_folder_id email_image::new_item email_image::new_item (public) email_image::new_item->email_image::get_folder_id db_string db_string (public) email_image::get_folder_id->db_string

Testcases:
No testcase defined.

email_image::get_priv_email (public)

 email_image::get_priv_email -user_id user_id \
    [ -subsite_id subsite_id ]

Returns the priv_email field of the user from the users table.

Switches:
-user_id (required)
-subsite_id (optional)

Partial Call Graph (max 5 caller/called nodes):
%3 email_image::get_user_email email_image::get_user_email (public) email_image::get_priv_email email_image::get_priv_email email_image::get_user_email->email_image::get_priv_email packages/acs-subsite/www/user/email-privacy-level.tcl packages/acs-subsite/ www/user/email-privacy-level.tcl packages/acs-subsite/www/user/email-privacy-level.tcl->email_image::get_priv_email ad_conn ad_conn (public) email_image::get_priv_email->ad_conn apm_package_ids_from_key apm_package_ids_from_key (public) email_image::get_priv_email->apm_package_ids_from_key db_string db_string (public) email_image::get_priv_email->db_string email_image::get_priv_email_from_parameter email_image::get_priv_email_from_parameter (private) email_image::get_priv_email->email_image::get_priv_email_from_parameter

Testcases:
No testcase defined.

email_image::get_related_item_id (public)

 email_image::get_related_item_id -user_id user_id

Returns the item_id of the email_image stored in the content repository for user_id.

Switches:
-user_id (required)

Partial Call Graph (max 5 caller/called nodes):
%3 email_image::edit_email_image email_image::edit_email_image (public) email_image::get_related_item_id email_image::get_related_item_id email_image::edit_email_image->email_image::get_related_item_id email_image::get_user_email email_image::get_user_email (public) email_image::get_user_email->email_image::get_related_item_id db_string db_string (public) email_image::get_related_item_id->db_string

Testcases:
No testcase defined.

email_image::get_user_email (public)

 email_image::get_user_email -user_id user_id \
    [ -return_url return_url ] [ -bgcolor bgcolor ] \
    [ -transparent transparent ] [ -subsite_id subsite_id ]

Returns the email in different ways (text level 4, image or text and image level 3, link level 2, ...) according to the priv_email field in the users table. To create an image the ImageMagick software is required, if ImageMagick is not present then the @ symbol in the email will be shown as an image. When creating an image you can choose the background color (In this format \#xxxxxx). Also you can make the background color transparent (1 or 0).

Switches:
-user_id (required)
-return_url (optional)
The url to return when the email is shown as a link
-bgcolor (optional)
The Background color of the image. Default to \#ffffff
-transparent (optional)
If the bgcolor is transparent. Default to 1
-subsite_id (optional)

Partial Call Graph (max 5 caller/called nodes):
%3 packages/acs-subsite/www/members/index.tcl packages/acs-subsite/ www/members/index.tcl email_image::get_user_email email_image::get_user_email packages/acs-subsite/www/members/index.tcl->email_image::get_user_email packages/acs-subsite/www/shared/community-member.tcl packages/acs-subsite/ www/shared/community-member.tcl packages/acs-subsite/www/shared/community-member.tcl->email_image::get_user_email content::item::get_latest_revision content::item::get_latest_revision (public) email_image::get_user_email->content::item::get_latest_revision email_image::get_email email_image::get_email (public) email_image::get_user_email->email_image::get_email email_image::get_priv_email email_image::get_priv_email (public) email_image::get_user_email->email_image::get_priv_email email_image::get_priv_email_from_parameter email_image::get_priv_email_from_parameter (private) email_image::get_user_email->email_image::get_priv_email_from_parameter email_image::get_related_item_id email_image::get_related_item_id (public) email_image::get_user_email->email_image::get_related_item_id

Testcases:
No testcase defined.

email_image::new_item (public)

 email_image::new_item -user_id user_id [ -return_url return_url ] \
    [ -bgcolor bgcolor ] [ -transparent transparent ]

Creates the email_image of the user with his/her email on it and store it in the content repository under the Email_Images folder.

Switches:
-user_id (required)
-return_url (optional)
-bgcolor (optional)
The background color of the image in the format \#xxxxxx, default to \#ffffff
-transparent (optional)
If you want the background color transparent set it to 1. Default to 1

Partial Call Graph (max 5 caller/called nodes):
%3 email_image::get_user_email email_image::get_user_email (public) email_image::new_item email_image::new_item email_image::get_user_email->email_image::new_item ad_conn ad_conn (public) email_image::new_item->ad_conn ad_tmpdir ad_tmpdir (public) email_image::new_item->ad_tmpdir content::item::new content::item::new (public) email_image::new_item->content::item::new content::revision::new content::revision::new (public) email_image::new_item->content::revision::new cr_filename_to_mime_type cr_filename_to_mime_type (public) email_image::new_item->cr_filename_to_mime_type

Testcases:
No testcase defined.

email_image::update_private_p (public)

 email_image::update_private_p -user_id user_id -level level

Changes the priv_email field from the users table

Switches:
-user_id (required)
-level (required)
Change to this level

Partial Call Graph (max 5 caller/called nodes):
%3 packages/acs-subsite/www/user/email-privacy-level.tcl packages/acs-subsite/ www/user/email-privacy-level.tcl email_image::update_private_p email_image::update_private_p packages/acs-subsite/www/user/email-privacy-level.tcl->email_image::update_private_p db_dml db_dml (public) email_image::update_private_p->db_dml db_transaction db_transaction (public) email_image::update_private_p->db_transaction

Testcases:
No testcase defined.
[ show source ]