diff --git a/lib/WebGUI/Attachment.pm b/lib/WebGUI/Attachment.pm index 1c2710ce6..de8f731d4 100644 --- a/lib/WebGUI/Attachment.pm +++ b/lib/WebGUI/Attachment.pm @@ -34,7 +34,7 @@ use WebGUI::Utility; =head1 NAME - Package WebGUI::Attachment +Package WebGUI::Attachment =head1 SYNOPSIS @@ -59,12 +59,12 @@ use WebGUI::Utility; $filename = $attachment->saveFromFilesystem($pathToFile); =head1 DESCRIPTION - - Package to manipulate WebGUI Attachments. + +Package to manipulate WebGUI Attachments. =head1 METHODS - These methods are available from this class: +These methods are available from this class: =cut @@ -73,7 +73,7 @@ use WebGUI::Utility; =head2 box ( ) - Displays the attachment in WebGUI's standard "Attachment Box". +Displays the attachment in WebGUI's standard "Attachment Box". =cut @@ -93,15 +93,19 @@ sub box { =head2 copy ( newNode [, newNodeSub ] ) - Copies an attachment from one node to another. +Copies an attachment from one node to another. + +=over =item newNode - Define the node to copy the attachment to. +Define the node to copy the attachment to. =item newNodeSub - If there is a subordinate element on this node define it here. +If there is a subordinate element on this node define it here. + +=back =cut @@ -142,12 +146,15 @@ sub copy { =head2 createThumbnail ( [ thumbnailSize ] ) - Generates a thumbnail for this attachment. +Generates a thumbnail for this attachment. + +=over =item thumbnailSize - Defaults to the global setting for thumbnail size. However, it - can be overriden with this value. Specified in pixels. +Defaults to the global setting for thumbnail size. However, it can be overriden with this value. Specified in pixels. + +=back =cut @@ -177,7 +184,7 @@ sub createThumbnail { =head2 delete ( ) - Deletes an attachment from its node. +Deletes an attachment from its node. =cut @@ -190,7 +197,7 @@ sub delete { =head2 deleteNode ( ) - Deletes deletes this attachment's node (and everything in it). +Deletes deletes this attachment's node (and everything in it). =cut @@ -203,7 +210,7 @@ sub deleteNode { =head2 getFilename ( ) - Returns the attachment's filename. +Returns the attachment's filename. =cut @@ -216,7 +223,7 @@ sub getFilename { =head2 getIcon ( ) - Returns the full URL to the file icon for this attachment. +Returns the full URL to the file icon for this attachment. =cut @@ -299,7 +306,7 @@ sub getIcon { =head2 getPath ( ) - Returns a full path to an attachment. +Returns a full path to an attachment. =cut @@ -312,7 +319,7 @@ sub getPath { =head2 getSize ( ) - Returns the size of this file. +Returns the size of this file. =cut @@ -336,10 +343,7 @@ sub getSize { =head2 getThumbnail ( ) - Returns a full URL to the thumbnail for this attachment. Thumbnails - are only created for jpg, gif, png, tif, and bmp with Image::Magick - installed so getThumbnail only returns a thumbnail if the file is - one of those types and Image::Magick is installed. +Returns a full URL to the thumbnail for this attachment. Thumbnails are only created for jpg, gif, png, tif, and bmp with Image::Magick installed so getThumbnail only returns a thumbnail if the file is one of those types and Image::Magick is installed. =cut @@ -358,7 +362,7 @@ sub getThumbnail { =head2 getType ( ) - Returns the extension or type of this attachment. +Returns the extension or type of this attachment. =cut @@ -374,7 +378,7 @@ sub getType { =head2 getURL ( ) - Returns a full URL to an attachment. +Returns a full URL to an attachment. =cut @@ -387,7 +391,7 @@ sub getURL { =head2 isImage ( ) - Returns a 1 or 0 depending on whether the file is an image or not. +Returns a 1 or 0 depending on whether the file is an image or not. =cut @@ -399,22 +403,23 @@ sub isImage { =head2 new ( filename, node [, nodeSubordinate ] ) - Constructor. +Constructor. + +=over =item filename - What is the filename for this attachment. If you'll be uploading - the attachment using the "save" method then you may leave this - field blank. +What is the filename for this attachment. If you'll be uploading the attachment using the "save" method then you may leave this field blank. =item node - The node where this attachment is (or will be placed). +The node where this attachment is (or will be placed). =item nodeSubordinate - The subordinate element of the node where this attachment is (or - will be placed). +The subordinate element of the node where this attachment is (or will be placed). + +=back =cut @@ -429,11 +434,15 @@ sub new { =head2 rename ( newFilename ) - Renames an attachment's filename. +Renames an attachment's filename. + +=over =item newFilename - Define the new filename for this attachment. +Define the new filename for this attachment. + +=back =cut @@ -447,13 +456,15 @@ sub rename { =head2 resizeImage ( [ imageSize ] ) - Resizes this attachment to the specified size. Use this method only - if the attachment is an image. +Resizes this attachment to the specified size. Use this method only if the attachment is an image. + +=over =item imageSize - Defaults to the max image size setting. Specify a value in pixels - to resize this image to. +Defaults to the max image size setting. Specify a value in pixels to resize this image to. + +=back =cut @@ -479,28 +490,23 @@ sub resizeImage { =head2 save ( formVariableName [, thumbnailSize, imageSize ] ) - Grabs an attachment from a form POST and saves it to a node. It - then returns the filename of the attachment. +Grabs an attachment from a form POST and saves it to a node. It then returns the filename of the attachment. + +=over =item formVariableName - Provide the form variable name to which the file being uploaded - is assigned. +Provide the form variable name to which the file being uploaded is assigned. =item thumbnailSize - If an image is being uploaded a thumbnail will be generated - automatically. By default, WebGUI will create a thumbnail of the - size specified in the file settings. You can override that - size by specifying one here. Size is measured in pixels of the - longest side. +If an image is being uploaded a thumbnail will be generated automatically. By default, WebGUI will create a thumbnail of the size specified in the file settings. You can override that size by specifying one here. Size is measured in pixels of the longest side. =item imageSize - If a web image (gif, png, jpg, jpeg) is being uploaded it will be - resized if it is larger than this value. By default images are - resized to stay within the contraints of the Max Image Size - setting in the file settings. +If a web image (gif, png, jpg, jpeg) is being uploaded it will be resized if it is larger than this value. By default images are resized to stay within the contraints of the Max Image Size setting in the file settings. + +=back =cut @@ -544,27 +550,23 @@ sub save { =head2 saveFromFilesystem ( pathToFile [, thumbnailSize, imageSize ] ) - Grabs an attachment from the server's file system and saves it to a node. It - then returns the filename of the attachment. +Grabs an attachment from the server's file system and saves it to a node. It then returns the filename of the attachment. + +=over =item pathToFile - Provide the local path to this file. +Provide the local path to this file. =item thumbnailSize - If an image is being grabbed a thumbnail will be generated - automatically. By default, WebGUI will create a thumbnail of the - size specified in the file settings. You can override that - size by specifying one here. Size is measured in pixels of the - longest side. +If an image is being grabbed a thumbnail will be generated automatically. By default, WebGUI will create a thumbnail of the size specified in the file settings. You can override that size by specifying one here. Size is measured in pixels of the longest side. =item imageSize - If a web image (gif, png, jpg, jpeg) is being grabbed it will be - resized if it is larger than this value. By default images are - resized to stay within the contraints of the Max Image Size - setting in the file settings. +If a web image (gif, png, jpg, jpeg) is being grabbed it will be resized if it is larger than this value. By default images are resized to stay within the contraints of the Max Image Size setting in the file settings. + +=back =cut diff --git a/lib/WebGUI/Authentication.pm b/lib/WebGUI/Authentication.pm index 8a8a94750..7a0d0d038 100644 --- a/lib/WebGUI/Authentication.pm +++ b/lib/WebGUI/Authentication.pm @@ -1,14 +1,20 @@ package WebGUI::Authentication; -#------------------------------------------------------------------- -# WebGUI is Copyright 2001-2002 Plain Black LLC. -#------------------------------------------------------------------- -# Please read the legal notices (docs/legal.txt) and the license -# (docs/license.txt) that came with this distribution before using -# this software. -#------------------------------------------------------------------- -# http://www.plainblack.com info@plainblack.com -#------------------------------------------------------------------- +=head1 LEGAL + + ------------------------------------------------------------------- + WebGUI is Copyright 2001-2002 Plain Black LLC. + ------------------------------------------------------------------- + Please read the legal notices (docs/legal.txt) and the license + (docs/license.txt) that came with this distribution before using + this software. + ------------------------------------------------------------------- + http://www.plainblack.com info@plainblack.com + ------------------------------------------------------------------- + +=cut + + use strict qw(vars subs); use WebGUI::ErrorHandler; @@ -16,6 +22,49 @@ use WebGUI::Session; use WebGUI::SQL; +=head1 NAME + +Package WebGUI::Authentication + +=head1 SYNOPSIS + + use WebGUI::Authentication; + + $html = WebGUI::Authentication::adminForm($userId,$authMethod); + WebGUI::Authentication::adminFormSave($userId,$authMethod); + $error = WebGUI::Authentication::adminFormValidate($authMethod); + + $result = WebGUI::Authentication::authenticate($userId,$identifier,$authMethod); + + WebGUI::Authentication::deleteParams($userId); + $params = WebGUI::Authentication::getParams($userId,$authMethod); + WebGUI::Authentication::saveParams($userId,$authMethod,\%data); + + $label = WebGUI::Authentication::optionsLabel($authMethod); + + $html = WebGUI::Authentication::settingsForm($authMethod); + + $html = WebGUI::Authentication::registrationForm(); + WebGUI::Authentication::registrationFormSave($userId); + $error = WebGUI::Authentication::registrationFormValidate(); + + $html = WebGUI::Authentication::userForm(); + WebGUI::Authentication::userFormSave(); + $error = WebGUI::Authentication::userFormValidate(); + +=head1 DESCRIPTION + +This package is used to access WebGUI's pluggable authentication system. + +=head1 METHODS + +These functions are available from this package: + +=cut + + + + #------------------------------------------------------------------- sub _execute { my ($authMethod, $function, $params) = @_; @@ -27,17 +76,21 @@ sub _execute { #------------------------------------------------------------------- -=head adminForm ( userId, authMethod ) +=head2 adminForm ( userId, authMethod ) - Returns the admin form for the specified authentication method. +Returns the admin form for the specified authentication method. + +=over =item userId - This user's id. +This user's id. =item authMethod - Specify the authentication method. +Specify the authentication method. + +=back =cut @@ -49,17 +102,21 @@ sub adminForm { #------------------------------------------------------------------- -=head adminFormSave ( userId, authMethod ) +=head2 adminFormSave ( userId, authMethod ) - Saves the specified user's authentication information to the database. +Saves the specified user's authentication information to the database. + +=over =item userId - The user id to save the information for. +The user id to save the information for. =item authMethod - Specify the authentication method. +Specify the authentication method. + +=back =cut @@ -71,13 +128,17 @@ sub adminFormSave { #------------------------------------------------------------------- -=head adminFormValidate ( authMethod ) +=head2 adminFormValidate ( authMethod ) - Returns an error string if there are any problems with the form data. +Returns an error string if there are any problems with the form data. + +=over =item authMethod - Specify the authentication method. +Specify the authentication method. + +=back =cut @@ -88,23 +149,25 @@ sub adminFormValidate { #------------------------------------------------------------------- -=head authenticate ( userId, identifier, authMethod ) +=head2 authenticate ( userId, identifier, authMethod ) - Check to see that the user supplied information is correct. Returns - "1" if successful otherwise it returns an error message. +Check to see that the user supplied information is correct. Returns "1" if successful otherwise it returns an error message. + +=over =item userId - The user to authenticate. +The user to authenticate. =item identifier - The password, pass phrase, PIN, or other unique identifier to - verify this user. +The password, pass phrase, PIN, or other unique identifier to verify this user. =item authMethod - The type of authentication to use to authenticate this user. +The type of authentication to use to authenticate this user. + +=back =cut @@ -115,15 +178,17 @@ sub authenticate { #------------------------------------------------------------------- -=head deleteParams ( userId ) +=head2 deleteParams ( userId ) - Removes the specified user's authentication parameters from the - database for all authentication methods. This is primarily useful - when deleting the user's account. +Removes the specified user's authentication parameters from the database for all authentication methods. This is primarily useful when deleting the user's account. + +=over =item userId - The user id for the user to have the parameters deleted. +The user id for the user to have the parameters deleted. + +=back =cut @@ -137,18 +202,21 @@ sub deleteParams { #------------------------------------------------------------------- -=head getParams ( userId [ , authMethod ] ) +=head2 getParams ( userId [ , authMethod ] ) - Returns an error string if there are any problems with the form data. +Returns a hash reference with the user's authentication information. + +=over =item userId - Specify a user id. +Specify a user id. =item authMethod - Optionally specify the authentication method. Defaults to the system-wide - authentication method. +Optionally specify the authentication method. Defaults to the system-wide authentication method. + +=back =cut @@ -163,14 +231,17 @@ sub getParams { #------------------------------------------------------------------- -=head optionsLabel ( authMethod ) +=head2 optionsLabel ( authMethod ) - Returns a label that can be displayed to describe the settings for - this auth method. +Returns a label that can be displayed to describe the settings for this auth method. + +=over =item authMethod - The authentication method. +The authentication method. + +=back =cut @@ -182,9 +253,9 @@ sub optionsLabel { #------------------------------------------------------------------- -=head registrationForm ( ) +=head2 registrationForm ( ) - Returns the user registration form for the default auth method. +Returns the user registration form for the default auth method. =cut @@ -195,14 +266,17 @@ sub registrationForm { #------------------------------------------------------------------- -=head registrationFormSave ( userId ) +=head2 registrationFormSave ( userId ) - Creates the appropriate values in the database for this user based - upon their registration information. +Creates the appropriate values in the database for this user based upon their registration information. + +=over =item userId - The user id to store with the registration data. +The user id to store with the registration data. + +=back =cut @@ -213,9 +287,9 @@ sub registrationFormSave { #------------------------------------------------------------------- -=head registrationFormValidate ( ) +=head2 registrationFormValidate ( ) - Returns an error string if there are any problems with the form data. +Returns an error string if there are any problems with the form data. =cut @@ -227,13 +301,17 @@ sub registrationFormValidate { #------------------------------------------------------------------- -=head settingsForm ( authMethod ) +=head2 settingsForm ( authMethod ) - Returns a form for the WebGUI settings area. +Returns a form for the WebGUI settings area. + +=over =item authMethod - The authentication method to display the form for. +The authentication method to display the form for. + +=back =cut @@ -245,21 +323,25 @@ sub settingsForm { #------------------------------------------------------------------- -=head saveParams ( userId, authMethod, data ) +=head2 saveParams ( userId, authMethod, data ) - Saves the user's authentication parameters to the database. +Saves the user's authentication parameters to the database. + +=over =item userId - Specify a user id. +Specify a user id. =item authMethod - Specify the authentication method to save these paramaters under. +Specify the authentication method to save these paramaters under. =item data - A hash reference containing parameter names and values to be saved. +A hash reference containing parameter names and values to be saved. + +=back =cut @@ -276,9 +358,9 @@ sub saveParams { #------------------------------------------------------------------- -=head userForm ( ) +=head2 userForm ( ) - Returns the user authentication data form. +Returns the user authentication data form. =cut @@ -290,9 +372,9 @@ sub userForm { #------------------------------------------------------------------- -=head userFormSave ( ) +=head2 userFormSave ( ) - Saves user form data to the database. +Saves user form data to the database. =cut @@ -303,9 +385,9 @@ sub userFormSave { #------------------------------------------------------------------- -=head userFormValidate ( ) +=head2 userFormValidate ( ) - Returns an error string if there are any problems with the form data. +Returns an error string if there are any problems with the form data. =cut diff --git a/lib/WebGUI/DateTime.pm b/lib/WebGUI/DateTime.pm index d1fd96658..938a7be66 100644 --- a/lib/WebGUI/DateTime.pm +++ b/lib/WebGUI/DateTime.pm @@ -28,7 +28,7 @@ our @EXPORT = qw(&localtime &time &addToTime &addToDate &epochToHuman &epochToSe =head1 NAME - Package WebGUI::DateTime +Package WebGUI::DateTime =head1 SYNOPSIS @@ -50,12 +50,11 @@ our @EXPORT = qw(&localtime &time &addToTime &addToDate &epochToHuman &epochToSe =head1 DESCRIPTION - This package provides easy to use date math functions, which are - normally a complete pain. +This package provides easy to use date math functions, which are normally a complete pain. =head1 METHODS - These functions are available from this package: +These functions are available from this package: =cut @@ -66,23 +65,27 @@ our @EXPORT = qw(&localtime &time &addToTime &addToDate &epochToHuman &epochToSe =head2 addToDate ( epoch [ , years, months, days ] ) - Returns an epoch date with the amount of time added. +Returns an epoch date with the amount of time added. + +=over =item epoch - The number of seconds since January 1, 1970. +The number of seconds since January 1, 1970. =item years - The number of years to add to the epoch. +The number of years to add to the epoch. =item months - The number of months to add to the epoch. +The number of months to add to the epoch. =item days - The number of days to add to the epoch. +The number of days to add to the epoch. + +=back =cut @@ -98,23 +101,27 @@ sub addToDate { =head2 addToTime ( epoch [ , hours, minutes, seconds ] ) - Returns an epoch date with the amount of time added. +Returns an epoch date with the amount of time added. + +=over =item epoch - The number of seconds since January 1, 1970. +The number of seconds since January 1, 1970. =item hours - The number of hours to add to the epoch. +The number of hours to add to the epoch. =item minutes - The number of minutes to add to the epoch. +The number of minutes to add to the epoch. =item seconds - The number of seconds to add to the epoch. +The number of seconds to add to the epoch. + +=back =cut @@ -130,11 +137,15 @@ sub addToTime { =head2 dayStartEnd ( epoch ) - Returns the epoch dates for the start and end of the day. +Returns the epoch dates for the start and end of the day. + +=over =item epoch - The number of seconds since January 1, 1970. +The number of seconds since January 1, 1970. + +=back =cut @@ -150,16 +161,17 @@ sub dayStartEnd { =head2 epochToHuman ( [ epoch, format ] ) - Returns a formated date string. +Returns a formated date string. + +=over =item epoch - The number of seconds since January 1, 1970. Defaults to NOW! +The number of seconds since January 1, 1970. Defaults to NOW! =item format - A string representing the output format for the date. Defaults to - '%z %Z'. You can use the following to format your date string: +A string representing the output format for the date. Defaults to '%z %Z'. You can use the following to format your date string: %% = % (percent) symbol. %c = The calendar month name. @@ -181,6 +193,8 @@ sub dayStartEnd { %z = The current user's date format preference. %Z = The current user's time format preference. +=back + =cut sub epochToHuman { @@ -253,12 +267,15 @@ sub epochToHuman { =head2 epochToSet ( epoch ) - Returns a set date (used by WebGUI::HTMLForm->date) in the format - of MM/DD/YYYY. +Returns a set date (used by WebGUI::HTMLForm->date) in the format of MM/DD/YYYY. + +=over =item epoch - The number of seconds since January 1, 1970. +The number of seconds since January 1, 1970. + +=back =cut @@ -270,12 +287,15 @@ sub epochToSet { =head2 getMonthName ( month ) - Returns a string containing the calendar month name in the language - of the current user. +Returns a string containing the calendar month name in the language of the current user. + +=over =item month - An integer ranging from 1-12 representing the month. +An integer ranging from 1-12 representing the month. + +=back =cut @@ -311,13 +331,15 @@ sub getMonthName { =head2 getDayName ( day ) - Returns a string containing the weekday name in the language of the - current user. +Returns a string containing the weekday name in the language of the current user. + +=over =item day - An integer ranging from 1-7 representing the day of the week (Sunday - is 1 and Saturday is 7). +An integer ranging from 1-7 representing the day of the week (Sunday is 1 and Saturday is 7). + +=back =cut @@ -344,11 +366,15 @@ sub getDayName { =head2 humanToEpoch ( date ) - Returns an epoch date derived from the human date. +Returns an epoch date derived from the human date. + +=over =item date - The human date string. YYYY-MM-DD HH:MM:SS +The human date string. YYYY-MM-DD HH:MM:SS + +=back =cut @@ -371,16 +397,19 @@ sub humanToEpoch { =head2 intervalToSeconds ( interval, units ) - Returns the number of seconds derived from the interval. +Returns the number of seconds derived from the interval. + +=over =item interval - An integer which represents the amount of time for the interval. +An integer which represents the amount of time for the interval. =item units - A string which represents the units of the interval. The string - must be 'years', 'months', 'days', 'hours', 'minutes', or 'seconds'. +A string which represents the units of the interval. The string must be 'years', 'months', 'days', 'hours', 'minutes', or 'seconds'. + +=back =cut @@ -406,13 +435,15 @@ sub intervalToSeconds { =head2 localtime ( epoch ) - Returns an array of time elements. The elements are: years, months, - days, hours, minutes, seconds, day of year, day of week, daylight - savings time. +Returns an array of time elements. The elements are: years, months, days, hours, minutes, seconds, day of year, day of week, daylight savings time. + +=over =item epoch - The number of seconds since January 1, 1970. +The number of seconds since January 1, 1970. + +=back =cut @@ -423,16 +454,19 @@ sub localtime { #------------------------------------------------------------------- =head2 monthCount ( startEpoch, endEpoch ) - Returns the number of months between the start and end dates - (inclusive). +Returns the number of months between the start and end dates (inclusive). + +=over =item startEpoch - An epoch datestamp corresponding to the first month. +An epoch datestamp corresponding to the first month. =item endEpoch - An epoch datestamp corresponding to the last month. +An epoch datestamp corresponding to the last month. + +=back =cut @@ -448,11 +482,15 @@ sub monthCount { =head2 monthStartEnd ( epoch ) - Returns the epoch dates for the start and end of the month. +Returns the epoch dates for the start and end of the month. + +=over =item epoch - The number of seconds since January 1, 1970. +The number of seconds since January 1, 1970. + +=back =cut @@ -469,12 +507,15 @@ sub monthStartEnd { =head2 secondsToInterval ( seconds ) - Returns an interval and units derived the number of seconds. +Returns an interval and units derived the number of seconds. + +=over =item seconds - The number of seconds in the interval. +The number of seconds in the interval. +=back =cut @@ -509,11 +550,15 @@ sub secondsToInterval { =head2 setToEpoch ( set ) - Returns an epoch date. +Returns an epoch date. + +=over =item set - A string in the format of MM/DD/YYYY. +A string in the format of MM/DD/YYYY. + +=back =cut @@ -542,7 +587,7 @@ sub setToEpoch { =head2 time ( ) - Returns an epoch date. +Returns an epoch date for now. =cut diff --git a/lib/WebGUI/Discussion.pm b/lib/WebGUI/Discussion.pm index 0f1b9ec98..bec6dc523 100644 --- a/lib/WebGUI/Discussion.pm +++ b/lib/WebGUI/Discussion.pm @@ -28,10 +28,7 @@ use WebGUI::User; =head1 WebGUI Discussions - This package implements WebGUI's discussion system. However it is - outdated and cludgy. We recommend not coding any new systems against - this package, but instead wait for the new package that will be - created in 6.0.0. +This package implements WebGUI's discussion system. However it is outdated and cludgy. We recommend not coding any new systems against this package, but instead wait for the new package that will be created in 6.0.0. =cut diff --git a/lib/WebGUI/ErrorHandler.pm b/lib/WebGUI/ErrorHandler.pm index feb1aa9f0..5501df8f5 100644 --- a/lib/WebGUI/ErrorHandler.pm +++ b/lib/WebGUI/ErrorHandler.pm @@ -18,9 +18,9 @@ use FileHandle; use WebGUI::Session; -=head1 NAME +=head1 NAME - Package WebGUI::ErrorHandler +WebGUI::ErrorHandler =head1 SYNOPSIS @@ -32,11 +32,11 @@ use WebGUI::Session; =head1 DESCRIPTION - This package provides simple but effective error handling and logging for WebGUI. +This package provides simple but effective error handling and logging for WebGUI. =head1 METHODS - These functions are available from this package: +These functions are available from this package: =cut @@ -46,11 +46,15 @@ use WebGUI::Session; =head2 audit ( message ) - Inserts an AUDIT type message into the WebGUI log. +Inserts an AUDIT type message into the WebGUI log. + +=over =item message - Whatever message you wish to insert into the log. +Whatever message you wish to insert into the log. + +=back =cut @@ -67,10 +71,7 @@ sub audit { =head2 fatalError ( ) - Outputs an error message to the user and logs an error. Should only - be called if the system cannot recover from an error, or if it would - be unsafe to attempt to recover from an error (like compile errors - or database errors). +Outputs an error message to the user and logs an error. Should only be called if the system cannot recover from an error, or if it would be unsafe to attempt to recover from an error (like compile errors or database errors). =cut @@ -159,11 +160,15 @@ sub fatalError { =head2 security ( message ) - Adds a SECURITY type message to the log. +Adds a SECURITY type message to the log. + +=over =item message - The message you wish to add to the log. +The message you wish to add to the log. + +=back =cut @@ -181,11 +186,15 @@ sub security { =head2 warn ( message ) - Adds a WARNING type message to the log. +Adds a WARNING type message to the log. + +=over =item message - The message you wish to add to the log. +The message you wish to add to the log. + +=back =cut diff --git a/lib/WebGUI/Form.pm b/lib/WebGUI/Form.pm index 753c4b92b..129ce5d04 100644 --- a/lib/WebGUI/Form.pm +++ b/lib/WebGUI/Form.pm @@ -25,7 +25,7 @@ use WebGUI::URL; =head1 NAME - Package WebGUI::Form +Package WebGUI::Form =head1 SYNOPSIS @@ -60,14 +60,11 @@ use WebGUI::URL; =head1 DESCRIPTION - Base forms package. Eliminates some of the normal code work that goes - along with creating forms. Used by the HTMLForm package. +Base forms package. Eliminates some of the normal code work that goes along with creating forms. Used by the HTMLForm package. =head1 FUNCTIONS - All of the functions in this package accept the input of a hash - reference containing the parameters to populate the form element. - These functions are available from this package: +All of the functions in this package accept the input of a hash reference containing the parameters to populate the form element. These functions are available from this package: =cut @@ -89,27 +86,29 @@ sub _fixSpecialCharacters { =head2 checkbox ( hashRef ) - Returns a checkbox form element. +Returns a checkbox form element. + +=over =item name - The name field for this form element. +The name field for this form element. =item checked - If you'd like this box to be defaultly checked, set this to "1". +If you'd like this box to be defaultly checked, set this to "1". =item value - The default value for this form element. Defaults to "1". +The default value for this form element. Defaults to "1". =item extras - If you want to add anything special to this form element like - javascript actions, or stylesheet information, you'd add it in - here as follows: +If you want to add anything special to this form element like javascript actions, or stylesheet information, you'd add it in here as follows: - 'onChange="this.form.submit()"' + 'onChange="this.form.submit()"' + +=back =cut @@ -124,33 +123,33 @@ sub checkbox { =head2 checkList ( hashRef ) - Returns checkbox list. +Returns checkbox list. + +=over =item name - The name field for this form element. +The name field for this form element. =item options - The list of options for this list. Should be passed as a - hash reference. + +The list of options for this list. Should be passed as a hash reference. =item value - The default value(s) for this form element. This should be passed - as an array reference. +The default value(s) for this form element. This should be passed as an array reference. =item vertical - If set to "1" the radio button elements will be laid out - horizontally. Defaults to "0". +If set to "1" the radio button elements will be laid out horizontally. Defaults to "0". =item extras - If you want to add anything special to this form element like - javascript actions, or stylesheet information, you'd add it in - here as follows: +If you want to add anything special to this form element like javascript actions, or stylesheet information, you'd add it in here as follows: - 'onChange="this.form.submit()"' + 'onChange="this.form.submit()"' + +=back =cut @@ -183,39 +182,37 @@ sub checkList { =head2 combo ( hashRef ) - Returns a select list and a text field. If the - text box is filled out it will have a value stored in "name"_new. +Returns a select list and a text field. If the text box is filled out it will have a value stored in "name"_new. + +=over =item name The name field for this form element. =item options - The list of options for the select list. Should be passed as a - hash reference. + +The list of options for the select list. Should be passed as a hash reference. =item value - The default value(s) for this form element. This should be passed - as an array reference. +The default value(s) for this form element. This should be passed as an array reference. =item size - The number of characters tall this form element should be. Defaults - to "1". +The number of characters tall this form element should be. Defaults to "1". =item multiple - A boolean value for whether this select list should allow multiple - selections. Defaults to "0". +A boolean value for whether this select list should allow multiple selections. Defaults to "0". =item extras - If you want to add anything special to this form element like - javascript actions, or stylesheet information, you'd add it in - here as follows: +If you want to add anything special to this form element like javascript actions, or stylesheet information, you'd add it in here as follows: - 'onChange="this.form.submit()"' + 'onChange="this.form.submit()"' + +=back =cut @@ -239,33 +236,33 @@ sub combo { =head2 date ( hashRef ) - Returns a date field. +Returns a date field. + +=over =item name - The name field for this form element. +The name field for this form element. =item value - The default date. Pass as an epoch value. Defaults to today. +The default date. Pass as an epoch value. Defaults to today. =item extras - If you want to add anything special to this form element like - javascript actions, or stylesheet information, you'd add it in - here as follows: +If you want to add anything special to this form element like javascript actions, or stylesheet information, you'd add it in here as follows: - 'onChange="this.form.submit()"' + 'onChange="this.form.submit()"' =item size - The number of characters wide this form element should be. There - should be no reason for anyone to specify this. +The number of characters wide this form element should be. There should be no reason for anyone to specify this. =item noDate - By default a date is placed in the "value" field. Set this to "1" - to turn off the default date. +By default a date is placed in the "value" field. Set this to "1" to turn off the default date. + +=back =cut @@ -294,32 +291,33 @@ sub date { =head2 email ( hashRef ) - Returns an email address field. +Returns an email address field. + +=over =item name - The name field for this form element. +The name field for this form element. =item value - The default value for this form element. +The default value for this form element. =item maxlength - The maximum number of characters to allow in this form element. +The maximum number of characters to allow in this form element. =item extras - If you want to add anything special to this form element like - javascript actions, or stylesheet information, you'd add it in - here as follows: +If you want to add anything special to this form element like javascript actions, or stylesheet information, you'd add it in here as follows: - 'onChange="this.form.submit()"' + 'onChange="this.form.submit()"' =item size - The number of characters wide this form element should be. There - should be no reason for anyone to specify this. +The number of characters wide this form element should be. There should be no reason for anyone to specify this. + +=back =cut @@ -339,41 +337,37 @@ sub email { =head2 fieldType ( hashRef ) - Returns a field type select list field. This is primarily useful for - building dynamic form builders. +Returns a field type select list field. This is primarily useful for building dynamic form builders. + +=over =item name - The name field for this form element. +The name field for this form element. =item types - An array reference of field types to be displayed. The field names - are the names of the methods from this forms package. Note that not - all field types are supported. +An array reference of field types to be displayed. The field names are the names of the methods from this forms package. Note that not all field types are supported. =item value - The default value(s) for this form element. This should be passed - as an array reference. +The default value(s) for this form element. This should be passed as an array reference. =item size - The number of characters tall this form element should be. Defaults - to "1". +The number of characters tall this form element should be. Defaults to "1". =item multiple - A boolean value for whether this select list should allow multiple - selections. Defaults to "0". +A boolean value for whether this select list should allow multiple selections. Defaults to "0". =item extras - If you want to add anything special to this form element like - javascript actions, or stylesheet information, you'd add it in - here as follows: +If you want to add anything special to this form element like javascript actions, or stylesheet information, you'd add it in here as follows: - 'onChange="this.form.submit()"' + 'onChange="this.form.submit()"' + +=back =cut @@ -421,24 +415,25 @@ sub fieldType { =head2 file ( hashRef ) - Returns a file upload field. +Returns a file upload field. + +=over =item name - The name field for this form element. +The name field for this form element. =item extras - If you want to add anything special to this form element like - javascript actions, or stylesheet information, you'd add it in - here as follows: +If you want to add anything special to this form element like javascript actions, or stylesheet information, you'd add it in here as follows: - 'onChange="this.form.submit()"' + 'onChange="this.form.submit()"' =item size - The number of characters wide this form element should be. There - should be no reason for anyone to specify this. +The number of characters wide this form element should be. There should be no reason for anyone to specify this. + +=back =cut @@ -452,24 +447,27 @@ sub file { =head2 formHeader ( hashRef ) - Returns a form header. +Returns a form header. + +=over =item action - The form action. Defaults to the current page. +The form action. Defaults to the current page. =item method - The form method. Defaults to "POST". +The form method. Defaults to "POST". =item enctype - The form enctype. Defaults to "multipart/form-data". +The form enctype. Defaults to "multipart/form-data". =item extras - If you want to add anything special to the form header like - javascript actions or stylesheet info, then use this. +If you want to add anything special to the form header like javascript actions or stylesheet info, then use this. + +=back =cut @@ -486,34 +484,33 @@ sub formHeader { =head2 group ( hashRef ] ) - Returns a group pull-down field. A group pull down - provides a select list that provides name value pairs for all the - groups in the WebGUI system. +Returns a group pull-down field. A group pull down provides a select list that provides name value pairs for all the groups in the WebGUI system. + +=over =item name - The name field for this form element. +The name field for this form element. =item value - The selected group id(s) for this form element. This should be passed - as an array reference. Defaults to "7" (Everyone). +The selected group id(s) for this form element. This should be passed as an array reference. Defaults to "7" (Everyone). =item size - How many rows should be displayed at once? +How many rows should be displayed at once? =item multiple - Set to "1" if multiple groups should be selectable. +Set to "1" if multiple groups should be selectable. =item extras - If you want to add anything special to this form element like - javascript actions, or stylesheet information, you'd add it in - here as follows: +If you want to add anything special to this form element like javascript actions, or stylesheet information, you'd add it in here as follows: - 'onChange="this.form.submit()"' + 'onChange="this.form.submit()"' + +=back =cut @@ -540,15 +537,19 @@ sub group { =head2 hidden ( hashRef ) - Returns a hidden field. +Returns a hidden field. + +=over =item name - The name field for this form element. +The name field for this form element. =item value - The default value for this form element. +The default value for this form element. + +=back =cut @@ -561,22 +562,23 @@ sub hidden { =head2 hiddenList ( hashRef ) - Returns a list of hidden fields. This is primarily to be used by - the HTMLForm package, but we decided to make it a public method - in case anybody else had a use for it. +Returns a list of hidden fields. This is primarily to be used by the HTMLForm package, but we decided to make it a public method in case anybody else had a use for it. + +=over =item name - The name of this field. +The name of this field. =item options - A hash reference where the key is the "name" of the hidden field. +A hash reference where the key is the "name" of the hidden field. =item value - An array reference where each value in the array should be a name - from the hash (if you want it to show up in the hidden list). +An array reference where each value in the array should be a name from the hash (if you want it to show up in the hidden list). + +=back =cut @@ -601,41 +603,37 @@ sub hiddenList { =head2 HTMLArea ( hashRef ) - Returns an HTML area. An HTML area is different than - a standard text area in that it provides rich edit functionality - and some special error trapping for HTML and other special - characters. +Returns an HTML area. An HTML area is different than a standard text area in that it provides rich edit functionality and some special error trapping for HTML and other special characters. + +=over =item name - The name field for this form element. +The name field for this form element. =item value - The default value for this form element. +The default value for this form element. =item extras - If you want to add anything special to this form element like - javascript actions, or stylesheet information, you'd add it in - here as follows: +If you want to add anything special to this form element like javascript actions, or stylesheet information, you'd add it in here as follows: - 'onChange="this.form.submit()"' + 'onChange="this.form.submit()"' =item wrap - The method for wrapping text in the text area. Defaults to - "virtual". There should be almost no reason to specify this. +The method for wrapping text in the text area. Defaults to "virtual". There should be almost no reason to specify this. =item rows - The number of characters tall this form element should be. There - should be no reason for anyone to specify this. +The number of characters tall this form element should be. There should be no reason for anyone to specify this. =item columns - The number of characters wide this form element should be. There - should be no reason for anyone to specify this. +The number of characters wide this form element should be. There should be no reason for anyone to specify this. + +=back =cut @@ -720,33 +718,33 @@ sub HTMLArea { =head2 integer ( hashRef ) - Returns an integer field. +Returns an integer field. + +=over =item name - The name field for this form element. +The name field for this form element. =item value - The default value for this form element. +The default value for this form element. =item maxlength - The maximum number of characters to allow in this form element. - Defaults to 11. +The maximum number of characters to allow in this form element. Defaults to 11. =item extras - If you want to add anything special to this form element like - javascript actions, or stylesheet information, you'd add it in - here as follows: +If you want to add anything special to this form element like javascript actions, or stylesheet information, you'd add it in here as follows: - 'onChange="this.form.submit()"' + 'onChange="this.form.submit()"' =item size - The number of characters wide this form element should be. There - should be no reason for anyone to specify this. +The number of characters wide this form element should be. There should be no reason for anyone to specify this. + +=back =cut @@ -780,32 +778,29 @@ sub integer { =head2 interval ( hashRef ) - Returns a time interval field. +Returns a time interval field. + +=over =item name - The the base name for this form element. This form element actually - returns two values under different names. They are name_interval and - name_units. +The the base name for this form element. This form element actually returns two values under different names. They are name_interval and name_units. =item intervalValue - The default value for interval portion of this form element. Defaults - to '1'. +The default value for interval portion of this form element. Defaults to '1'. =item unitsValue - The default value for units portion of this form element. Defaults - to 'seconds'. Possible values are 'seconds', 'minutes', 'hours', - 'days', 'weeks', 'months', and 'years'. +The default value for units portion of this form element. Defaults to 'seconds'. Possible values are 'seconds', 'minutes', 'hours', 'days', 'weeks', 'months', and 'years'. =item extras - If you want to add anything special to this form element like - javascript actions, or stylesheet information, you'd add it in - here as follows: +If you want to add anything special to this form element like javascript actions, or stylesheet information, you'd add it in here as follows: - 'onChange="this.form.submit()"' + 'onChange="this.form.submit()"' + +=back =cut @@ -839,34 +834,33 @@ sub interval { =head2 password ( hashRef ) - Returns a password field. +Returns a password field. + +=over =item name - The name field for this form element. +The name field for this form element. =item value - The default value for this form element. +The default value for this form element. =item maxlength - The maximum number of characters to allow in this form element. - Defaults to "35". +The maximum number of characters to allow in this form element. Defaults to "35". =item extras - If you want to add anything special to this form element like - javascript actions, or stylesheet information, you'd add it in - here as follows: +If you want to add anything special to this form element like javascript actions, or stylesheet information, you'd add it in here as follows: - 'onChange="this.form.submit()"' + 'onChange="this.form.submit()"' =item size - The number of characters wide this form element should be. There - should be no reason for anyone to specify this. Defaults to "30" - unless overridden in the settings. +The number of characters wide this form element should be. There should be no reason for anyone to specify this. Defaults to "30" unless overridden in the settings. + +=back =cut @@ -883,32 +877,33 @@ sub password { =head2 phone ( hashRef ) - Returns a phone field. +Returns a telephone number field. + +=over =item name - The name field for this form element. +The name field for this form element. =item value - The default value for this form element. +The default value for this form element. =item maxlength - The maximum number of characters to allow in this form element. +The maximum number of characters to allow in this form element. =item extras - If you want to add anything special to this form element like - javascript actions, or stylesheet information, you'd add it in - here as follows: +If you want to add anything special to this form element like javascript actions, or stylesheet information, you'd add it in here as follows: - 'onChange="this.form.submit()"' + 'onChange="this.form.submit()"' =item size - The number of characters wide this form element should be. There - should be no reason for anyone to specify this. +The number of characters wide this form element should be. There should be no reason for anyone to specify this. + +=back =cut @@ -928,27 +923,30 @@ sub phone { =head2 radio ( hashRef ) - Returns a radio button. +Returns a radio button. + +=over =item name - The name field for this form element. +The name field for this form element. =item checked - If you'd like this radio button to be defaultly checked, set this to "1". +If you'd like this radio button to be defaultly checked, set this to "1". =item value - The default value for this form element. +The default value for this form element. =item extras - If you want to add anything special to this form element like - javascript actions, or stylesheet information, you'd add it in - here as follows: +If you want to add anything special to this form element like javascript actions, or stylesheet information, you'd add it in here as follows: - 'onChange="this.form.submit()"' + 'onChange="this.form.submit()"' + + +=back =cut @@ -962,33 +960,33 @@ sub radio { =head2 radioList ( hashRef ) - Returns a radio button list field. +Returns a radio button list field. + +=over =item name - The name field for this form element. +The name field for this form element. =item options - The list of options for this list. Should be passed as a - hash reference. +The list of options for this list. Should be passed as a hash reference. =item value - The default value for this form element. +The default value for this form element. =item vertical - If set to "1" the radio button elements will be laid out - horizontally. Defaults to "0". +If set to "1" the radio button elements will be laid out horizontally. Defaults to "0". =item extras - If you want to add anything special to this form element like - javascript actions, or stylesheet information, you'd add it in - here as follows: +If you want to add anything special to this form element like javascript actions, or stylesheet information, you'd add it in here as follows: - 'onChange="this.form.submit()"' + 'onChange="this.form.submit()"' + +=back =cut @@ -1015,39 +1013,37 @@ sub radioList { =head2 selectList ( hashRef ) - Returns a select list field. +Returns a select list field. + +=over =item name - The name field for this form element. +The name field for this form element. =item options - The list of options for this select list. Should be passed as a - hash reference. +The list of options for this select list. Should be passed as a hash reference. =item value - The default value(s) for this form element. This should be passed - as an array reference. +The default value(s) for this form element. This should be passed as an array reference. =item size - The number of characters tall this form element should be. Defaults - to "1". +The number of characters tall this form element should be. Defaults to "1". =item multiple - A boolean value for whether this select list should allow multiple - selections. Defaults to "0". +A boolean value for whether this select list should allow multiple selections. Defaults to "0". =item extras - If you want to add anything special to this form element like - javascript actions, or stylesheet information, you'd add it in - here as follows: +If you want to add anything special to this form element like javascript actions, or stylesheet information, you'd add it in here as follows: - 'onChange="this.form.submit()"' + 'onChange="this.form.submit()"' + +=back =cut @@ -1073,19 +1069,21 @@ sub selectList { =head2 submit ( hashRef ) - Returns a submit button. +Returns a submit button. + +=over =item value - The button text for this submit button. Defaults to "save". +The button text for this submit button. Defaults to "save". =item extras - If you want to add anything special to this form element like - javascript actions, or stylesheet information, you'd add it in - here as follows: +If you want to add anything special to this form element like javascript actions, or stylesheet information, you'd add it in here as follows: - 'onChange="this.form.submit()"' + 'onChange="this.form.submit()"' + +=back =cut @@ -1101,20 +1099,23 @@ sub submit { =head2 template ( hashRef ) - Returns a select list of templates. +Returns a select list of templates. + +=over =item name - The name field for this form element. +The name field for this form element. =item value - The unique identifier for the selected template. Defaults to "1". +The unique identifier for the selected template. Defaults to "1". =item namespace - The namespace for the list of templates to return. If this is - omitted, all templates will be displayed. +The namespace for the list of templates to return. If this is omitted, all templates will be displayed. + +=back =cut @@ -1132,32 +1133,33 @@ sub template { =head2 text ( hashRef ) - Returns a text input field. +Returns a text input field. + +=over =item name - The name field for this form element. +The name field for this form element. =item value - The default value for this form element. +The default value for this form element. =item maxlength - The maximum number of characters to allow in this form element. +The maximum number of characters to allow in this form element. =item extras - If you want to add anything special to this form element like - javascript actions, or stylesheet information, you'd add it in - here as follows: +If you want to add anything special to this form element like javascript actions, or stylesheet information, you'd add it in here as follows: - 'onChange="this.form.submit()"' + 'onChange="this.form.submit()"' =item size - The number of characters wide this form element should be. There - should be no reason for anyone to specify this. +The number of characters wide this form element should be. There should be no reason for anyone to specify this. + +=back =cut @@ -1175,39 +1177,38 @@ sub text { =head2 textarea ( hashRef ) - Returns a text area field. +Returns a text area field. + +=over =item name - The name field for this form element. +The name field for this form element. =item value - The default value for this form element. +The default value for this form element. =item extras - If you want to add anything special to this form element like - javascript actions, or stylesheet information, you'd add it in - here as follows: +If you want to add anything special to this form element like javascript actions, or stylesheet information, you'd add it in here as follows: - 'onChange="this.form.submit()"' + 'onChange="this.form.submit()"' =item wrap - The method for wrapping text in the text area. Defaults to - "virtual". There should be almost no reason to specify this. +The method for wrapping text in the text area. Defaults to "virtual". There should be almost no reason to specify this. =item rows - The number of characters tall this form element should be. There - should be no reason for anyone to specify this. +The number of characters tall this form element should be. There should be no reason for anyone to specify this. =item columns - The number of characters wide this form element should be. There - should be no reason for anyone to specify this. - +The number of characters wide this form element should be. There should be no reason for anyone to specify this. + +=back + =cut sub textarea { @@ -1226,33 +1227,33 @@ sub textarea { =head2 url ( hashRef ) - Returns a URL field. +Returns a URL field. + +=over =item name - The name field for this form element. +The name field for this form element. =item value - The default value for this form element. +The default value for this form element. =item maxlength - The maximum number of characters to allow in this form element. - Defaults to 2048. +The maximum number of characters to allow in this form element. Defaults to 2048. =item extras - If you want to add anything special to this form element like - javascript actions, or stylesheet information, you'd add it in - here as follows: +If you want to add anything special to this form element like javascript actions, or stylesheet information, you'd add it in here as follows: - 'onChange="this.form.submit()"' + 'onChange="this.form.submit()"' =item size - The number of characters wide this form element should be. There - should be no reason for anyone to specify this. +The number of characters wide this form element should be. There should be no reason for anyone to specify this. + +=back =cut @@ -1276,28 +1277,29 @@ sub url { =head2 whatNext ( hashRef ] ) - Returns a "What next?" select list for use with chained action forms - in WebGUI. +Returns a "What next?" select list for use with chained action forms in WebGUI. + +=over =item options - A hash reference of the possible actions that could happen next. +A hash reference of the possible actions that could happen next. =item value - The selected element in this list. +The selected element in this list. =item name - The name field for this form element. Defaults to "proceed". +The name field for this form element. Defaults to "proceed". =item extras - If you want to add anything special to this form element like - javascript actions, or stylesheet information, you'd add it in - here as follows: +If you want to add anything special to this form element like javascript actions, or stylesheet information, you'd add it in here as follows: - 'onChange="this.form.submit()"' + 'onChange="this.form.submit()"' + +=back =cut @@ -1317,24 +1319,25 @@ sub whatNext { =head2 yesNo ( hashRef ) - Returns a yes/no radio field. +Returns a yes/no radio field. + +=over =item name - The name field for this form element. +The name field for this form element. =item value - The default value(s) for this form element. Valid values are "1" - and "0". Defaults to "1". +The default value(s) for this form element. Valid values are "1" and "0". Defaults to "1". =item extras - If you want to add anything special to this form element like - javascript actions, or stylesheet information, you'd add it in - here as follows: +If you want to add anything special to this form element like javascript actions, or stylesheet information, you'd add it in here as follows: - 'onChange="this.form.submit()"' + 'onChange="this.form.submit()"' + +=back =cut @@ -1367,32 +1370,33 @@ sub yesNo { =head2 zipcode ( hashRef ) - Returns a zip code field. +Returns a zip code field. + +=over =item name - The name field for this form element. +The name field for this form element. =item value - The default value for this form element. +The default value for this form element. =item maxlength - The maximum number of characters to allow in this form element. +The maximum number of characters to allow in this form element. =item extras - If you want to add anything special to this form element like - javascript actions, or stylesheet information, you'd add it in - here as follows: +If you want to add anything special to this form element like javascript actions, or stylesheet information, you'd add it in here as follows: - 'onChange="this.form.submit()"' + 'onChange="this.form.submit()"' =item size - The number of characters wide this form element should be. There - should be no reason for anyone to specify this. +The number of characters wide this form element should be. There should be no reason for anyone to specify this. + +=back =cut diff --git a/lib/WebGUI/HTML.pm b/lib/WebGUI/HTML.pm index 522bdd8ff..8f4aeb542 100644 --- a/lib/WebGUI/HTML.pm +++ b/lib/WebGUI/HTML.pm @@ -20,7 +20,7 @@ use WebGUI::Session; =head1 NAME - Package WebGUI::HTML +Package WebGUI::HTML =head1 SYNOPSIS @@ -30,11 +30,11 @@ use WebGUI::Session; =head1 DESCRIPTION - A package for manipulating and massaging HTML. +A package for manipulating and massaging HTML. =head1 METHODS - These methods are available from this package: +These methods are available from this package: =cut @@ -43,16 +43,17 @@ use WebGUI::Session; =head2 cleanSegment ( html ) - Returns an HTML segment that has been stripped of the
tag - and anything before it, as well as the tag and anything - after it. +Returns an HTML segment that has been stripped of the tag and anything before it, as well as the tag and anything after it. - NOTE: This filter does have one exception, it leaves anything before - the tag that is enclosed in tags. +NOTE: This filter does have one exception, it leaves anything before the tag that is enclosed in tags. + +=over =item html - The HTML segment you want cleaned. +The HTML segment you want cleaned. + +=back =cut @@ -73,18 +74,19 @@ sub cleanSegment { =head2 filter ( html [, filter ] ) - Returns HTML with unwanted tags filtered out. +Returns HTML with unwanted tags filtered out. + +=over =item html - The HTML content you want filtered. +The HTML content you want filtered. =item filter - Choose from all, none, javascript, or most. Defaults to most. - All removes all HTML tags; none removes no HTML tags; javascript - removes all references to javacript; and most removes all but - simple formatting tags like bold and italics. +Choose from all, none, javascript, or most. Defaults to most. All removes all HTML tags; none removes no HTML tags; javascript removes all references to javacript; and most removes all but simple formatting tags like bold and italics. + +=back =cut diff --git a/lib/WebGUI/HTMLForm.pm b/lib/WebGUI/HTMLForm.pm index 713399bfd..1466e77d4 100644 --- a/lib/WebGUI/HTMLForm.pm +++ b/lib/WebGUI/HTMLForm.pm @@ -25,7 +25,7 @@ use WebGUI::SQL; =head1 NAME - Package WebGUI::HTMLForm +Package WebGUI::HTMLForm =head1 SYNOPSIS @@ -60,8 +60,7 @@ use WebGUI::SQL; $f->yesNo("happy","Are you happy?"); $f->zipcode("workZip","Office Zip Code"); - Alternatively each of these methods can also be called with the - tag element syntax like this: +Alternatively each of these methods can also be called with the tag element syntax like this: $f->checkbox( -"name"=>"whichOne", @@ -75,12 +74,11 @@ use WebGUI::SQL; =head1 DESCRIPTION - Package that makes HTML forms typed data and significantly - reduces the code needed for properties pages in WebGUI. +Package that makes HTML forms typed data and significantly reduces the code needed for properties pages in WebGUI. =head1 METHODS - These methods are available from this class: +These methods are available from this class: =cut @@ -115,41 +113,41 @@ sub _uiLevelChecksOut { =head2 checkbox ( name [ label, checked, subtext, value, extras, uiLevel ] ) - Adds a checkbox row to this form. +Adds a checkbox row to this form. + +=over =item name - The name field for this form element. +The name field for this form element. =item label - The left column label for this form row. +The left column label for this form row. =item checked - If you'd like this box to be defaultly checked, set this to "1". +If you'd like this box to be defaultly checked, set this to "1". =item subtext - - Extra text to describe this form element or to provide special - instructions. + +Extra text to describe this form element or to provide special instructions. =item value - The default value for this form element. Defaults to "1". +The default value for this form element. Defaults to "1". =item extras - If you want to add anything special to this form element like - javascript actions, or stylesheet information, you'd add it in - here as follows: +If you want to add anything special to this form element like javascript actions, or stylesheet information, you'd add it in here as follows: - 'onChange="this.form.submit()"' + 'onChange="this.form.submit()"' =item uiLevel - The UI level for this field. See the WebGUI developer's site for - details. Defaults to "0". +The UI level for this field. See the WebGUI developer's site for details. Defaults to "0". + +=back =cut @@ -182,47 +180,45 @@ sub checkbox { =head2 checkList ( name, options [ label, value, vertical, extras, subtext, uiLevel ] ) - Adds a checkbox list row to this form. +Adds a checkbox list row to this form. + +=over =item name - The name field for this form element. +The name field for this form element. =item options - The list of options for this list. Should be passed as a - hash reference. + +The list of options for this list. Should be passed as a hash reference. =item label - The left column label for this form row. +The left column label for this form row. =item value - The default value(s) for this form element. This should be passed - as an array reference. +The default value(s) for this form element. This should be passed as an array reference. =item vertical - If set to "1" the radio button elements will be laid out - horizontally. Defaults to "0". +If set to "1" the radio button elements will be laid out horizontally. Defaults to "0". =item extras - If you want to add anything special to this form element like - javascript actions, or stylesheet information, you'd add it in - here as follows: +If you want to add anything special to this form element like javascript actions, or stylesheet information, you'd add it in here as follows: - 'onChange="this.form.submit()"' + 'onChange="this.form.submit()"' =item subtext - Extra text to describe this form element or to provide special - instructions. +Extra text to describe this form element or to provide special instructions. =item uiLevel - The UI level for this field. See the WebGUI developer's site for - details. Defaults to "0". +The UI level for this field. See the WebGUI developer's site for details. Defaults to "0". + +=back =cut @@ -255,54 +251,49 @@ sub checkList { =head2 combo ( name, options [ label, value, size, multiple, extras, subtext, uiLevel ] ) - Adds a combination select list / text box row to this form. If the - text box is filled out it will have a value stored in "name"_new - where name is the first field passed into this method. +Adds a combination select list / text box row to this form. If the text box is filled out it will have a value stored in "name"_new where name is the first field passed into this method. + +=over =item name - The name field for this form element. +The name field for this form element. =item options - The list of options for this select list. Should be passed as a - hash reference. + +The list of options for this select list. Should be passed as a hash reference. =item label - The left column label for this form row. +The left column label for this form row. =item value - The default value(s) for this form element. This should be passed - as an array reference. +The default value(s) for this form element. This should be passed as an array reference. =item size - The number of characters tall this form element should be. Defaults - to "1". +The number of characters tall this form element should be. Defaults to "1". =item multiple - A boolean value for whether this select list should allow multiple - selections. Defaults to "0". +A boolean value for whether this select list should allow multiple selections. Defaults to "0". =item extras - If you want to add anything special to this form element like - javascript actions, or stylesheet information, you'd add it in - here as follows: +If you want to add anything special to this form element like javascript actions, or stylesheet information, you'd add it in here as follows: - 'onChange="this.form.submit()"' + 'onChange="this.form.submit()"' =item subtext - Extra text to describe this form element or to provide special - instructions. +Extra text to describe this form element or to provide special instructions. =item uiLevel - The UI level for this field. See the WebGUI developer's site for - details. Defaults to "0". +The UI level for this field. See the WebGUI developer's site for details. Defaults to "0". + +=back =cut @@ -336,47 +327,45 @@ sub combo { =head2 date ( name [ label, value, extras, subtext, size, noDate, uiLevel ] ) - Adds a date row to this form. +Adds a date row to this form. + +=over =item name - The name field for this form element. +The name field for this form element. =item label - The left column label for this form row. +The left column label for this form row. =item value - The default date. Pass as an epoch value. Defaults to today. +The default date. Pass as an epoch value. Defaults to today. =item extras - If you want to add anything special to this form element like - javascript actions, or stylesheet information, you'd add it in - here as follows: +If you want to add anything special to this form element like javascript actions, or stylesheet information, you'd add it in here as follows: - 'onChange="this.form.submit()"' + 'onChange="this.form.submit()"' =item subtext - Extra text to describe this form element or to provide special - instructions. +Extra text to describe this form element or to provide special instructions. =item size - The number of characters wide this form element should be. There - should be no reason for anyone to specify this. +The number of characters wide this form element should be. There should be no reason for anyone to specify this. =item noDate - By default a date is placed in the "value" field. Set this to "1" - to turn off the default date. +By default a date is placed in the "value" field. Set this to "1" to turn off the default date. =item uiLevel - The UI level for this field. See the WebGUI developer's site for - details. Defaults to "0". +The UI level for this field. See the WebGUI developer's site for details. Defaults to "0". + +=back =cut @@ -410,46 +399,45 @@ sub date { =head2 email ( name [ label, value, maxlength, extras, subtext, size, uiLevel ] ) - Adds an email address row to this form. +Adds an email address row to this form. + +=over =item name - The name field for this form element. +The name field for this form element. =item label - The left column label for this form row. +The left column label for this form row. =item value - The default value for this form element. +The default value for this form element. =item maxlength - The maximum number of characters to allow in this form element. +The maximum number of characters to allow in this form element. =item extras - If you want to add anything special to this form element like - javascript actions, or stylesheet information, you'd add it in - here as follows: +If you want to add anything special to this form element like javascript actions, or stylesheet information, you'd add it in here as follows: - 'onChange="this.form.submit()"' + 'onChange="this.form.submit()"' =item subtext - Extra text to describe this form element or to provide special - instructions. +Extra text to describe this form element or to provide special instructions. =item size - The number of characters wide this form element should be. There - should be no reason for anyone to specify this. +The number of characters wide this form element should be. There should be no reason for anyone to specify this. =item uiLevel - The UI level for this field. See the WebGUI developer's site for - details. Defaults to "0". +The UI level for this field. See the WebGUI developer's site for details. Defaults to "0". + +=back =cut @@ -482,55 +470,49 @@ sub email { =head2 fieldType ( name, types [ label, value, size, multiple, extras, subtext, uiLevel ] ) - Adds a field type select list field to this form. This is primarily - useful for building dynamic form builders. +Adds a field type select list field to this form. This is primarily useful for building dynamic form builders. + +=over =item name - The name field for this form element. +The name field for this form element. =item types - An array reference of field types to be displayed. The field names - are the names of the methods from this forms package. Note that not - all field types are supported. +An array reference of field types to be displayed. The field names are the names of the methods from this forms package. Note that not all field types are supported. =item label - The left column label for this form row. +The left column label for this form row. =item value - The default value(s) for this form element. This should be passed - as an array reference. +The default value(s) for this form element. This should be passed as an array reference. =item size - The number of characters tall this form element should be. Defaults - to "1". +The number of characters tall this form element should be. Defaults to "1". =item multiple - A boolean value for whether this select list should allow multiple - selections. Defaults to "0". +A boolean value for whether this select list should allow multiple selections. Defaults to "0". =item extras - If you want to add anything special to this form element like - javascript actions, or stylesheet information, you'd add it in - here as follows: +If you want to add anything special to this form element like javascript actions, or stylesheet information, you'd add it in here as follows: - 'onChange="this.form.submit()"' + 'onChange="this.form.submit()"' =item subtext - Extra text to describe this form element or to provide special - instructions. +Extra text to describe this form element or to provide special instructions. =item uiLevel - The UI level for this field. See the WebGUI developer's site for - details. Defaults to "0". +The UI level for this field. See the WebGUI developer's site for details. Defaults to "0". + +=back =cut @@ -564,38 +546,37 @@ sub fieldType { =head2 file ( name [ label, subtext, extras, size, uiLevel ] ) - Adds a file browse row to this form. +Adds a file browse row to this form. + +=over =item name - The name field for this form element. +The name field for this form element. =item label - The left column label for this form row. +The left column label for this form row. =item subtext - Extra text to describe this form element or to provide special - instructions. +Extra text to describe this form element or to provide special instructions. =item extras - If you want to add anything special to this form element like - javascript actions, or stylesheet information, you'd add it in - here as follows: +If you want to add anything special to this form element like javascript actions, or stylesheet information, you'd add it in here as follows: - 'onChange="this.form.submit()"' + 'onChange="this.form.submit()"' =item size - The number of characters wide this form element should be. There - should be no reason for anyone to specify this. +The number of characters wide this form element should be. There should be no reason for anyone to specify this. =item uiLevel - The UI level for this field. See the WebGUI developer's site for - details. Defaults to "0". +The UI level for this field. See the WebGUI developer's site for details. Defaults to "0". + +=back =cut @@ -620,48 +601,45 @@ sub file { =head2 group ( name [ label, value, size, multiple, extras, subtext, uiLevel ] ) - Adds a group pull-down to this form. A group pull down - provides a select list that provides name value pairs for all the - groups in the WebGUI system. +Adds a group pull-down to this form. A group pull down provides a select list that provides name value pairs for all the groups in the WebGUI system. + +=over =item name - The name field for this form element. +The name field for this form element. =item label - The left column label for this form row. +The left column label for this form row. =item value - The default value(s) for this form element. This should be passed - as an array reference. Defaults to "7" (Everyone). +The default value(s) for this form element. This should be passed as an array reference. Defaults to "7" (Everyone). =item size - How many rows should be displayed at once? +How many rows should be displayed at once? =item multiple - Set to "1" if multiple groups should be selectable. +Set to "1" if multiple groups should be selectable. =item extras - If you want to add anything special to this form element like - javascript actions, or stylesheet information, you'd add it in - here as follows: +If you want to add anything special to this form element like javascript actions, or stylesheet information, you'd add it in here as follows: - 'onChange="this.form.submit()"' + 'onChange="this.form.submit()"' =item subtext - Extra text to describe this form element or to provide special - instructions. +Extra text to describe this form element or to provide special instructions. =item uiLevel - The UI level for this field. See the WebGUI developer's site for - details. Defaults to "0". +The UI level for this field. See the WebGUI developer's site for details. Defaults to "0". + +=back =cut @@ -695,15 +673,19 @@ sub group { =head2 hidden ( name [ value ] ) - Adds a hidden row to this form. +Adds a hidden row to this form. + +=over =item name - The name field for this form element. +The name field for this form element. =item value - The default value for this form element. +The default value for this form element. + +=back =cut @@ -720,55 +702,49 @@ sub hidden { =head2 HTMLArea ( name [ label, value, subtext, extras, wrap, rows, columns, uiLevel ] ) - Adds an HTML area row to this form. An HTML area is different than - a standard text area in that it provides rich edit functionality - and some special error trapping for HTML and other special - characters. +Adds an HTML area row to this form. An HTML area is different than a standard text area in that it provides rich edit functionality and some special error trapping for HTML and other special characters. + +=over =item name - The name field for this form element. +The name field for this form element. =item label - The left column label for this form row. +The left column label for this form row. =item value - The default value for this form element. +The default value for this form element. =item subtext - Extra text to describe this form element or to provide special - instructions. +Extra text to describe this form element or to provide special instructions. =item extras - If you want to add anything special to this form element like - javascript actions, or stylesheet information, you'd add it in - here as follows: +If you want to add anything special to this form element like javascript actions, or stylesheet information, you'd add it in here as follows: - 'onChange="this.form.submit()"' + 'onChange="this.form.submit()"' =item wrap - The method for wrapping text in the text area. Defaults to - "virtual". There should be almost no reason to specify this. +The method for wrapping text in the text area. Defaults to "virtual". There should be almost no reason to specify this. =item rows - The number of characters tall this form element should be. There - should be no reason for anyone to specify this. +The number of characters tall this form element should be. There should be no reason for anyone to specify this. =item columns - The number of characters wide this form element should be. There - should be no reason for anyone to specify this. +The number of characters wide this form element should be. There should be no reason for anyone to specify this. =item uiLevel - The UI level for this field. See the WebGUI developer's site for - details. Defaults to "0". +The UI level for this field. See the WebGUI developer's site for details. Defaults to "0". + +=back =cut @@ -801,47 +777,45 @@ sub HTMLArea { =head2 integer ( name [ label, value, maxlength, extras, subtext, size, uiLevel ] ) - Adds an integer row to this form. +Adds an integer row to this form. + +=over =item name - The name field for this form element. +The name field for this form element. =item label - The left column label for this form row. +The left column label for this form row. =item value - The default value for this form element. +The default value for this form element. =item maxlength - The maximum number of characters to allow in this form element. - Defaults to 11. +The maximum number of characters to allow in this form element. Defaults to 11. =item extras - If you want to add anything special to this form element like - javascript actions, or stylesheet information, you'd add it in - here as follows: +If you want to add anything special to this form element like javascript actions, or stylesheet information, you'd add it in here as follows: - 'onChange="this.form.submit()"' + 'onChange="this.form.submit()"' =item subtext - Extra text to describe this form element or to provide special - instructions. +Extra text to describe this form element or to provide special instructions. =item size - The number of characters wide this form element should be. There - should be no reason for anyone to specify this. +The number of characters wide this form element should be. There should be no reason for anyone to specify this. =item uiLevel - The UI level for this field. See the WebGUI developer's site for - details. Defaults to "0". +The UI level for this field. See the WebGUI developer's site for details. Defaults to "0". + +=back =cut @@ -873,46 +847,41 @@ sub integer { =head2 interval ( name [ label, intervalValue, unitsValue, extras, subtext, uiLevel ] ) - Adds a time interval row to this form. +Adds a time interval row to this form. + +=over =item name - The the base name for this form element. This form element actually - returns two values under different names. They are name_interval and - name_units. +The the base name for this form element. This form element actually returns two values under different names. They are name_interval and name_units. =item label - The left column label for this form row. +The left column label for this form row. =item intervalValue - The default value for interval portion of this form element. Defaults - to '1'. +The default value for interval portion of this form element. Defaults to '1'. =item unitsValue - The default value for units portion of this form element. Defaults - to 'seconds'. Possible values are 'seconds', 'minutes', 'hours', - 'days', 'weeks', 'months', and 'years'. +The default value for units portion of this form element. Defaults to 'seconds'. Possible values are 'seconds', 'minutes', 'hours', 'days', 'weeks', 'months', and 'years'. =item extras - If you want to add anything special to this form element like - javascript actions, or stylesheet information, you'd add it in - here as follows: +If you want to add anything special to this form element like javascript actions, or stylesheet information, you'd add it in here as follows: - 'onChange="this.form.submit()"' + 'onChange="this.form.submit()"' =item subtext - Extra text to describe this form element or to provide special - instructions. +Extra text to describe this form element or to provide special instructions. =item uiLevel - The UI level for this field. See the WebGUI developer's site for - details. Defaults to "0". +The UI level for this field. See the WebGUI developer's site for details. Defaults to "0". + +=back =cut @@ -948,44 +917,39 @@ sub interval { =head2 new ( [ noTable, action, method, extras, enctype, tableExtras ] ) - Constructor. +Constructor. + +=over =item noTable - If this is set to "1" then no table elements will be wrapped around - each form element. Defaults to "0". +If this is set to "1" then no table elements will be wrapped around each form element. Defaults to "0". =item action - The Action URL for the form information to be submitted to. This - defaults to the current page. +The Action URL for the form information to be submitted to. This defaults to the current page. =item method - The form's submission method. This defaults to "POST" and probably - shouldn't be changed. +The form's submission method. This defaults to "POST" and probably shouldn't be changed. =item extras - If you want to add anything special to your form like javascript - actions, or stylesheet information, you'd add it in here as - follows: +If you want to add anything special to your form like javascript actions, or stylesheet information, you'd add it in here as follows: - '"name"="myForm" onChange="myForm.submit()"' + '"name"="myForm" onChange="myForm.submit()"' =item enctype - The ecapsulation type for this form. This defaults to - "multipart/form-data" and should probably never be changed. +The ecapsulation type for this form. This defaults to "multipart/form-data" and should probably never be changed. =item tableExtras - If you want to add anything special to the form's table like - a name or stylesheet information, you'd add it in here as - follows: +If you want to add anything special to the form's table like a name or stylesheet information, you'd add it in here as follows: - '"name"="myForm" class="formTable"' + '"name"="myForm" class="formTable"' +=back =cut @@ -1011,48 +975,45 @@ sub new { =head2 password ( name [ label, value, subtext, maxlength, extras, size, uiLevel ] ) - Adds a password row to this form. +Adds a password row to this form. + +=over =item name - The name field for this form element. +The name field for this form element. =item label - The left column label for this form row. +The left column label for this form row. =item value - The default value for this form element. +The default value for this form element. =item subtext - Extra text to describe this form element or to provide special - instructions. +Extra text to describe this form element or to provide special instructions. =item maxlength - The maximum number of characters to allow in this form element. - Defaults to "35". +The maximum number of characters to allow in this form element. Defaults to "35". =item extras - If you want to add anything special to this form element like - javascript actions, or stylesheet information, you'd add it in - here as follows: +If you want to add anything special to this form element like javascript actions, or stylesheet information, you'd add it in here as follows: - 'onChange="this.form.submit()"' + 'onChange="this.form.submit()"' =item size - The number of characters wide this form element should be. There - should be no reason for anyone to specify this. Defaults to "30" - unless overridden in the settings. +The number of characters wide this form element should be. There should be no reason for anyone to specify this. Defaults to "30" unless overridden in the settings. =item uiLevel - The UI level for this field. See the WebGUI developer's site for - details. Defaults to "0". +The UI level for this field. See the WebGUI developer's site for details. Defaults to "0". + +=back =cut @@ -1084,46 +1045,45 @@ sub password { =head2 phone ( name [ label, value, maxlength, extras, subtext, size, uiLevel ] ) - Adds a text row to this form. +Adds a text row to this form. + +=over =item name - The name field for this form element. +The name field for this form element. =item label - The left column label for this form row. +The left column label for this form row. =item value - The default value for this form element. +The default value for this form element. =item maxlength - The maximum number of characters to allow in this form element. +The maximum number of characters to allow in this form element. =item extras - If you want to add anything special to this form element like - javascript actions, or stylesheet information, you'd add it in - here as follows: +If you want to add anything special to this form element like javascript actions, or stylesheet information, you'd add it in here as follows: - 'onChange="this.form.submit()"' + 'onChange="this.form.submit()"' =item subtext - Extra text to describe this form element or to provide special - instructions. +Extra text to describe this form element or to provide special instructions. =item size - The number of characters wide this form element should be. There - should be no reason for anyone to specify this. +The number of characters wide this form element should be. There should be no reason for anyone to specify this. =item uiLevel - The UI level for this field. See the WebGUI developer's site for - details. Defaults to "0". +The UI level for this field. See the WebGUI developer's site for details. Defaults to "0". + +=back =cut @@ -1155,7 +1115,7 @@ sub phone { =head2 print ( ) - Returns the HTML for this form object. +Returns the HTML for this form object. =cut @@ -1167,8 +1127,7 @@ sub print { =head2 printRowsOnly ( ) - Returns the HTML for this form object except for the form header - and footer. +Returns the HTML for this form object except for the form header and footer. =cut @@ -1180,41 +1139,41 @@ sub printRowsOnly { =head2 radio ( name [ label, checked, value, subtext, extras, uiLevel ] ) - Adds a radio button row to this form. +Adds a radio button row to this form. + +=over =item name - The name field for this form element. +The name field for this form element. =item label - The left column label for this form row. +The left column label for this form row. =item checked - If you'd like this radio button to be defaultly checked, set this to "1". +If you'd like this radio button to be defaultly checked, set this to "1". =item value - The default value for this form element. +The default value for this form element. =item subtext - Extra text to describe this form element or to provide special - instructions. +Extra text to describe this form element or to provide special instructions. =item extras - If you want to add anything special to this form element like - javascript actions, or stylesheet information, you'd add it in - here as follows: +If you want to add anything special to this form element like javascript actions, or stylesheet information, you'd add it in here as follows: - 'onChange="this.form.submit()"' + 'onChange="this.form.submit()"' =item uiLevel - The UI level for this field. See the WebGUI developer's site for - details. Defaults to "0". +The UI level for this field. See the WebGUI developer's site for details. Defaults to "0". + +=back =cut @@ -1247,47 +1206,45 @@ sub radio { =head2 radioList ( name, options [ label, value, vertical, extras, subtext, uiLevel ] ) - Adds a radio button list row to this form. +Adds a radio button list row to this form. + +=over =item name - The name field for this form element. +The name field for this form element. =item options - The list of options for this list. Should be passed as a - hash reference. +The list of options for this list. Should be passed as a hash reference. =item label - The left column label for this form row. +The left column label for this form row. =item value - The default value for this form element. +The default value for this form element. =item vertical - If set to "1" the radio button elements will be laid out - horizontally. Defaults to "0". +If set to "1" the radio button elements will be laid out horizontally. Defaults to "0". =item extras - If you want to add anything special to this form element like - javascript actions, or stylesheet information, you'd add it in - here as follows: +If you want to add anything special to this form element like javascript actions, or stylesheet information, you'd add it in here as follows: - 'onChange="this.form.submit()"' + 'onChange="this.form.submit()"' =item subtext - Extra text to describe this form element or to provide special - instructions. +Extra text to describe this form element or to provide special instructions. =item uiLevel - The UI level for this field. See the WebGUI developer's site for - details. Defaults to "0". +The UI level for this field. See the WebGUI developer's site for details. Defaults to "0". + +=back =cut @@ -1320,13 +1277,15 @@ sub radioList { =head2 raw ( value, uiLevel ) - Adds raw data to the form. This is primarily useful with the - printRowsOnly method and if you generate your own form elements. +Adds raw data to the form. This is primarily useful with the printRowsOnly method and if you generate your own form elements. + +=over =item uiLevel - The UI level for this field. See the WebGUI developer's site for - details. Defaults to "0". +The UI level for this field. See the WebGUI developer's site for details. Defaults to "0". + +=back =cut @@ -1344,27 +1303,27 @@ sub raw { =head2 readOnly ( value [ label, subtext, uiLevel ] ) - Adds a read only row to this form. This is mainly used for - displaying not editable properties, but it can also be used to - quickly insert custom form elements. +Adds a read only row to this form. This is mainly used for displaying not editable properties, but it can also be used to quickly insert custom form elements. + +=over =item value - The read only value. +The read only value. =item label - The left column label for this form row. +The left column label for this form row. =item subtext - Extra text to describe this form element or to provide special - instructions. +Extra text to describe this form element or to provide special instructions. =item uiLevel - The UI level for this field. See the WebGUI developer's site for - details. Defaults to "0". +The UI level for this field. See the WebGUI developer's site for details. Defaults to "0". + +=back =cut @@ -1385,7 +1344,7 @@ sub readOnly { =head2 select - Use of this method is depricated. Use selectList instead. +Use of this method is depricated. Use selectList instead. =cut @@ -1398,52 +1357,49 @@ sub select { =head2 selectList ( name, options [ label, value, size, multiple, extras, subtext, uiLevel ] ) - Adds a select list row to this form. +Adds a select list row to this form. + +=over =item name - The name field for this form element. +The name field for this form element. =item options - The list of options for this select list. Should be passed as a - hash reference. + +The list of options for this select list. Should be passed as a hash reference. =item label - The left column label for this form row. +The left column label for this form row. =item value - The default value(s) for this form element. This should be passed - as an array reference. +The default value(s) for this form element. This should be passed as an array reference. =item size - The number of characters tall this form element should be. Defaults - to "1". +The number of characters tall this form element should be. Defaults to "1". =item multiple - A boolean value for whether this select list should allow multiple - selections. Defaults to "0". +A boolean value for whether this select list should allow multiple selections. Defaults to "0". =item extras - If you want to add anything special to this form element like - javascript actions, or stylesheet information, you'd add it in - here as follows: +If you want to add anything special to this form element like javascript actions, or stylesheet information, you'd add it in here as follows: - 'onChange="this.form.submit()"' + 'onChange="this.form.submit()"' =item subtext - Extra text to describe this form element or to provide special - instructions. +Extra text to describe this form element or to provide special instructions. =item uiLevel - The UI level for this field. See the WebGUI developer's site for - details. Defaults to "0". +The UI level for this field. See the WebGUI developer's site for details. Defaults to "0". + +=back =cut @@ -1477,28 +1433,29 @@ sub selectList { =head2 submit ( value [ label, extras, subtext ] ) - Adds a submit button row to this form. +Adds a submit button row to this form. + +=over =item value - The button text for this submit button. Defaults to "save". +The button text for this submit button. Defaults to "save". =item label - The left column label for this form row. +The left column label for this form row. =item extras - If you want to add anything special to this form element like - javascript actions, or stylesheet information, you'd add it in - here as follows: +If you want to add anything special to this form element like javascript actions, or stylesheet information, you'd add it in here as follows: - 'onChange="this.form.submit()"' + 'onChange="this.form.submit()"' =item subtext - Extra text to describe this form element or to provide special - instructions. +Extra text to describe this form element or to provide special instructions. + +=back =cut @@ -1519,6 +1476,42 @@ sub submit { =head2 template ( name [, value, label, namespace, afterEdit, extras, uiLevel ] ) +Adds a template select list to the form. + +=over + +=item name + +The name of this form element. + +=item value + +The default value for this form element. + +=item label + +The left column label for this form row. + +=item namespace + +The namespace (or type) of templates to show in this list. Defaults to "Page". + +=item afterEdit + +A URL that will be acted upon after editing a template. Typically there is a link next to the select list that reads "Edit this template" and this is the URL to go to after editing is complete. + +=item extras + +If you want to add anything special to this form element like javascript actions, or stylesheet information, you'd add it in here as follows: + + 'onChange="this.form.submit()"' + +=item uiLevel + +The UI level for this field. See the WebGUI developer's site for details. Defaults to "0". + +=back + =cut sub template { @@ -1559,46 +1552,45 @@ sub template { =head2 text ( name [ label, value, maxlength, extras, subtext, size, uiLevel ] ) - Adds a text row to this form. +Adds a text row to this form. + +=over =item name - The name field for this form element. +The name field for this form element. =item label - The left column label for this form row. +The left column label for this form row. =item value - The default value for this form element. +The default value for this form element. =item maxlength - The maximum number of characters to allow in this form element. +The maximum number of characters to allow in this form element. =item extras - If you want to add anything special to this form element like - javascript actions, or stylesheet information, you'd add it in - here as follows: +If you want to add anything special to this form element like javascript actions, or stylesheet information, you'd add it in here as follows: - 'onChange="this.form.submit()"' + 'onChange="this.form.submit()"' =item subtext - Extra text to describe this form element or to provide special - instructions. +Extra text to describe this form element or to provide special instructions. =item size - The number of characters wide this form element should be. There - should be no reason for anyone to specify this. +The number of characters wide this form element should be. There should be no reason for anyone to specify this. =item uiLevel - The UI level for this field. See the WebGUI developer's site for - details. Defaults to "0". +The UI level for this field. See the WebGUI developer's site for details. Defaults to "0". + +=back =cut @@ -1630,52 +1622,49 @@ sub text { =head2 textarea ( name [ label, value, subtext, extras, wrap, rows, columns, uiLevel ] ) - Adds a text area row to this form. +Adds a text area row to this form. + +=over =item name - The name field for this form element. +The name field for this form element. =item label - The left column label for this form row. +The left column label for this form row. =item value - The default value for this form element. +The default value for this form element. =item subtext - Extra text to describe this form element or to provide special - instructions. +Extra text to describe this form element or to provide special instructions. =item extras - If you want to add anything special to this form element like - javascript actions, or stylesheet information, you'd add it in - here as follows: +If you want to add anything special to this form element like javascript actions, or stylesheet information, you'd add it in here as follows: - 'onChange="this.form.submit()"' + 'onChange="this.form.submit()"' =item wrap - The method for wrapping text in the text area. Defaults to - "virtual". There should be almost no reason to specify this. +The method for wrapping text in the text area. Defaults to "virtual". There should be almost no reason to specify this. =item rows - The number of characters tall this form element should be. There - should be no reason for anyone to specify this. +The number of characters tall this form element should be. There should be no reason for anyone to specify this. =item columns - The number of characters wide this form element should be. There - should be no reason for anyone to specify this. - +The number of characters wide this form element should be. There should be no reason for anyone to specify this. + =item uiLevel - The UI level for this field. See the WebGUI developer's site for - details. Defaults to "0". +The UI level for this field. See the WebGUI developer's site for details. Defaults to "0". + +=back =cut @@ -1708,47 +1697,45 @@ sub textarea { =head2 url ( name [ label, value, maxlength, extras, subtext, size, uiLevel ] ) - Adds a URL row to this form. +Adds a URL row to this form. + +=over =item name - The name field for this form element. +The name field for this form element. =item label - The left column label for this form row. +The left column label for this form row. =item value - The default value for this form element. +The default value for this form element. =item maxlength - The maximum number of characters to allow in this form element. - Defaults to 2048. +The maximum number of characters to allow in this form element. Defaults to 2048. =item extras - If you want to add anything special to this form element like - javascript actions, or stylesheet information, you'd add it in - here as follows: +If you want to add anything special to this form element like javascript actions, or stylesheet information, you'd add it in here as follows: - 'onChange="this.form.submit()"' + 'onChange="this.form.submit()"' =item subtext - Extra text to describe this form element or to provide special - instructions. +Extra text to describe this form element or to provide special instructions. =item size - The number of characters wide this form element should be. There - should be no reason for anyone to specify this. +The number of characters wide this form element should be. There should be no reason for anyone to specify this. =item uiLevel - The UI level for this field. See the WebGUI developer's site for - details. Defaults to "0". +The UI level for this field. See the WebGUI developer's site for details. Defaults to "0". + +=back =cut @@ -1780,44 +1767,41 @@ sub url { =head2 whatNext ( options [, value, name, label, subtext, uiLevel, extras ] ) - Adds a "What next?" select list to this form for use with chained - action forms in WebGUI. +Adds a "What next?" select list to this form for use with chained action forms in WebGUI. + +=over =item options - A hash reference of the possible actions that could happen next. +A hash reference of the possible actions that could happen next. =item value - The selected element in this list. +The selected element in this list. =item name - The name field for this form element. Defaults to "proceed". +The name field for this form element. Defaults to "proceed". =item label - The left column label for this form row. +The left column label for this form row. =item subtext - Extra text to describe this form element or to provide special - instructions. +Extra text to describe this form element or to provide special instructions. =item uiLevel - The UI level for this field. See the WebGUI developer's site for - details. Defaults to "1". - -=cut +The UI level for this field. See the WebGUI developer's site for details. Defaults to "1". =item extras - If you want to add anything special to this form element like - javascript actions, or stylesheet information, you'd add it in - here as follows: +If you want to add anything special to this form element like javascript actions, or stylesheet information, you'd add it in here as follows: - 'onChange="this.form.submit()"' + 'onChange="this.form.submit()"' + +=back =cut @@ -1850,38 +1834,37 @@ sub whatNext { =head2 yesNo ( name [ label, value, extras, subtext, uiLevel ] ) - Adds a yes/no radio menu to this form. +Adds a yes/no radio menu to this form. + +=over =item name - The name field for this form element. +The name field for this form element. =item label - The left column label for this form row. +The left column label for this form row. =item value - The default value(s) for this form element. Valid values are "1" - and "0". Defaults to "1". +The default value(s) for this form element. Valid values are "1" and "0". Defaults to "1". =item extras - If you want to add anything special to this form element like - javascript actions, or stylesheet information, you'd add it in - here as follows: +If you want to add anything special to this form element like javascript actions, or stylesheet information, you'd add it in here as follows: - 'onChange="this.form.submit()"' + 'onChange="this.form.submit()"' =item subtext - Extra text to describe this form element or to provide special - instructions. +Extra text to describe this form element or to provide special instructions. =item uiLevel - The UI level for this field. See the WebGUI developer's site for - details. Defaults to "0". +The UI level for this field. See the WebGUI developer's site for details. Defaults to "0". + +=back =cut @@ -1912,46 +1895,45 @@ sub yesNo { =head2 zipcode ( name [ label, value, maxlength, extras, subtext, size, uiLevel ] ) - Adds a zip code row to this form. +Adds a zip code row to this form. + +=over =item name - The name field for this form element. +The name field for this form element. =item label - The left column label for this form row. +The left column label for this form row. =item value - The default value for this form element. +The default value for this form element. =item maxlength - The maximum number of characters to allow in this form element. +The maximum number of characters to allow in this form element. =item extras - If you want to add anything special to this form element like - javascript actions, or stylesheet information, you'd add it in - here as follows: +If you want to add anything special to this form element like javascript actions, or stylesheet information, you'd add it in here as follows: - 'onChange="this.form.submit()"' + 'onChange="this.form.submit()"' =item subtext - Extra text to describe this form element or to provide special - instructions. +Extra text to describe this form element or to provide special instructions. =item size - The number of characters wide this form element should be. There - should be no reason for anyone to specify this. +The number of characters wide this form element should be. There should be no reason for anyone to specify this. =item uiLevel - The UI level for this field. See the WebGUI developer's site for - details. Defaults to "0". +The UI level for this field. See the WebGUI developer's site for details. Defaults to "0". + +=back =cut diff --git a/lib/WebGUI/Icon.pm b/lib/WebGUI/Icon.pm index d60283126..cb56b680d 100644 --- a/lib/WebGUI/Icon.pm +++ b/lib/WebGUI/Icon.pm @@ -25,7 +25,7 @@ our @EXPORT = qw(&helpIcon &becomeIcon &cutIcon ©Icon &deleteIcon &editIcon =head1 NAME - Package WebGUI::Icon +Package WebGUI::Icon =head1 SYNOPSIS @@ -46,14 +46,11 @@ our @EXPORT = qw(&helpIcon &becomeIcon &cutIcon ©Icon &deleteIcon &editIcon =head1 DESCRIPTION - A package for generating user interface buttons. The subroutines - found herein do nothing other than to create a short way of doing - much longer repetitive tasks. They simply make the programmer's life - easier through fewer keystrokes and less cluttered code. +A package for generating user interface buttons. The subroutines found herein do nothing other than to create a short way of doing much longer repetitive tasks. They simply make the programmer's life easier through fewer keystrokes and less cluttered code. =head1 METHODS - These subroutines are available from this package: +These subroutines are available from this package: =cut @@ -61,16 +58,19 @@ our @EXPORT = qw(&helpIcon &becomeIcon &cutIcon ©Icon &deleteIcon &editIcon =head2 becomeIcon ( urlParameters [, pageURL ] ) - Generates a button with the word "Become" printed on it. +Generates a button with the word "Become" printed on it. + +=over =item urlParameters - Any URL parameters that need to be tacked on to the current URL - to accomplish whatever function this button represents. +Any URL parameters that need to be tacked on to the current URL to accomplish whatever function this button represents. =item pageURL - The URL to any page. Defaults to the current page. +The URL to any page. Defaults to the current page. + +=back =cut @@ -86,16 +86,19 @@ sub becomeIcon { =head2 copyIcon ( urlParameters [, pageURL ] ) - Generates a button with the word "Copy" printed on it. +Generates a button with the word "Copy" printed on it. + +=over =item urlParameters - Any URL parameters that need to be tacked on to the current URL - to accomplish whatever function this button represents. +Any URL parameters that need to be tacked on to the current URL to accomplish whatever function this button represents. =item pageURL - The URL to any page. Defaults to the current page. +The URL to any page. Defaults to the current page. + +=back =cut @@ -111,16 +114,19 @@ sub copyIcon { =head2 cutIcon ( urlParameters [, pageURL ] ) - Generates a button with the word "Cut" printed on it. +Generates a button with the word "Cut" printed on it. + +=over =item urlParameters - Any URL parameters that need to be tacked on to the current URL - to accomplish whatever function this button represents. +Any URL parameters that need to be tacked on to the current URL to accomplish whatever function this button represents. =item pageURL - The URL to any page. Defaults to the current page. +The URL to any page. Defaults to the current page. + +=back =cut @@ -136,16 +142,19 @@ sub cutIcon { =head2 deleteIcon ( urlParameters [, pageURL ] ) - Generates a button with an "X" printed on it. +Generates a button with an "X" printed on it. + +=over =item urlParameters - Any URL parameters that need to be tacked on to the current URL - to accomplish whatever function this button represents. +Any URL parameters that need to be tacked on to the current URL to accomplish whatever function this button represents. =item pageURL - The URL to any page. Defaults to the current page. +The URL to any page. Defaults to the current page. + +=back =cut @@ -161,16 +170,19 @@ sub deleteIcon { =head2 editIcon ( urlParameters [, pageURL ] ) - Generates a button with the word "Edit" printed on it. +Generates a button with the word "Edit" printed on it. + +=over =item urlParameters - Any URL parameters that need to be tacked on to the current URL - to accomplish whatever function this button represents. +Any URL parameters that need to be tacked on to the current URL to accomplish whatever function this button represents. =item pageURL - The URL to any page. Defaults to the current page. +The URL to any page. Defaults to the current page. + +=back =cut @@ -186,17 +198,19 @@ sub editIcon { =head2 helpIcon ( helpId [, namespace ] ) - Generates a button with the word "Help" printed on it. +Generates a button with the word "Help" printed on it. + +=over =item helpId - The id in the help table that relates to the help documentation - for your function. +The id in the help table that relates to the help documentation for your function. =item namespace - If your help documentation is not in the WebGUI namespace, then - you must specify the namespace for this help. +If your help documentation is not in the WebGUI namespace, then you must specify the namespace for this help. + +=back =cut @@ -212,16 +226,19 @@ sub helpIcon { =head2 moveBottomIcon ( urlParameters [, pageURL ] ) - Generates a button with a double down arrow printed on it. +Generates a button with a double down arrow printed on it. + +=over =item urlParameters - Any URL parameters that need to be tacked on to the current URL - to accomplish whatever function this button represents. +Any URL parameters that need to be tacked on to the current URL to accomplish whatever function this button represents. =item pageURL - The URL to any page. Defaults to the current page. +The URL to any page. Defaults to the current page. + +=back =cut @@ -237,16 +254,19 @@ sub moveBottomIcon { =head2 moveDownIcon ( urlParameters [, pageURL ] ) - Generates a button with a down arrow printed on it. +Generates a button with a down arrow printed on it. + +=over =item urlParameters - Any URL parameters that need to be tacked on to the current URL - to accomplish whatever function this button represents. +Any URL parameters that need to be tacked on to the current URL to accomplish whatever function this button represents. =item pageURL - The URL to any page. Defaults to the current page. +The URL to any page. Defaults to the current page. + +=back =cut @@ -262,16 +282,19 @@ sub moveDownIcon { =head2 moveTopIcon ( urlParameters [, pageURL ] ) - Generates a button with a double up arrow printed on it. +Generates a button with a double up arrow printed on it. + +=over =item urlParameters - Any URL parameters that need to be tacked on to the current URL - to accomplish whatever function this button represents. +Any URL parameters that need to be tacked on to the current URL to accomplish whatever function this button represents. =item pageURL - The URL to any page. Defaults to the current page. +The URL to any page. Defaults to the current page. + +=back =cut @@ -287,16 +310,19 @@ sub moveTopIcon { =head2 moveUpIcon ( urlParameters [, pageURL ] ) - Generates a button with an up arrow printed on it. +Generates a button with an up arrow printed on it. + +=over =item urlParameters - Any URL parameters that need to be tacked on to the current URL - to accomplish whatever function this button represents. +Any URL parameters that need to be tacked on to the current URL to accomplish whatever function this button represents. =item pageURL - The URL to any page. Defaults to the current page. +The URL to any page. Defaults to the current page. + +=back =cut @@ -312,9 +338,7 @@ sub moveUpIcon { =head2 pageIcon ( ) - Generates an icon that looks like a page. It's purpose is to - represent whether you're looking at page properties or Wobject - properties. +Generates an icon that looks like a page. It's purpose is to represent whether you're looking at page properties or Wobject properties. =cut @@ -326,16 +350,19 @@ sub pageIcon { =head2 viewIcon ( urlParameters [, pageURL ] ) - Generates a button with the word "View" printed on it. +Generates a button with the word "View" printed on it. + +=over =item urlParameters - Any URL parameters that need to be tacked on to the current URL - to accomplish whatever function this button represents. +Any URL parameters that need to be tacked on to the current URL to accomplish whatever function this button represents. =item pageURL - The URL to any page. Defaults to the current page. +The URL to any page. Defaults to the current page. + +=back =cut @@ -351,9 +378,7 @@ sub viewIcon { =head2 wobjectIcon ( ) - Generates an icon that looks like a wobject. It's purpose is to - represent whether you're looking at page properties or Wobject - properties. +Generates an icon that looks like a wobject. It's purpose is to represent whether you're looking at page properties or Wobject properties. =cut diff --git a/lib/WebGUI/International.pm b/lib/WebGUI/International.pm index 29bbcb4f7..5d27ef8fa 100644 --- a/lib/WebGUI/International.pm +++ b/lib/WebGUI/International.pm @@ -22,7 +22,7 @@ my %international; =head1 NAME - Package WebGUI::International +Package WebGUI::International =head1 SYNOPSIS @@ -32,11 +32,11 @@ my %international; =head1 DESCRIPTION - This package provides an interface to the internationalization system. +This package provides an interface to the internationalization system. =head1 FUNCTIONS - These functions are available from this package: +These functions are available from this package: =cut @@ -45,25 +45,23 @@ my %international; =head2 get ( internationalId [ , namespace, languageId ] ) - Returns the internationalized message string for the user's language. - If there is no internationalized message, this method will - return the English string. +Returns the internationalized message string for the user's language. If there is no internationalized message, this method will return the English string. + +=over =item internationalId - An integer that relates to a message in the international table - in the WebGUI database. +An integer that relates to a message in the international table in the WebGUI database. =item namespace - A string that relates to the namespace field in the international - table in the WebGUI database. Defaults to 'WebGUI'. +A string that relates to the namespace field in the international table in the WebGUI database. Defaults to 'WebGUI'. =item languageId - An integer that specifies the language that the user should see. - Defaults to the user's defined language. If the user hasn't specified - a default language it defaults to '1' (English). +An integer that specifies the language that the user should see. Defaults to the user's defined language. If the user hasn't specified a default language it defaults to '1' (English). + +=back =cut @@ -97,8 +95,7 @@ sub get { =head2 getLanguages ( ) - Returns a hash reference to the languages (languageId/lanugage) - installed on this WebGUI system. +Returns a hash reference to the languages (languageId/lanugage) installed on this WebGUI system. =cut diff --git a/lib/WebGUI/Macro.pm b/lib/WebGUI/Macro.pm index b7b0ffefc..14e710911 100644 --- a/lib/WebGUI/Macro.pm +++ b/lib/WebGUI/Macro.pm @@ -22,7 +22,7 @@ use WebGUI::Session; =head1 NAME - Package WebGUI::Macro +Package WebGUI::Macro =head1 SYNOPSIS @@ -32,15 +32,13 @@ use WebGUI::Session; =head1 DESCRIPTION - This package is the interface to the WebGUI macro system. +This package is the interface to the WebGUI macro system. - NOTE: This entire system is likely to be replaced in the near future. - It has served WebGUI well since the very beginning but lacks the - speed and flexibility that WebGUI users will require in the future. +NOTE: This entire system is likely to be replaced in the near future. It has served WebGUI well since the very beginning but lacks the speed and flexibility that WebGUI users will require in the future. =head1 METHODS - These functions are available from this package: +These functions are available from this package: =cut @@ -50,11 +48,15 @@ use WebGUI::Session; =head2 getParams ( parameterString ) - A simple, but error prone mechanism for getting a prameter list from a string. Returns an array of parameters. +A simple, but error prone mechanism for getting a prameter list from a string. Returns an array of parameters. + +=over =item parameterString - A string containing a comma separated list of paramenters. +A string containing a comma separated list of paramenters. + +=back =cut @@ -74,11 +76,15 @@ sub getParams { =head2 process ( html ) - Runs all the WebGUI macros to and replaces them in the HTML with their output. +Runs all the WebGUI macros to and replaces them in the HTML with their output. + +=over =item html - A string of HTML to be processed. +A string of HTML to be processed. + +=back =cut diff --git a/lib/WebGUI/Mail.pm b/lib/WebGUI/Mail.pm index 3e257ea88..8eaf20bff 100644 --- a/lib/WebGUI/Mail.pm +++ b/lib/WebGUI/Mail.pm @@ -22,7 +22,7 @@ use WebGUI::Session; =head1 NAME - Package WebGUI::Mail +Package WebGUI::Mail =head1 SYNOPSIS @@ -31,11 +31,11 @@ use WebGUI::Session; =head1 DESCRIPTION - This package provides access to use SMTP based email services. +This package provides access to use SMTP based email services. =head1 METHODS - These methods are available from this class: +These methods are available from this class: =cut @@ -45,32 +45,35 @@ use WebGUI::Session; =head2 send ( to, subject, message [ , cc, from, bcc ] ) - Sends an SMTP email message to the specified user. +Sends an SMTP email message to the specified user. + +=over =item to - An email address for the TO line. +An email address for the TO line. =item subject - The subject line for the email. +The subject line for the email. =item message - The message body for the email. +The message body for the email. =item cc - The email address for the CC line. +The email address for the CC line. =item from - The email address for the FROM line. Defaults to the email address - specified in the Company Settings. +The email address for the FROM line. Defaults to the email address specified in the Company Settings. =item bcc - The email address for the BCC line. +The email address for the BCC line. + +=back =cut diff --git a/lib/WebGUI/MessageLog.pm b/lib/WebGUI/MessageLog.pm index 335b2bb4b..51edc8349 100644 --- a/lib/WebGUI/MessageLog.pm +++ b/lib/WebGUI/MessageLog.pm @@ -29,7 +29,7 @@ use WebGUI::Utility; =head1 NAME - Package WebGUI::MessageLog +Package WebGUI::MessageLog =head1 SYNOPSIS @@ -40,11 +40,11 @@ use WebGUI::Utility; =head1 DESCRIPTION - This package is WebGUI's notification system. +This package is WebGUI's notification system. =head1 METHODS - These functions are available from this package: +These functions are available from this package: =cut @@ -74,36 +74,39 @@ sub _notify { =head2 addEntry ( userId, groupId, subject, message [ , url, status ] ) - Adds an entry to the message log and sends out notification to users. +Adds an entry to the message log and sends out notification to users. + +=over =item userId - The id of the user that should receive this notification. +The id of the user that should receive this notification. - NOTE: This can be left blank if you're specifying a groupId. +NOTE: This can be left blank if you're specifying a groupId. =item groupId - The id of the group that should receive this notification. +The id of the group that should receive this notification. - NOTE: This can be left blank if you're specifying a userId. +NOTE: This can be left blank if you're specifying a userId. =item subject - The subject of the notification. +The subject of the notification. =item message - The content of the notification. +The content of the notification. =item url - The URL of any action that should be taken based upon this - notification (if any). +The URL of any action that should be taken based upon this notification (if any). =item status - Defaults to 'notice'. Can be 'pending', 'notice', or 'completed'. +Defaults to 'notice'. Can be 'pending', 'notice', or 'completed'. + +=back =cut @@ -137,37 +140,39 @@ sub addEntry { =head2 addInternationalizedEntry ( userId, groupId, url, internationalId [ , namespace, status ] ) - Adds an entry to the message log using a translated message from - the internationalization system and sends out notifications to users. +Adds an entry to the message log using a translated message from the internationalization system and sends out notifications to users. + +=over =item userId - The id of the user that should receive this notification. +The id of the user that should receive this notification. - NOTE: This can be left blank if you're specifying a groupId. +NOTE: This can be left blank if you're specifying a groupId. =item groupId - The id of the group that should receive this notification. +The id of the group that should receive this notification. - NOTE: This can be left blank if you're specifying a userId. +NOTE: This can be left blank if you're specifying a userId. =item url - The URL of any action that should be taken based upon this - notification (if any). +The URL of any action that should be taken based upon this notification (if any). =item internationalId - The unique identifier from the internationalization system of the message to send. +The unique identifier from the internationalization system of the message to send. =item namespace - The namespace from the internationalization system of the message to send. Defaults to "WebGUI"; +The namespace from the internationalization system of the message to send. Defaults to "WebGUI"; =item status - Defaults to 'notice'. Can be 'pending', 'notice', or 'completed'. +Defaults to 'notice'. Can be 'pending', 'notice', or 'completed'. + +=back =cut @@ -207,11 +212,15 @@ sub addInternationalizedEntry { =head2 completeEntry ( messageLogId ) - Set a message log entry to complete. +Set a message log entry to complete. + +=over =item messageLogId - The id of the message to complete. +The id of the message to complete. + +=back =cut diff --git a/lib/WebGUI/Navigation.pm b/lib/WebGUI/Navigation.pm index 1c118ae8b..629e4a4e3 100644 --- a/lib/WebGUI/Navigation.pm +++ b/lib/WebGUI/Navigation.pm @@ -25,7 +25,7 @@ use WebGUI::URL; =head1 NAME - Package WebGUI::Navigation +Package WebGUI::Navigation =head1 SYNOPSIS @@ -37,11 +37,11 @@ use WebGUI::URL; =head1 DESCRIPTION - A package used to generate navigation. +A package used to generate navigation. =head1 METHODS - These methods are available from this package: +These methods are available from this package: =cut @@ -49,21 +49,23 @@ use WebGUI::URL; =head2 drawHorizontal ( tree [ , seperator, class ] ) - Draws a vertical navigation system. Returns HTML. +Draws a vertical navigation system. Returns HTML. + +=over =item tree - The hash reference created by the tree method in this package. +The hash reference created by the tree method in this package. =item seperator - A string containing HTML to seperate each navigation item. Defaults - to "·". +A string containing HTML to seperate each navigation item. Defaults to "·". =item class - A stylesheet class for each link in the navigation. Defaults to - "horizontalMenu". +A stylesheet class for each link in the navigation. Defaults to "horizontalMenu". + +=back =cut @@ -94,29 +96,31 @@ sub drawHorizontal { =head2 drawVertical ( tree [, bullet, class, spacing, indent ] ) - Draws a vertical navigation system. Returns HTML. +Draws a vertical navigation system. Returns HTML. + +=over =item tree - The hash reference created by the tree method in this package. +The hash reference created by the tree method in this package. =item bullet - A string containing HTML to generate a bullet that will be placed - in front of each tree item. Defaults to none. +A string containing HTML to generate a bullet that will be placed in front of each tree item. Defaults to none. =item class - A stylesheet class for each link in the navigation. Defaults to - "verticalMenu". +A stylesheet class for each link in the navigation. Defaults to "verticalMenu". =item spacing - An integer with the linespacing for the navigation. Defaults to 1. +An integer with the linespacing for the navigation. Defaults to 1. =item indent - An integer with the about of indenting to start with. Defaults to 0. +An integer with the about of indenting to start with. Defaults to 0. + +=back =cut @@ -148,9 +152,7 @@ sub drawVertical { =head2 tree ( parentId [, toLevel ] ) - Generates and returns a hash reference containing a page tree with - keys of "url", "title", and "sub" with orignating keys of page ids. - The tree looks like this: +Generates and returns a hash reference containing a page tree with keys of "url", "title", and "sub" with orignating keys of page ids. The tree looks like this: root |-pageId @@ -166,14 +168,17 @@ sub drawVertical { `-pageId `-etc +=over + =item parentId - The page id of where you'd like to start the tree. +The page id of where you'd like to start the tree. =item toLevel - The depth the tree should be traversed. Defaults to "0". If set to - "0" the entire tree will be traversed. +The depth the tree should be traversed. Defaults to "0". If set to "0" the entire tree will be traversed. + +=back =cut diff --git a/lib/WebGUI/Node.pm b/lib/WebGUI/Node.pm index a677d9c57..bb0179e27 100644 --- a/lib/WebGUI/Node.pm +++ b/lib/WebGUI/Node.pm @@ -22,7 +22,7 @@ use WebGUI::Session; =head1 NAME - Package WebGUI::Node +Package WebGUI::Node =head1 SYNOPSIS @@ -35,15 +35,12 @@ use WebGUI::Session; $node->getURL; =head1 DESCRIPTION - - Package to manipulate WebGUI storage nodes. The nodes system is a - two-tiered filesystem hash that WebGUI uses to keep attachment - data separated. There should be no need for anyone other than - Plain Black Software to use this package. + +Package to manipulate WebGUI storage nodes. The nodes system is a two-tiered filesystem hash that WebGUI uses to keep attachment data separated. There should be no need for anyone other than Plain Black Software to use this package. =head1 METHODS - These methods are available from this package: +These methods are available from this package: =cut @@ -52,7 +49,7 @@ use WebGUI::Session; =head2 create ( ) - Creates this node on the file system. +Creates this node on the file system. =cut @@ -76,7 +73,7 @@ sub create { =head2 delete ( ) - Deletes this node and its contents (if any) from the filesystem. +Deletes this node and its contents (if any) from the filesystem. =cut @@ -89,7 +86,7 @@ sub delete { =head2 getPath ( ) - Returns a full path to this node. +Returns a full path to this node. =cut @@ -107,7 +104,7 @@ sub getPath { =head2 getURL ( ) - Returns a full URL to this node. +Returns a full URL to this node. =cut @@ -125,7 +122,19 @@ sub getURL { =head2 new ( node1 [, node2 ] ) - Constructor. +Constructor. + +=over + +=item node1 + + The first level of the hash heirarchy. + +=item node2 + + The second level of the hash heirarchy. + +=back =cut diff --git a/lib/WebGUI/Page.pm b/lib/WebGUI/Page.pm index 64fc78960..a86a702e4 100644 --- a/lib/WebGUI/Page.pm +++ b/lib/WebGUI/Page.pm @@ -28,7 +28,7 @@ use WebGUI::Template; =head1 NAME - Package WebGUI::Page +Package WebGUI::Page =head1 SYNOPSIS @@ -42,11 +42,11 @@ use WebGUI::Template; =head1 DESCRIPTION - This package provides utility functions for WebGUI's page system. +This package provides utility functions for WebGUI's page system. =head1 METHODS - These functions are available from this package: +These functions are available from this package: =cut @@ -60,11 +60,15 @@ sub _newPositionFormat { =head2 countTemplatePositions ( templateId ) - Returns the number of template positions in the specified page template. +Returns the number of template positions in the specified page template. + +=over =item templateId - The id of the page template you wish to count. +The id of the page template you wish to count. + +=back =cut @@ -82,11 +86,15 @@ sub countTemplatePositions { =head2 drawTemplate ( templateId ) - Returns an HTML string containing a small representation of the page template. +Returns an HTML string containing a small representation of the page template. + +=over =item templateId - The id of the page template you wish to draw. +The id of the page template you wish to draw. + +=back =cut @@ -104,8 +112,7 @@ sub drawTemplate { =head2 getTemplateList - Returns a hash reference containing template ids and template titles - for all the page templates available in the system. +Returns a hash reference containing template ids and template titles for all the page templates available in the system. =cut @@ -117,11 +124,15 @@ sub getTemplateList { =head2 getTemplate ( templateId ) - Returns an HTML template. +Returns an HTML template. + +=over =item templateId - The id of the page template you wish to retrieve. +The id of the page template you wish to retrieve. + +=back =cut @@ -135,12 +146,15 @@ sub getTemplate { =head2 getTemplatePositions ( templateId ) - Returns a hash reference containing the positions available in - the specified page template. +Returns a hash reference containing the positions available in the specified page template. + +=over =item templateId - The id of the page template you wish to retrieve the positions from. +The id of the page template you wish to retrieve the positions from. + +=back =cut @@ -157,15 +171,19 @@ sub getTemplatePositions { =head2 makeUnique ( pageURL, pageId ) - Returns a unique page URL. +Returns a unique page URL. + +=over =item url - The URL you're hoping for. +The URL you're hoping for. =item pageId - The page id of the page you're creating a URL for. +The page id of the page you're creating a URL for. + +=back =cut diff --git a/lib/WebGUI/Paginator.pm b/lib/WebGUI/Paginator.pm index ba3708c6c..b2a3444dc 100644 --- a/lib/WebGUI/Paginator.pm +++ b/lib/WebGUI/Paginator.pm @@ -21,7 +21,7 @@ use WebGUI::URL; =head1 NAME - Package WebGUI::Paginator +Package WebGUI::Paginator =head1 SYNOPSIS @@ -45,11 +45,11 @@ use WebGUI::URL; =head1 DESCRIPTION - Package that paginates rows of arbitrary data for display on the web. +Package that paginates rows of arbitrary data for display on the web. =head1 METHODS - These methods are available from this class: +These methods are available from this class: =cut @@ -58,13 +58,15 @@ use WebGUI::URL; =head2 getBar ( [ pageNumber ] ) - Returns the pagination bar including First, Previous, Next, and - last links. If there's only one page, nothing is returned. +Returns the pagination bar including First, Previous, Next, and last links. If there's only one page, nothing is returned. + +=over =item pageNumber - - Defaults to the page you're currently viewing. This is mostly here - as an override and probably has no real use. + +Defaults to the page you're currently viewing. This is mostly here as an override and probably has no real use. + +=back =cut @@ -91,14 +93,15 @@ sub getBar { =head2 getBarAdvanced ( [ pageNumber ] ) - Returns the pagination bar including First, Previous, Page Numbers, - Next, and Last links. If there's only one page, nothing is - returned. +Returns the pagination bar including First, Previous, Page Numbers, Next, and Last links. If there's only one page, nothing is returned. + +=over =item pageNumber - Defaults to the page you're currently viewing. This is mostly here - as an override and probably has no real use. +Defaults to the page you're currently viewing. This is mostly here as an override and probably has no real use. + +=back =cut @@ -127,13 +130,15 @@ sub getBarAdvanced { =head2 getBarSimple ( [ pageNumber ] ) - Returns the pagination bar including only Previous and Next links. - If there's only one page, nothing is returned. +Returns the pagination bar including only Previous and Next links. If there's only one page, nothing is returned. + +=over =item pageNumber - Defaults to the page you're currently viewing. This is mostly here - as an override and probably has no real use. +Defaults to the page you're currently viewing. This is mostly here as an override and probably has no real use. + +=back =cut @@ -156,14 +161,15 @@ sub getBarSimple { =head2 getBarTraditional ( [ pageNumber ] ) - Returns the pagination bar including Previous, Page Numbers, - and Next links. If there's only one page, nothing is - returned. +Returns the pagination bar including Previous, Page Numbers, and Next links. If there's only one page, nothing is returned. + +=over =item pageNumber - Defaults to the page you're currently viewing. This is mostly here - as an override and probably has no real use. +Defaults to the page you're currently viewing. This is mostly here as an override and probably has no real use. + +=back =cut @@ -188,12 +194,15 @@ sub getBarTraditional { =head2 getFirstPageLink ( [ pageNumber ] ) - Returns a link to the first page's data. +Returns a link to the first page's data. + +=over =item pageNumber - Defaults to the page you're currently viewing. This is mostly here - as an override and probably has no real use. +Defaults to the page you're currently viewing. This is mostly here as an override and probably has no real use. + +=back =cut @@ -215,12 +224,15 @@ sub getFirstPageLink { =head2 getLastPageLink ( [ pageNumber ] ) - Returns a link to the last page's data. +Returns a link to the last page's data. + +=over =item pageNumber - Defaults to the page you're currently viewing. This is mostly here - as an override and probably has no real use. +Defaults to the page you're currently viewing. This is mostly here as an override and probably has no real use. + +=back =cut @@ -242,12 +254,15 @@ sub getLastPageLink { =head2 getNextPageLink ( [ pageNumber ] ) - Returns a link to the next page's data. +Returns a link to the next page's data. + +=over =item pageNumber - Defaults to the page you're currently viewing. This is mostly here - as an override and probably has no real use. +Defaults to the page you're currently viewing. This is mostly here as an override and probably has no real use. + +=back =cut @@ -267,7 +282,7 @@ sub getNextPageLink { =head2 getNumberOfPages ( ) - Returns the number of pages in this paginator. +Returns the number of pages in this paginator. =cut @@ -282,15 +297,17 @@ sub getNumberOfPages { =head2 getPage ( [ pageNumber ] ) - Returns the data from the page specified as a string. +Returns the data from the page specified as a string. - NOTE: This is really only useful if you passed in an array reference - of strings when you created this object. +NOTE: This is really only useful if you passed in an array reference of strings when you created this object. + +=over =item pageNumber - Defaults to the page you're currently viewing. This is mostly here - as an override and probably has no real use. +Defaults to the page you're currently viewing. This is mostly here as an override and probably has no real use. + +=back =cut @@ -303,12 +320,15 @@ sub getPage { =head2 getPageData ( [ pageNumber ] ) - Returns the data from the page specified as an array reference. +Returns the data from the page specified as an array reference. + +=over =item pageNumber - Defaults to the page you're currently viewing. This is mostly here - as an override and probably has no real use. +Defaults to the page you're currently viewing. This is mostly here as an override and probably has no real use. + +=back =cut @@ -331,8 +351,7 @@ sub getPageData { =head2 getPageNumber ( ) - Returns the current page number. If no page number can be found - then it returns 1. +Returns the current page number. If no page number can be found then it returns 1. =cut @@ -344,12 +363,15 @@ sub getPageNumber { =head2 getPageLinks ( [ pageNumber ] ) - Returns links to all pages in this paginator. +Returns links to all pages in this paginator. + +=over =item pageNumber - Defaults to the page you're currently viewing. This is mostly here - as an override and probably has no real use. +Defaults to the page you're currently viewing. This is mostly here as an override and probably has no real use. + +=back =cut @@ -373,12 +395,15 @@ sub getPageLinks { =head2 getPreviousPageLink ( [ pageNumber ] ) - Returns a link to the previous page's data. +Returns a link to the previous page's data. + +=over =item pageNumber - Defaults to the page you're currently viewing. This is mostly here - as an override and probably has no real use. +Defaults to the page you're currently viewing. This is mostly here as an override and probably has no real use. + +=back =cut @@ -398,32 +423,31 @@ sub getPreviousPageLink { =head2 new ( currentURL, rowArrayRef [, paginateAfter, pageNumber, formVar ] ) - Constructor. +Constructor. + +=over =item currentURL - The URL of the current page including attributes. The page number - will be appended to this in all links generated by the paginator. +The URL of the current page including attributes. The page number will be appended to this in all links generated by the paginator. =item rowArrayRef - An array reference to all the rows of data for this page. +An array reference to all the rows of data for this page. =item paginateAfter - The number of rows to display per page. If left blank it defaults - to 50. +The number of rows to display per page. If left blank it defaults to 50. =item pageNumber - By default the paginator uses a form variable of "pn" to determine the - page number. If you wish it to use some other variable, then specify - the page number here. +By default the paginator uses a form variable of "pn" to determine the page number. If you wish it to use some other variable, then specify the page number here. =item formVar - Specify the form variable the paginator should use in it's links. - Defaults to "pn". +Specify the form variable the paginator should use in it's links. Defaults to "pn". + +=back =cut @@ -442,18 +466,21 @@ sub new { =head2 setDataByQuery ( query [, dbh ] ) - Retrieves a data set from a database and replaces whatever data - set was passed in through the constructor. +Retrieves a data set from a database and replaces whatever data set was passed in through the constructor. - NOTE: This retrieves only the current page's data for efficiency. +NOTE: This retrieves only the current page's data for efficiency. + +=over =item query - An SQL query that will retrieve a data set. +An SQL query that will retrieve a data set. =item dbh - A DBI-style database handler. Defaults to the WebGUI site handler. +A DBI-style database handler. Defaults to the WebGUI site handler. + +=back =cut diff --git a/lib/WebGUI/Privilege.pm b/lib/WebGUI/Privilege.pm index b3516189c..c7f66538d 100644 --- a/lib/WebGUI/Privilege.pm +++ b/lib/WebGUI/Privilege.pm @@ -24,7 +24,7 @@ use WebGUI::URL; =head1 NAME - Package WebGUI::Privilege +Package WebGUI::Privilege =head1 SYNOPSIS @@ -41,12 +41,11 @@ use WebGUI::URL; =head1 DESCRIPTION - This package provides access to the WebGUI security system - and security messages. +This package provides access to the WebGUI security system and security messages. =head1 FUNCTIONS - These functions are available from this package: +These functions are available from this package: =cut @@ -54,9 +53,7 @@ use WebGUI::URL; =head2 adminOnly ( ) - Returns a message stating that this functionality can only be used - by administrators. This method also sets the HTTP header status to - 401. +Returns a message stating that this functionality can only be used by administrators. This method also sets the HTTP header status to 401. =cut @@ -87,13 +84,15 @@ sub adminOnly { =head2 canEditPage ( [ pageId ] ) - Returns a boolean (0|1) value signifying that the user has the - required privileges. +Returns a boolean (0|1) value signifying that the user has the required privileges. + +=over =item pageId - The unique identifier for the page that you wish to check the - privileges on. Defaults to the current page id. +The unique identifier for the page that you wish to check the privileges on. Defaults to the current page id. + +=back =cut @@ -123,14 +122,15 @@ sub canEditPage { =head2 canViewPage ( [ pageId ] ) - Returns a boolean (0|1) value signifying that the user has the - required privileges. Always returns true for Admins and users that - have the rights to edit this page. +Returns a boolean (0|1) value signifying that the user has the required privileges. Always returns true for Admins and users that have the rights to edit this page. + +=over =item pageId - The unique identifier for the page that you wish to check the - privileges on. Defaults to the current page id. +The unique identifier for the page that you wish to check the privileges on. Defaults to the current page id. + +=back =cut @@ -165,9 +165,7 @@ sub canViewPage { =head2 insufficient ( ) - Returns a message stating that the user does not have the required - privileges to perform the operation they requested. This method - also sets the HTTP header status to 401. +Returns a message stating that the user does not have the required privileges to perform the operation they requested. This method also sets the HTTP header status to 401. =cut @@ -193,17 +191,19 @@ sub insufficient { =head2 isInGroup ( groupId [ , userId ] ) - Returns a boolean (0|1) value signifying that the user has the - required privileges. Always returns true for Admins. +Returns a boolean (0|1) value signifying that the user has the required privileges. Always returns true for Admins. + +=over =item groupId - The group that you wish to verify against the user. +The group that you wish to verify against the user. =item userId - The user that you wish to verify against the group. Defaults to the - currently logged in user. +The user that you wish to verify against the group. Defaults to the currently logged in user. + +=back =cut @@ -277,9 +277,7 @@ sub isInGroup { =head2 noAccess ( ) - Returns a message stating that the user does not have the privileges - necessary to access this page. This method also sets the HTTP header - status to 401. +Returns a message stating that the user does not have the privileges necessary to access this page. This method also sets the HTTP header status to 401. =cut @@ -308,9 +306,7 @@ sub noAccess { =head2 notMember ( ) - Returns a message stating that the user they requested information - about is no longer active on this server. This method also sets the - HTTP header status to 400. +Returns a message stating that the user they requested information about is no longer active on this server. This method also sets the HTTP header status to 400. =cut @@ -335,9 +331,7 @@ sub notMember { =head2 vitalComponent ( ) - Returns a message stating that the user made a request to delete - something that should never delete. This method also sets the HTTP - header status to 403. +Returns a message stating that the user made a request to delete something that should never delete. This method also sets the HTTP header status to 403. =cut diff --git a/lib/WebGUI/Profile.pm b/lib/WebGUI/Profile.pm index 4a3fc6e28..2c49c0ab5 100644 --- a/lib/WebGUI/Profile.pm +++ b/lib/WebGUI/Profile.pm @@ -21,7 +21,7 @@ use WebGUI::URL; =head1 NAME - Package WebGUI::Profile +Package WebGUI::Profile =head1 SYNOPSIS @@ -30,11 +30,11 @@ use WebGUI::URL; =head1 DESCRIPTION - Package that allows getting and setting of user profile information. +Package that allows getting and setting of user profile information. =head1 METHODS - These methods are available from this class: +These methods are available from this class: =cut @@ -43,7 +43,7 @@ use WebGUI::URL; =head2 get ( ) - Returns a profile hash for this user. +Returns a profile hash for this user. =cut @@ -58,12 +58,16 @@ sub get { =head2 new ( userId ) - Constructor. +Constructor. + +=over =item userId The userId for the profile you wish to manipulate. +=back + =cut sub new { @@ -75,17 +79,21 @@ sub new { #------------------------------------------------------------------- -=head setAttribute ( attributeName, value ) +=head2 setAttribute ( attributeName, value ) - Sets the value of an attribute. +Sets the value of an attribute. + +=over =item attributeName - An attribute of the user profile. +An attribute of the user profile. =item value - The value to set the above named attribute to. +The value to set the above named attribute to. + +=back =cut diff --git a/lib/WebGUI/SQL.pm b/lib/WebGUI/SQL.pm index 16379d380..5c47aecc5 100644 --- a/lib/WebGUI/SQL.pm +++ b/lib/WebGUI/SQL.pm @@ -27,7 +27,7 @@ our @EXPORT = qw("e &getNextId); =head1 NAME - Package WebGUI::SQL +Package WebGUI::SQL =head1 SYNOPSIS @@ -58,13 +58,11 @@ our @EXPORT = qw("e &getNextId); =head1 DESCRIPTION - Package for interfacing with SQL databases. This package - implements Perl DBI functionality in a less code-intensive - manner and adds some extra functionality. +Package for interfacing with SQL databases. This package implements Perl DBI functionality in a less code-intensive manner and adds some extra functionality. =head1 METHODS - These methods are available from this package: +These methods are available from this package: =cut @@ -73,7 +71,7 @@ our @EXPORT = qw("e &getNextId); =head2 array ( ) - Returns the next row of data as an array. +Returns the next row of data as an array. =cut @@ -86,16 +84,19 @@ sub array { =head2 buildArray ( sql [, dbh ] ) - Builds an array of data from a series of rows. +Builds an array of data from a series of rows. + +=over =item sql - An SQL query. The query must select only one column of data. +An SQL query. The query must select only one column of data. =item dbh - By default this method uses the WebGUI database handler. However, - you may choose to pass in your own if you wish. +By default this method uses the WebGUI database handler. However, you may choose to pass in your own if you wish. + +=back =cut @@ -116,17 +117,19 @@ sub buildArray { =head2 buildHash ( sql [, dbh ] ) - Builds a hash of data from a series of rows. +Builds a hash of data from a series of rows. + +=over =item sql - An SQL query. The query must select only two columns of data, the - first being the key for the hash, the second being the value. +An SQL query. The query must select only two columns of data, the first being the key for the hash, the second being the value. =item dbh - By default this method uses the WebGUI database handler. However, - you may choose to pass in your own if you wish. +By default this method uses the WebGUI database handler. However, you may choose to pass in your own if you wish. + +=back =cut @@ -146,17 +149,19 @@ sub buildHash { =head2 buildHashRef ( sql [, dbh ] ) - Builds a hash reference of data from a series of rows. +Builds a hash reference of data from a series of rows. + +=over =item sql - An SQL query. The query must select only two columns of data, the - first being the key for the hash, the second being the value. +An SQL query. The query must select only two columns of data, the first being the key for the hash, the second being the value. =item dbh - By default this method uses the WebGUI database handler. However, - you may choose to pass in your own if you wish. + By default this method uses the WebGUI database handler. However, you may choose to pass in your own if you wish. + +=back =cut @@ -172,7 +177,7 @@ sub buildHashRef { =head2 errorCode { - Returns an error code for the current handler. +Returns an error code for the current handler. =cut @@ -185,7 +190,7 @@ sub errorCode { =head2 errorMessage { - Returns a text error message for the current handler. +Returns a text error message for the current handler. =cut @@ -198,7 +203,7 @@ sub errorMessage { =head2 finish ( ) - Ends a query after calling the "new" or "read" methods. +Ends a query after calling the "new" or "read" methods. =cut @@ -211,7 +216,7 @@ sub finish { =head2 getColumnNames { - Returns an array of column names. Use with a "read" method. +Returns an array of column names. Use with a "read" method. =cut @@ -224,14 +229,17 @@ sub getColumnNames { =head2 getNextId ( idName ) - Increments an incrementer of the specified type and returns the - value. NOTE: This is not a regular method, but is an exported - subroutine. +Increments an incrementer of the specified type and returns the value. + +NOTE: This is not a regular method, but is an exported subroutine. + +=over =item idName - Specify the name of one of the incrementers in the incrementer - table. +Specify the name of one of the incrementers in the incrementer table. + +=back =cut @@ -245,10 +253,9 @@ sub getNextId { #------------------------------------------------------------------- -=head2 hash +=head2 hash ( ) - Returns the next row of data in the form of a hash. Must be - executed on a statement handler returned by the "read" method. +Returns the next row of data in the form of a hash. Must be executed on a statement handler returned by the "read" method. =cut @@ -265,10 +272,9 @@ sub hash { #------------------------------------------------------------------- -=head2 hashRef +=head2 hashRef ( ) - Returns the next row of data in the form of a hash reference. Must - be executed on a statement handler returned by the "read" method. +Returns the next row of data in the form of a hash reference. Must be executed on a statement handler returned by the "read" method. =cut @@ -289,16 +295,19 @@ sub hashRef { =head2 new ( sql [, dbh ] ) - Constructor. Returns a statement handler. +Constructor. Returns a statement handler. + +=over =item sql - An SQL query. +An SQL query. =item dbh - By default this method uses the WebGUI database handler. However, - you may choose to pass in your own if you wish. +By default this method uses the WebGUI database handler. However, you may choose to pass in your own if you wish. + +=back =cut @@ -320,16 +329,19 @@ sub new { =head2 quickArray ( sql [, dbh ] ) - Executes a query and returns a single row of data as an array. +Executes a query and returns a single row of data as an array. + +=over =item sql - An SQL query. +An SQL query. =item dbh - By default this method uses the WebGUI database handler. However, - you may choose to pass in your own if you wish. +By default this method uses the WebGUI database handler. However, you may choose to pass in your own if you wish. + +=back =cut @@ -346,17 +358,19 @@ sub quickArray { =head2 quickCSV ( sql [, dbh ] ) - Executes a query and returns a comma delimited text blob with column - headers. +Executes a query and returns a comma delimited text blob with column headers. + +=over =item sql - An SQL query. +An SQL query. =item dbh - By default this method uses the WebGUI database handler. However, - you may choose to pass in your own if you wish. +By default this method uses the WebGUI database handler. However, you may choose to pass in your own if you wish. + +=back =cut @@ -377,16 +391,19 @@ sub quickCSV { =head2 quickHash ( sql [, dbh ] ) - Executes a query and returns a single row of data as a hash. +Executes a query and returns a single row of data as a hash. + +=over =item sql - An SQL query. +An SQL query. =item dbh - By default this method uses the WebGUI database handler. However, - you may choose to pass in your own if you wish. +By default this method uses the WebGUI database handler. However, you may choose to pass in your own if you wish. + +=back =cut @@ -406,17 +423,19 @@ sub quickHash { =head2 quickHashRef ( sql [, dbh ] ) - Executes a query and returns a single row of data as a hash - reference. +Executes a query and returns a single row of data as a hash reference. + +=over =item sql - An SQL query. +An SQL query. =item dbh - By default this method uses the WebGUI database handler. However, - you may choose to pass in your own if you wish. +By default this method uses the WebGUI database handler. However, you may choose to pass in your own if you wish. + +=back =cut @@ -436,17 +455,19 @@ sub quickHashRef { =head2 quickTab ( sql [, dbh ] ) - Executes a query and returns a tab delimited text blob with column - headers. +Executes a query and returns a tab delimited text blob with column headers. + +=over =item sql - An SQL query. +An SQL query. =item dbh - By default this method uses the WebGUI database handler. However, - you may choose to pass in your own if you wish. +By default this method uses the WebGUI database handler. However, you may choose to pass in your own if you wish. + +=back =cut @@ -466,13 +487,17 @@ sub quickTab { =head2 quote ( string ) - Returns a string quoted and ready for insert into the database. - NOTE: This is not a regular method, but is an exported subroutine. +Returns a string quoted and ready for insert into the database. + +NOTE: This is not a regular method, but is an exported subroutine. + +=over =item string - Any scalar variable that needs to be escaped to be inserted into - the database. +Any scalar variable that needs to be escaped to be inserted into the database. + +=back =cut @@ -486,16 +511,19 @@ sub quote { =head2 read ( sql [, dbh ] ) - An alias of the "new" method. Returns a statement handler. +An alias of the "new" method. Returns a statement handler. + +=over =item sql - An SQL query. +An SQL query. =item dbh - By default this method uses the WebGUI database handler. However, - you may choose to pass in your own if you wish. +By default this method uses the WebGUI database handler. However, you may choose to pass in your own if you wish. + +=back =cut @@ -508,8 +536,7 @@ sub read { =head2 rows ( ) - Returns the number of rows in a statement handler created by the - "read" method. +Returns the number of rows in a statement handler created by the "read" method. =cut @@ -522,19 +549,19 @@ sub rows { =head2 unconditionalRead ( sql [, dbh ] ) - An alias of the "read" method except that it will not cause a fatal - error in WebGUI if the query is invalid. This is useful for user - generated queries such as those in the SQL Report. Returns a - statement handler. +An alias of the "read" method except that it will not cause a fatal error in WebGUI if the query is invalid. This is useful for user generated queries such as those in the SQL Report. Returns a statement handler. + +=over =item sql - An SQL query. +An SQL query. =item dbh - By default this method uses the WebGUI database handler. However, - you may choose to pass in your own if you wish. +By default this method uses the WebGUI database handler. However, you may choose to pass in your own if you wish. + +=back =cut @@ -551,18 +578,19 @@ sub unconditionalRead { =head2 write ( sql [, dbh ] ) - A method specifically designed for writing to the database in an - efficient manner. Writing can be accomplished using the "new" - method, but it is not as efficient. +A method specifically designed for writing to the database in an efficient manner. Writing can be accomplished using the "new" method, but it is not as efficient. + +=over =item sql - An SQL insert or update. +An SQL insert or update. =item dbh - By default this method uses the WebGUI database handler. However, - you may choose to pass in your own if you wish. +By default this method uses the WebGUI database handler. However, you may choose to pass in your own if you wish. + +=back =cut diff --git a/lib/WebGUI/Search.pm b/lib/WebGUI/Search.pm index 77eff470a..d69d60876 100644 --- a/lib/WebGUI/Search.pm +++ b/lib/WebGUI/Search.pm @@ -25,7 +25,7 @@ use WebGUI::SQL; =head1 NAME - Package WebGUI::Search +Package WebGUI::Search =head1 SYNOPSIS @@ -35,12 +35,11 @@ use WebGUI::SQL; =head1 DESCRIPTION - A package built to take the hassle out of creating advanced search - functionality in WebGUI applications. +A package built to take the hassle out of creating advanced search functionality in WebGUI applications. =head1 METHODS - These methods are available from this package: +These methods are available from this package: =cut @@ -49,37 +48,31 @@ use WebGUI::SQL; =head2 buildConstraints ( fieldList ) { [ all, atLeastOne, exactPhrase, without ] } - Generates and returns the constraints to an SQL where clause based - upon input from the user. +Generates and returns the constraints to an SQL where clause based upon input from the user. + +=over =item fieldList - An array reference that contains a list of the fields (table - columns) to be considered when searching. +An array reference that contains a list of the fields (table columns) to be considered when searching. =item all - A form param with a comma or space separated list of key words to - search for in the fields of the fieldList. All the words listed - here must be found to be true. +A form param with a comma or space separated list of key words to search for in the fields of the fieldList. All the words listed here must be found to be true. =item atLeastOne - A form param with a comma or space separated list of key words to - search for in the fields of the fieldList. Any of the words may - match in any of the fields for this to be true. +A form param with a comma or space separated list of key words to search for in the fields of the fieldList. Any of the words may match in any of the fields for this to be true. =item exactPhrase - A form param with a phrase to search for in the fields of the - fieldList. The exact phrase must be found in one of the fields - to be true. +A form param with a phrase to search for in the fields of the fieldList. The exact phrase must be found in one of the fields to be true. =item without - A form param with a comma or space separated list of key words to - search for in the fields of the fieldList. None of the words may - be found in any of the fields for this to be true. +A form param with a comma or space separated list of key words to search for in the fields of the fieldList. None of the words may be found in any of the fields for this to be true. + +=back =cut @@ -143,17 +136,19 @@ sub buildConstraints { =head2 form ( hiddenFields ) { [ numResults ] } - Generates and returns the advanced search form. +Generates and returns the advanced search form. + +=over =item hiddenFields - A hash reference that contains any name/value pairs that should be - included as hidden fields in the search form. +A hash reference that contains any name/value pairs that should be included as hidden fields in the search form. =item numResults - A form param that can optionally specify the number of results to - display. Defaults to 25. +A form param that can optionally specify the number of results to display. Defaults to 25. + +=back =cut @@ -201,6 +196,22 @@ sub form { } #------------------------------------------------------------------- + +=head2 toggleURL ( [ pairs ] ) + +Returns a URL that toggles the value "search" in the user's scratch +variables on and off. + +=over + +=item pairs + +URL name value pairs (this=that&foo=bar) to be passed with this toggle. + +=back + +=cut + sub toggleURL { WebGUI::Session::setScratch("search",$session{form}{search}); my $url; diff --git a/lib/WebGUI/Session.pm b/lib/WebGUI/Session.pm index 8d339152f..df2ecc885 100644 --- a/lib/WebGUI/Session.pm +++ b/lib/WebGUI/Session.pm @@ -33,7 +33,7 @@ tie %session, 'Tie::CPHash'; =head1 NAME - Package WebGUI::Session +Package WebGUI::Session =head1 SYNOPSIS @@ -53,23 +53,15 @@ tie %session, 'Tie::CPHash'; =head1 DESCRIPTION - This package is the heart and lifeblood of WebGUI. Without it WebGUI - could not exist. By using this package a package gains access to - WebGUI's $session variable which contains everything WebGUI needs to - know to operate. +This package is the heart and lifeblood of WebGUI. Without it WebGUI could not exist. By using this package a package gains access to WebGUI's $session variable which contains everything WebGUI needs to know to operate. - NOTE: It is important to distinguish the difference between a WebGUI - session and a user session. A user session is attached to a WebGUI - session. A WebGUI session is all of the basic data the WebGUI needs - to operate. +NOTE: It is important to distinguish the difference between a WebGUI session and a user session. A user session is attached to a WebGUI session. A WebGUI session is all of the basic data the WebGUI needs to operate. - TIP: The $session variable is a case-insensitive hash. The contents - of the has vary, but can be seen by adding debug=1 to the end of any - WebGUI URL while logged in as an admin user. +TIP: The $session variable is a case-insensitive hash. The contents of the has vary, but can be seen by adding debug=1 to the end of any WebGUI URL while logged in as an admin user. =head1 METHODS - These subroutines are available from this package: +These subroutines are available from this package: =cut @@ -248,8 +240,7 @@ sub _loadWobjects { =head2 close - Cleans up a WebGUI session information from memory and disconnects from - any resources opened by the session. +Cleans up a WebGUI session information from memory and disconnects from any resources opened by the session. =cut @@ -263,15 +254,19 @@ sub close { =head2 convertVisitorToUser ( sessionId, userId ) - Converts a visitor session to a user session. +Converts a visitor session to a user session. + +=over =item sessionId - The session to convert. +The session to convert. =item userId - The user for the session to become. +The user for the session to become. + +=back =cut @@ -285,11 +280,15 @@ sub convertVisitorToUser { =head2 end ( sessionId ) - Removes the specified user session from memory and database. +Removes the specified user session from memory and database. + +=over =item sessionId - The session to end. +The session to end. + +=back =cut @@ -305,7 +304,7 @@ sub end { =head2 httpHeader ( ) - Generates an HTTP header. +Generates an HTTP header. =cut @@ -328,11 +327,15 @@ sub httpHeader { =head2 httpRedirect ( url ) - Generates an HTTP header for redirect. +Generates an HTTP header for redirect. + +=over =item url - The URL to redirect to. +The URL to redirect to. + +=back =cut @@ -345,15 +348,19 @@ sub httpRedirect { =head2 open ( webguiRoot [ , configFile ] ) - Opens a closed ( or new ) WebGUI session. +Opens a closed ( or new ) WebGUI session. + +=over =item webguiRoot - The path to the WebGUI files. +The path to the WebGUI files. =item configFile - The filename of the config file that WebGUI should operate from. +The filename of the config file that WebGUI should operate from. + +=back =cut @@ -461,12 +468,15 @@ sub open { =head2 refreshPageInfo ( [ pageId ] ) - Updates the WebGUI session to reflect new page information. +Updates the WebGUI session to reflect new page information. + +=over =item pageId - Defaults to page id "1". Specify the page id to change this WebGUI - session to use. +Defaults to page id "1". Specify the page id to change this WebGUI session to use. + +=back =cut @@ -484,13 +494,17 @@ sub refreshPageInfo { =head2 refreshSessionVars ( sessionId ) - Updates the user session variables from the database. +Updates the user session variables from the database. - NOTE: This also updates the user information. +NOTE: This also updates the user information. + +=over =item sessionId - The session id to update. +The session id to update. + +=back =cut @@ -503,13 +517,16 @@ sub refreshSessionVars { =head2 refreshUserInfo ( userId ) - Refreshes the user's information from the database into this user - session. +Refreshes the user's information from the database into this user session. + +=over =item userId The user id to refresh into this session. +=back + =cut sub refreshUserInfo { @@ -521,21 +538,23 @@ sub refreshUserInfo { =head2 setCookie ( name, value [ , timeToLive ] ) - Sends a cookie to the browser. +Sends a cookie to the browser. + +=over =item name - The name of the cookie to set. Must be unique from all other cookies - from this domain or it will overwrite that cookie. +The name of the cookie to set. Must be unique from all other cookies from this domain or it will overwrite that cookie. =item value - The value to set. +The value to set. =item timeToLive - The time that the cookie should remain in the browser. Defaults to - "+10y" (10 years from now). +The time that the cookie should remain in the browser. Defaults to "+10y" (10 years from now). + +=back =cut @@ -556,19 +575,19 @@ sub setCookie { =head2 setScratch ( name, value ) - Sets a scratch variable for this user session. Scratch variables are - just arbitrary bits of data that a programmer may wish to store in - a user session from page to page. +Sets a scratch variable for this user session. Scratch variables are just arbitrary bits of data that a programmer may wish to store in a user session from page to page. + +=over =item name - The name of the scratch variable. +The name of the scratch variable. =item value - The value of the scratch variable. If the value is blank but defined - or if it is set to "-delete-" then the scratch variable will be - removed from the user session. +The value of the scratch variable. If the value is blank but defined or if it is set to "-delete-" then the scratch variable will be removed from the user session. + +=back =cut @@ -593,16 +612,19 @@ sub setScratch { =head2 start ( userId [ , sessionId ] ) - Start a new user session. +Start a new user session. + +=over =item userId - The user id of the user to create a session for. +The user id of the user to create a session for. =item sessionId - Session id will be generated if not specified. In almost every case - you should let the system generate the session id. +Session id will be generated if not specified. In almost every case you should let the system generate the session id. + +=back =cut diff --git a/lib/WebGUI/Style.pm b/lib/WebGUI/Style.pm index 8a16d7b1b..57a13a69c 100644 --- a/lib/WebGUI/Style.pm +++ b/lib/WebGUI/Style.pm @@ -25,7 +25,7 @@ use WebGUI::Template; =head1 NAME - Package WebGUI::Style +Package WebGUI::Style =head1 SYNOPSIS @@ -34,11 +34,11 @@ use WebGUI::Template; =head1 DESCRIPTION - This package contains utility methods for WebGUI's style system. +This package contains utility methods for WebGUI's style system. =head1 METHODS - These subroutines are available from this package: +These subroutines are available from this package: =cut @@ -47,7 +47,7 @@ use WebGUI::Template; =head2 get ( ) - Returns a style based upon the current WebGUI session information. +Returns a style based upon the current WebGUI session information. =cut diff --git a/lib/WebGUI/Template.pm b/lib/WebGUI/Template.pm index 930775747..662dc6a98 100644 --- a/lib/WebGUI/Template.pm +++ b/lib/WebGUI/Template.pm @@ -26,7 +26,7 @@ use WebGUI::SQL; =head1 NAME - Package WebGUI::Template +Package WebGUI::Template =head1 SYNOPSIS @@ -38,28 +38,32 @@ use WebGUI::SQL; =head1 DESCRIPTION - This package contains utility methods for WebGUI's template system. +This package contains utility methods for WebGUI's template system. =head1 METHODS - These subroutines are available from this package: +These subroutines are available from this package: =cut #------------------------------------------------------------------- -=head get ( [ templateId, namespace ] ) +=head2 get ( [ templateId, namespace ] ) - Returns a template. +Returns a template. + +=over =item templateId - Defaults to "1". Specify the templateId of the template to retrieve. +Defaults to "1". Specify the templateId of the template to retrieve. =item namespace - Defaults to "Page". Specify the namespace of the template to retrieve. +Defaults to "Page". Specify the namespace of the template to retrieve. + +=back =cut @@ -76,12 +80,15 @@ sub get { =head2 getList ( [ namespace ] ) - Returns a hash reference containing template ids and template names - of all the templates in the specified namespace. +Returns a hash reference containing template ids and template names of all the templates in the specified namespace. + +=over =item namespace - Defaults to "Page". Specify the namespace to build the list for. +Defaults to "Page". Specify the namespace to build the list for. + +=back =cut @@ -95,16 +102,19 @@ sub getList { =head2 process ( template [ , vars ] ) - Evaluate a template replacing template commands for HTML. +Evaluate a template replacing template commands for HTML. + +=over =item template - The template to process. +The template to process. =item vars - A hash reference containing template variables and loops. Automatically - includes the entire WebGUI session. +A hash reference containing template variables and loops. Automatically includes the entire WebGUI session. + +=back =cut diff --git a/lib/WebGUI/URL.pm b/lib/WebGUI/URL.pm index 844a0cb01..757d95fb9 100644 --- a/lib/WebGUI/URL.pm +++ b/lib/WebGUI/URL.pm @@ -23,7 +23,7 @@ use WebGUI::Utility; =head1 NAME - Package WebGUI::URL +Package WebGUI::URL =head1 SYNOPSIS @@ -38,14 +38,11 @@ use WebGUI::Utility; =head1 DESCRIPTION - This package provides URL writing functionality. It is important that - all WebGUI URLs be written using these methods so that they can contain - any extra information that WebGUI needs to add to the URLs in order - to function properly. +This package provides URL writing functionality. It is important that all WebGUI URLs be written using these methods so that they can contain any extra information that WebGUI needs to add to the URLs in order to function properly. =head1 METHODS - These subroutines are available from this package: +These subroutines are available from this package: =cut @@ -55,18 +52,22 @@ use WebGUI::Utility; =head2 append ( url, pairs ) - Returns a URL after adding some information to the end of it. +Returns a URL after adding some information to the end of it. + +=over =item url - The URL to append information to. +The URL to append information to. =item pairs - Name value pairs to add to the URL in the form of: +Name value pairs to add to the URL in the form of: name1=value1&name2=value2&name3=value3 +=back + =cut sub append { @@ -84,13 +85,17 @@ sub append { =head2 escape ( string ) - Encodes a string to make it safe to pass in a URL. +Encodes a string to make it safe to pass in a URL. - NOTE: See WebGUI::URL::unescape() +NOTE: See WebGUI::URL::unescape() + +=over =item string - The string to escape. +The string to escape. + +=back =cut @@ -103,18 +108,22 @@ sub escape { =head2 gateway ( pageURL [ , pairs ] ) - Generate a URL based on WebGUI's gateway script. +Generate a URL based on WebGUI's gateway script. + +=over =item pageURL - The urlized title of a page that you wish to create a URL for. +The urlized title of a page that you wish to create a URL for. =item pairs - Name value pairs to add to the URL in the form of: +Name value pairs to add to the URL in the form of: name1=value1&name2=value2&name3=value3 +=back + =cut sub gateway { @@ -133,12 +142,15 @@ sub gateway { =head2 makeCompliant ( string ) - Returns a string that has made into a WebGUI compliant URL. +Returns a string that has made into a WebGUI compliant URL. + +=over =item string - The string to make compliant. This is usually a page title or a - filename. +The string to make compliant. This is usually a page title or a filename. + +=back =cut @@ -158,14 +170,18 @@ sub makeCompliant { =head2 page ( [ pairs ] ) - Returns the URL of the current page. +Returns the URL of the current page. + +=over =item pairs - Name value pairs to add to the URL in the form of: +Name value pairs to add to the URL in the form of: name1=value1&name2=value2&name3=value3 +=back + =cut sub page { @@ -184,13 +200,17 @@ sub page { =head2 unescape - Decodes a string that was URL encoded. +Decodes a string that was URL encoded. - NOTE: See WebGUI::URL::escape() +NOTE: See WebGUI::URL::escape() + +=over =item string - The string to unescape. +The string to unescape. + +=back =cut @@ -202,13 +222,16 @@ sub unescape { =head2 urlize ( string ) - Same as makeCompliant except that it also lower-cases the string. - This is mainly meant for WebGUI page URLs. +Same as makeCompliant except that it also lower-cases the string. This is mainly meant for WebGUI page URLs. + +=over =item string The string to urlize. +=back + =cut sub urlize { diff --git a/lib/WebGUI/User.pm b/lib/WebGUI/User.pm index 663cfbe6e..d10a35edf 100644 --- a/lib/WebGUI/User.pm +++ b/lib/WebGUI/User.pm @@ -24,7 +24,7 @@ use WebGUI::Authentication; =head1 NAME - Package WebGUI::User +Package WebGUI::User =head1 SYNOPSIS @@ -45,12 +45,11 @@ use WebGUI::Authentication; =head1 DESCRIPTION - This package provides an object-oriented way of managing WebGUI - users as well as getting/setting a users's profile data. +This package provides an object-oriented way of managing WebGUI users as well as getting/setting a users's profile data. =head1 METHODS - These methods are available from this class: +These methods are available from this class: =cut @@ -66,11 +65,15 @@ sub _create { =head2 addToGroups ( groups ) - Adds this user to the specified groups. +Adds this user to the specified groups. + +=over =item groups - An array reference containing a list of groups. +An array reference containing a list of groups. + +=back =cut @@ -89,13 +92,15 @@ sub addToGroups { =head2 authMethod ( [ value ] ) - Returns the authentication method for this user. +Returns the authentication method for this user. + +=over =item value - If specified, the authMethod is set to this value. The only valid - values are "WebGUI" and "LDAP". When a new account is created, - authMethod is defaulted to "WebGUI". +If specified, the authMethod is set to this value. The only valid values are "WebGUI" and "LDAP". When a new account is created, authMethod is defaulted to "WebGUI". + +=back =cut @@ -115,7 +120,7 @@ sub authMethod { =head2 dateCreated ( ) - Returns the epoch for when this user was created. +Returns the epoch for when this user was created. =cut @@ -127,7 +132,7 @@ sub dateCreated { =head2 delete ( ) - Deletes this user. +Deletes this user. =cut @@ -146,11 +151,15 @@ sub delete { =head2 deleteFromGroups ( groups ) - Deletes this user from the specified groups. +Deletes this user from the specified groups. + +=over =item groups - An array reference containing a list of groups. +An array reference containing a list of groups. + +=back =cut @@ -182,23 +191,23 @@ sub identifier { =head2 karma ( amount, source, description ) - Returns the current level of karma this user has earned. +Returns the current level of karma this user has earned. + +=over =item amount - An integer to modify this user's karma by. Note that this number can - be positive or negative. +An integer to modify this user's karma by. Note that this number can be positive or negative. =item source - A descriptive source for this karma. Typically it would be something - like "MessageBoard (49)" or "Admin (3)". Source is used to track - where a karma modification came from. +A descriptive source for this karma. Typically it would be something like "MessageBoard (49)" or "Admin (3)". Source is used to track where a karma modification came from. =item description - A description of why this user's karma was modified. For instance it - could be "Message Board Post" or "He was a good boy!". +A description of why this user's karma was modified. For instance it could be "Message Board Post" or "He was a good boy!". + +=back =cut @@ -214,7 +223,7 @@ sub karma { =head2 lastUpdated ( ) - Returns the epoch for when this user was last modified. +Returns the epoch for when this user was last modified. =cut @@ -226,14 +235,15 @@ sub lastUpdated { =head2 new ( userId ) - Constructor. +Constructor. + +=over =item userId - The userId of the user you're creating an object reference for. If - left blank it will default to "1" (Visitor). If specified as "new" - then a new user account will be created and assigned the next - available userId. +The userId of the user you're creating an object reference for. If left blank it will default to "1" (Visitor). If specified as "new" then a new user account will be created and assigned the next available userId. + +=back =cut @@ -265,17 +275,19 @@ sub new { =head2 profileField ( fieldName [ value ] ) - Returns a profile field's value. If "value" is specified, it also - sets the field to that value. +Returns a profile field's value. If "value" is specified, it also sets the field to that value. + +=over =item fieldName - The profile field name such as "language" or "email" or - "cellPhone". +The profile field name such as "language" or "email" or "cellPhone". =item value - The value to set the profile field name to. +The value to set the profile field name to. + +=back =cut @@ -297,12 +309,15 @@ sub profileField { =head2 status ( [ value ] ) - Returns the status of the user. +Returns the status of the user. + +=over =item value - If specified, the status is set to this value. - Possible values are 'Active', 'Selfdestructed' and 'Deactivated'. +If specified, the status is set to this value. Possible values are 'Active', 'Selfdestructed' and 'Deactivated'. + +=back =cut @@ -322,11 +337,15 @@ sub status { =head2 username ( [ value ] ) - Returns the username. +Returns the username. + +=over =item value - If specified, the username is set to this value. +If specified, the username is set to this value. + +=back =cut @@ -346,7 +365,7 @@ sub username { =head2 userId ( ) - Returns the userId for this user. +Returns the userId for this user. =cut diff --git a/lib/WebGUI/Utility.pm b/lib/WebGUI/Utility.pm index 38ad40956..a0fc490b5 100644 --- a/lib/WebGUI/Utility.pm +++ b/lib/WebGUI/Utility.pm @@ -27,7 +27,7 @@ our @EXPORT = qw(&makeTabSafe &makeArrayTabSafe &randomizeHash &commify &randomi =head1 NAME - Package WebGUI::Utility +Package WebGUI::Utility =head1 SYNOPSIS @@ -47,12 +47,11 @@ our @EXPORT = qw(&makeTabSafe &makeArrayTabSafe &randomizeHash &commify &randomi =head1 DESCRIPTION - This package provides miscellaneous but useful utilities to the - WebGUI programmer. +This package provides miscellaneous but useful utilities to the WebGUI programmer. =head1 METHODS - These subroutines are available from this package: +These subroutines are available from this package: =cut @@ -61,11 +60,15 @@ our @EXPORT = qw(&makeTabSafe &makeArrayTabSafe &randomizeHash &commify &randomi =head2 commify ( integer ) - Returns a number with commas applied at each third character. +Returns a number with commas applied at each third character. + +=over =item integer - Any old number will do. +Any old number will do. + +=back =cut @@ -79,15 +82,19 @@ sub commify { =head2 isIn ( value, list ) - Returns a boolean value as to whether the value is in the array. +Returns a boolean value as to whether the value is in the array. + +=over =item value - The value to check for. +The value to check for. =item list - An array to look for the value in. +An array to look for the value in. + +=back =cut @@ -115,13 +122,15 @@ sub isIn { =head2 makeArrayCommaSafe ( array ) - Searches through an array looking for commas and replaces them with - semi-colons. Also replaces carriage returns with spaces. This is - useful for exporting comma separated data. +Searches through an array looking for commas and replaces them with semi-colons. Also replaces carriage returns with spaces. This is useful for exporting comma separated data. + +=over =item array - A reference to the array to look through. +A reference to the array to look through. + +=back =cut @@ -137,14 +146,16 @@ sub makeArrayCommaSafe { =head2 makeArrayTabSafe ( array ) - Searches through an array looking for tabs and replaces them with - four spaces. Also replaces carriage returns with a space. This is - useful for exporting tab separated data. +Searches through an array looking for tabs and replaces them with four spaces. Also replaces carriage returns with a space. This is useful for exporting tab separated data. + +=over =item array A reference to the array to look through. +=back + =cut sub makeArrayTabSafe { @@ -159,11 +170,15 @@ sub makeArrayTabSafe { =head2 makeCommaSafe ( text ) - Replaces commas with semi-colons and carriage returns with spaces. +Replaces commas with semi-colons and carriage returns with spaces. + +=over =item text - The text to search through. +The text to search through. + +=back =cut @@ -177,13 +192,17 @@ sub makeCommaSafe { #------------------------------------------------------------------- -=head2 makeCommaSafe ( text ) +=head2 makeTabSafe ( text ) - Replaces tabs with four spaces and carriage returns with a space each. +Replaces tabs with four spaces and carriage returns with a space each. + +=over =item text - The text to search through. +The text to search through. + +=back =cut @@ -199,15 +218,19 @@ sub makeTabSafe { =head2 randint ( low, high ) - Returns an integer between the low and high number. +Returns an integer between the low and high number. + +=over =item low - The lowest possible value. Defaults to 0. +The lowest possible value. Defaults to 0. =item high - The highest possible value. Defaults to 1. +The highest possible value. Defaults to 1. + +=back =cut @@ -223,11 +246,15 @@ sub randint { =head2 randomizeArray ( array ) - Resorts an array in random order. +Resorts an array in random order. + +=over =item array - A reference to the array to randomize. +A reference to the array to randomize. + +=back =cut @@ -247,11 +274,15 @@ sub randomizeArray { =head2 randomizeHash ( hashRef ) - Resorts a hash tied to IxHash in random order. Returns a hash reference. +Resorts a hash tied to IxHash in random order. Returns a hash reference. + +=over =item hashRef - A reference hash to randomize. +A reference hash to randomize. + +=back =cut @@ -273,11 +304,15 @@ sub randomizeHash { =head2 round ( real ) - Returns an integer after rounding a real number. +Returns an integer after rounding a real number. + +=over =item real - Any floating point number. +Any floating point number. + +=back =cut @@ -289,13 +324,17 @@ sub round { =head2 sortHash ( hashRef ) - Sorts a hash by its values. Returns a hash reference. +Sorts a hash by its values. Returns a hash reference. - TIP: This subroutine can screw up your hash if the values aren't all unique. +TIP: This subroutine can screw up your hash if the values aren't all unique. + +=over =item hashRef - A reference to the hash to be sorted. +A reference to the hash to be sorted. + +=back =cut @@ -317,13 +356,17 @@ sub sortHash { =head2 sortHashDecending - Sorts a hash in decending order by its values. Returns a hash reference. +Sorts a hash in decending order by its values. Returns a hash reference. - TIP: This subroutine can screw up your hash if the values aren't all unique. +TIP: This subroutine can screw up your hash if the values aren't all unique. + +=over =item hashRef - A reference to the hash to be sorted. +A reference to the hash to be sorted. + +=back =cut diff --git a/lib/WebGUI/Wobject.pm b/lib/WebGUI/Wobject.pm index a17a40c09..a5f4a1434 100644 --- a/lib/WebGUI/Wobject.pm +++ b/lib/WebGUI/Wobject.pm @@ -35,22 +35,22 @@ use WebGUI::Utility; =head1 NAME - Package WebGUI::Wobject +Package WebGUI::Wobject =head1 SYNOPSIS use WebGUI::Wobject; our @ISA = qw(WebGUI::Wobject); - See the subclasses in lib/WebGUI/Wobjects for details. +See the subclasses in lib/WebGUI/Wobjects for details. =head1 DESCRIPTION - An abstract class for all other wobjects to extend. +An abstract class for all other wobjects to extend. =head1 METHODS - These methods are available from this class: +These methods are available from this class: =cut @@ -77,24 +77,25 @@ sub _getNextSequenceNumber { =head2 confirm ( message, yesURL, [ , noURL, vitalComparison ] ) +=over + =item message - A string containing the message to prompt the user for this action. +A string containing the message to prompt the user for this action. =item yesURL - A URL to the web method to execute if the user confirms the action. +A URL to the web method to execute if the user confirms the action. =item noURL - A URL to the web method to execute if the user denies the action. - Defaults back to the current page. +A URL to the web method to execute if the user denies the action. Defaults back to the current page. =item vitalComparison - A comparison expression to be used when checking whether the action - should be allowed to continue. Typically this is used when the - action is a delete of some sort. +A comparison expression to be used when checking whether the action should be allowed to continue. Typically this is used when the action is a delete of some sort. + +=back =cut @@ -119,19 +120,23 @@ sub confirm { =head2 deleteCollateral ( tableName, keyName, keyValue ) - Deletes a row of collateral data. +Deletes a row of collateral data. + +=over =item tableName - The name of the table you wish to delete the data from. +The name of the table you wish to delete the data from. =item keyName - The name of the column that is the primary key in the table. +The name of the column that is the primary key in the table. =item keyValue - An integer containing the key value. +An integer containing the key value. + +=back =cut @@ -145,7 +150,7 @@ sub deleteCollateral { =head2 description ( ) - Returns this instance's description if it exists. +Returns this instance's description if it exists. =cut @@ -159,8 +164,7 @@ sub description { =head2 discussionProperties ( ) - Returns a formRow list of discussion properties, which may be - attached to any Wobject. +Returns a formRow list of discussion properties, which may be attached to any Wobject. =cut @@ -215,7 +219,7 @@ sub discussionProperties { =head2 displayTitle ( ) - Returns this instance's title if displayTitle is set to yes. +Returns this instance's title if displayTitle is set to yes. =cut @@ -231,15 +235,17 @@ sub displayTitle { =head2 duplicate ( [ pageId ] ) - Duplicates this wobject with a new wobject ID. Returns the new - wobject Id. +Duplicates this wobject with a new wobject ID. Returns the new wobject Id. - NOTE: This method is meant to be extended by all sub-classes. +NOTE: This method is meant to be extended by all sub-classes. + +=over =item pageId - If specified the wobject will be duplicated to this pageId, - otherwise it will be duplicated to the clipboard. +If specified the wobject will be duplicated to this pageId, otherwise it will be duplicated to the clipboard. + +=back =cut @@ -273,18 +279,21 @@ sub duplicate { =head2 fileProperty ( name, labelId ) - Returns a file property form row which can be used in any Wobject - properties page. +Returns a file property form row which can be used in any Wobject properties page. - NOTE: This method is meant for use with www_deleteFile. +NOTE: This method is meant for use with www_deleteFile. + +=over =item name - The name of the property that stores the filename. +The name of the property that stores the filename. =item labelId - The internationalId of the form label for this file. +The internationalId of the form label for this file. + +=back =cut @@ -308,13 +317,15 @@ sub fileProperty { =head2 get ( [ propertyName ] ) - Returns a hash reference containing all of the properties of this - wobject instance. +Returns a hash reference containing all of the properties of this wobject instance. + +=over =item propertyName - If an individual propertyName is specified, then only that - property value is returned as a scalar. +If an individual propertyName is specified, then only that property value is returned as a scalar. + +=back =cut @@ -331,21 +342,23 @@ sub get { =head2 getCollateral ( tableName, keyName, keyValue ) - Returns a hash reference containing a row of collateral data. +Returns a hash reference containing a row of collateral data. + +=over =item tableName - The name of the table you wish to retrieve the data from. +The name of the table you wish to retrieve the data from. =item keyName - The name of the column that is the primary key in the table. +The name of the column that is the primary key in the table. =item keyValue - An integer containing the key value. If key value is equal to "new" - or null, then an empty hashRef containing only keyName=>"new" will - be returned to avoid strict errors. +An integer containing the key value. If key value is equal to "new" or null, then an empty hashRef containing only keyName=>"new" will be returned to avoid strict errors. + +=back =cut @@ -363,8 +376,7 @@ sub getCollateral { =head2 inDateRange ( ) - Returns a boolean value of whether the wobject should be displayed - based upon it's start and end dates. +Returns a boolean value of whether the wobject should be displayed based upon it's start and end dates. =cut @@ -380,35 +392,31 @@ sub inDateRange { =head2 moveCollateralDown ( tableName, idName, id [ , setName, setValue ] ) - Moves a collateral data item down one position. This assumes that the - collateral data table has a column called "wobjectId" that identifies - the wobject, and a column called "sequenceNumber" that determines - the position of the data item. +Moves a collateral data item down one position. This assumes that the collateral data table has a column called "wobjectId" that identifies the wobject, and a column called "sequenceNumber" that determines the position of the data item. + +=over =item tableName - A string indicating the table that contains the collateral data. +A string indicating the table that contains the collateral data. =item idName - A string indicating the name of the column that uniquely identifies - this collateral data item. +A string indicating the name of the column that uniquely identifies this collateral data item. =item id - An integer that uniquely identifies this collateral data item. +An integer that uniquely identifies this collateral data item. =item setName - By default this method assumes that the collateral will have a - wobject id in the table. However, since there is not always a wobject - id to separate one data set from another, you may specify another - field to do that. +By default this method assumes that the collateral will have a wobject id in the table. However, since there is not always a wobject id to separate one data set from another, you may specify another field to do that. =item setValue - The value of the column defined by "setName" to select a data set - from. +The value of the column defined by "setName" to select a data set from. + +=back =cut @@ -434,35 +442,31 @@ sub moveCollateralDown { =head2 moveCollateralUp ( tableName, idName, id [ , setName, setValue ] ) - Moves a collateral data item up one position. This assumes that the - collateral data table has a column called "wobjectId" that identifies - the wobject, and a column called "sequenceNumber" that determines - the position of the data item. +Moves a collateral data item up one position. This assumes that the collateral data table has a column called "wobjectId" that identifies the wobject, and a column called "sequenceNumber" that determines the position of the data item. + +=over =item tableName - A string indicating the table that contains the collateral data. +A string indicating the table that contains the collateral data. =item idName - A string indicating the name of the column that uniquely identifies - this collateral data item. +A string indicating the name of the column that uniquely identifies this collateral data item. =item id - An integer that uniquely identifies this collateral data item. +An integer that uniquely identifies this collateral data item. =item setName - By default this method assumes that the collateral will have a - wobject id in the table. However, since there is not always a wobject - id to separate one data set from another, you may specify another - field to do that. +By default this method assumes that the collateral will have a wobject id in the table. However, since there is not always a wobject id to separate one data set from another, you may specify another field to do that. =item setValue - The value of the column defined by "setName" to select a data set - from. +The value of the column defined by "setName" to select a data set from. + +=back =cut @@ -488,21 +492,19 @@ sub moveCollateralUp { =head2 new ( properties ) - Constructor. +Constructor. - NOTE: This method should never need to be overridden or extended. +NOTE: This method should never need to be overridden or extended. + +=over =item properties - A hash reference containing at minimum "wobjectId" and "namespace" - and wobjectId may be set to "new" if you're creating a new - instance. This hash reference should be the one created by - WebGUI.pm and passed to the wobject subclass. +A hash reference containing at minimum "wobjectId" and "namespace" and wobjectId may be set to "new" if you're creating a new instance. This hash reference should be the one created by WebGUI.pm and passed to the wobject subclass. - NOTE: It may seem a little weird that the initial data for the - wobject instance is coming from WebGUI.pm, but this was done - to lessen database traffic thus increasing the speed of all - wobjects. +NOTE: It may seem a little weird that the initial data for the wobject instance is coming from WebGUI.pm, but this was done to lessen database traffic thus increasing the speed of all wobjects. + +=back =cut @@ -517,10 +519,14 @@ sub new { Decides whether or not macros should be processed and returns the appropriate output. +=over + =item output An HTML blob to be processed for macros. +=back + =cut sub processMacros { @@ -535,18 +541,21 @@ sub processMacros { =head2 processTemplate ( templateId, vars ) - Returns the content generated from this template. +Returns the content generated from this template. - NOTE: Only for use in wobjects that support templates. +NOTE: Only for use in wobjects that support templates. + +=over =item templateId - An id referring to a particular template in the templates table. +An id referring to a particular template in the templates table. =item hashRef - A hash reference containing variables and loops to pass to the - template engine. +A hash reference containing variables and loops to pass to the template engine. + +=back =cut @@ -562,10 +571,9 @@ sub processTemplate { =head2 purge ( ) - Removes this wobject from the database and all it's attachments - from the filesystem. +Removes this wobject from the database and all it's attachments from the filesystem. - NOTE: This method is meant to be extended by all sub-classes. +NOTE: This method is meant to be extended by all sub-classes. =cut @@ -583,27 +591,27 @@ sub purge { =head2 reorderCollateral ( tableName, keyName [ , setName, setValue ] ) - Resequences collateral data. Typically useful after deleting a - collateral item to remove the gap created by the deletion. +Resequences collateral data. Typically useful after deleting a collateral item to remove the gap created by the deletion. + +=over =item tableName - The name of the table to resequence. +The name of the table to resequence. =item keyName - The key column name used to determine which data needs sorting within the table. +The key column name used to determine which data needs sorting within the table. =item setName - Defaults to "wobjectId". This is used to define which data set to - reorder. +Defaults to "wobjectId". This is used to define which data set to reorder. =item setValue - Used to define which data set to reorder. Defaults to the wobjectId - for this instance. Defaults to the value of "setName" in the wobject - properties. +Used to define which data set to reorder. Defaults to the wobjectId for this instance. Defaults to the value of "setName" in the wobject properties. + +=back =cut @@ -626,25 +634,23 @@ sub reorderCollateral { =head2 set ( [ hashRef, arrayRef ] ) - Stores the values specified in hashRef to the database. +Stores the values specified in hashRef to the database. - NOTE: This method should be extended by all subclasses. +NOTE: This method should be extended by all subclasses. + +=over =item hashRef - A hash reference of the properties of this wobject instance. This - method will accept any name/value pair and associate it with this - wobject instance in memory, but will only store the following - fields to the database: +A hash reference of the properties of this wobject instance. This method will accept any name/value pair and associate it with this wobject instance in memory, but will only store the following fields to the database: - title, displayTitle, description, processMacros, - pageId, templatePosition, startDate, endDate, sequenceNumber + title, displayTitle, description, processMacros, pageId, templatePosition, startDate, endDate, sequenceNumber =item arrayRef - An array reference containing a list of properties associated - with this Wobject class. The items in the list should marry - up to fields in the Wobject extention table for this class. +An array reference containing a list of properties associated with this Wobject class. The items in the list should marry up to fields in the Wobject extention table for this class. + +=back =cut @@ -698,52 +704,39 @@ sub set { =head2 setCollateral ( tableName, keyName, properties [ , useSequenceNumber, useWobjectId, setName, setValue ] ) - Performs and insert/update of collateral data for any wobject's - collateral data. Returns the primary key value for that row of - data. +Performs and insert/update of collateral data for any wobject's collateral data. Returns the primary key value for that row of data. + +=over =item tableName - The name of the table to insert the data. +The name of the table to insert the data. =item keyName - The column name of the primary key in the table specified above. - This must also be an incrementerId in the incrementer table. +The column name of the primary key in the table specified above. This must also be an incrementerId in the incrementer table. =item properties - A hash reference containing the name/value pairs to be inserted - into the database where the name is the column name. Note that - the primary key should be specified in this list, and if it's value - is "new" or null a new row will be created. +A hash reference containing the name/value pairs to be inserted into the database where the name is the column name. Note that the primary key should be specified in this list, and if it's value is "new" or null a new row will be created. =item useSequenceNumber - If set to "1", a new sequenceNumber will be generated and inserted - into the row. Note that this means you must have a sequenceNumber - column in the table. Also note that this requires the presence of - the wobjectId column. Defaults to "1". +If set to "1", a new sequenceNumber will be generated and inserted into the row. Note that this means you must have a sequenceNumber column in the table. Also note that this requires the presence of the wobjectId column. Defaults to "1". =item useWobjectId - If set to "1", the current wobjectId will be inserted into the table - upon creation of a new row. Note that this means the table better - have a wobjectId column. Defaults to "1". +If set to "1", the current wobjectId will be inserted into the table upon creation of a new row. Note that this means the table better have a wobjectId column. Defaults to "1". =item setName - If this collateral data set is not grouped by wobjectId, but by another - column then specify that column here. The useSequenceNumber parameter - will then use this column name instead of wobjectId to generate - the sequenceNumber. +If this collateral data set is not grouped by wobjectId, but by another column then specify that column here. The useSequenceNumber parameter will then use this column name instead of wobjectId to generate the sequenceNumber. =item setValue - If you've specified a setName you may also set a value for that set. - Defaults to the value for this id from the wobject properties. +If you've specified a setName you may also set a value for that set. Defaults to the value for this id from the wobject properties. -=item +=back =cut @@ -795,43 +788,11 @@ sub setCollateral { } -#------------------------------------------------------------------- - -=head2 templateProperties - - Returns a list of template properties. - -=cut - -sub templateProperties { - my ($f, $templates, $templateId, $subtext); - $templateId = $_[0]->get("templateId") || 1; - if ($_[0]->get("wobjectId") ne "new" && $session{user}{uiLevel} >= 5) { - $subtext = 'get("wobjectId"))).'">' - .WebGUI::International::get(741).' / ' - .WebGUI::International::get(742).''; - } - $templates = WebGUI::SQL->buildHashRef("select templateId,name from template where namespace=" - .quote($_[0]->get("namespace"))." order by name"); - $f = WebGUI::HTMLForm->new; - $f->select( - -name=>"templateId", - -options=>$templates, - -label=>WebGUI::International::get(740), - -value=>[$templateId], - -uiLevel=>1, - -subtext=>$subtext - ); - return $f->printRowsOnly; -} - #------------------------------------------------------------------- =head2 uiLevel - Returns the UI Level of a wobject. Defaults to "0" for all wobjects. - Override to set the UI Level higher for a given wobject. +Returns the UI Level of a wobject. Defaults to "0" for all wobjects. Override to set the UI Level higher for a given wobject. =cut @@ -843,7 +804,7 @@ sub uiLevel { =head2 www_approvePost ( ) - Sets the status flag on a discussion message to "approved". +Sets the status flag on a discussion message to "approved". =cut @@ -860,9 +821,9 @@ sub www_approvePost { =head2 www_copy ( ) - Copies this instance to the clipboard. +Copies this instance to the clipboard. - NOTE: Should never need to be overridden or extended. +NOTE: Should never need to be overridden or extended. =cut @@ -879,7 +840,7 @@ sub www_copy { =head2 www_cut ( ) - Moves this instance to the clipboard. +Moves this instance to the clipboard. =cut @@ -897,7 +858,7 @@ sub www_cut { =head2 www_delete ( ) - Prompts a user to confirm whether they wish to delete this instance. +Prompts a user to confirm whether they wish to delete this instance. =cut @@ -925,7 +886,7 @@ sub www_delete { =head2 www_deleteConfirm ( ) - Moves this instance to the trash. +Moves this instance to the trash. =cut @@ -944,7 +905,7 @@ sub www_deleteConfirm { =head2 www_deleteFile ( ) - Displays a confirmation message relating to the deletion of a file. +Displays a confirmation message relating to the deletion of a file. =cut @@ -960,7 +921,7 @@ sub www_deleteFile { =head2 www_deleteFileConfirm ( ) - Deletes a file from this instance. +Deletes a file from this instance. =cut @@ -974,8 +935,7 @@ sub www_deleteFileConfirm { =head2 www_deleteMessage ( ) - Displays a message asking for confirmation to delete a message from - a discussion. +Displays a message asking for confirmation to delete a message from a discussion. =cut @@ -991,7 +951,7 @@ sub www_deleteMessage { =head2 www_deleteMessageConfirm ( ) - Deletes a message from a discussion. +Deletes a message from a discussion. =cut @@ -1007,7 +967,7 @@ sub www_deleteMessageConfirm { =head2 www_denyPost ( ) - Sets the status flag on a discussion message to "denied". +Sets the status flag on a discussion message to "denied". =cut @@ -1023,13 +983,17 @@ sub www_denyPost { =head2 www_edit ( formRows ) - Displays the common properties of any/all wobjects. +Displays the common properties of any/all wobjects. - NOTE: This method should be extended by all wobjects. +NOTE: This method should be extended by all wobjects. + +=over =item formRows - The custom form rows from the wobject subclass edit page. +The custom form rows from the wobject subclass edit page. + +=back =cut @@ -1097,9 +1061,9 @@ sub www_edit { =head2 www_editSave ( ) - Saves the default properties of any/all wobjects. +Saves the default properties of any/all wobjects. - NOTE: This method should be extended by all subclasses. +NOTE: This method should be extended by all subclasses. =cut @@ -1137,7 +1101,7 @@ sub www_editSave { =head2 www_lockThread ( ) - Locks a discussion thread from the current message down. +Locks a discussion thread from the current message down. =cut @@ -1154,7 +1118,7 @@ sub www_lockThread { =head2 www_moveBottom ( ) - Moves this instance to the bottom of the page. +Moves this instance to the bottom of the page. =cut @@ -1172,7 +1136,7 @@ sub www_moveBottom { =head2 www_moveDown ( ) - Moves this instance down one spot on the page. +Moves this instance down one spot on the page. =cut @@ -1197,7 +1161,7 @@ sub www_moveDown { =head2 www_moveTop ( ) - Moves this instance to the top of the page. +Moves this instance to the top of the page. =cut @@ -1215,7 +1179,7 @@ sub www_moveTop { =head2 www_moveUp ( ) - Moves this instance up one spot on the page. +Moves this instance up one spot on the page. =cut @@ -1240,7 +1204,7 @@ sub www_moveUp { =head2 www_paste ( ) - Moves this instance from the clipboard to the current page. +Moves this instance from the clipboard to the current page. =cut @@ -1260,7 +1224,7 @@ sub www_paste { =head2 www_post ( ) - Displays a discussion message post form. +Displays a discussion message post form. =cut @@ -1276,7 +1240,7 @@ sub www_post { =head2 www_post ( ) - Saves a message post to a discussion. +Saves a message post to a discussion. =cut @@ -1293,7 +1257,7 @@ sub www_postSave { =head2 www_search ( ) - Searches an attached discussion. +Searches an attached discussion. =cut @@ -1305,12 +1269,15 @@ sub www_search { =head2 www_showMessage ( [menuItem] ) - Shows a message from a discussion. +Shows a message from a discussion. + +=over =item menuItem - You can optionally extend this method by passing in an HTML string - of menu items to be added to the menu of this display. +You can optionally extend this method by passing in an HTML string of menu items to be added to the menu of this display. + +=back =cut @@ -1327,7 +1294,7 @@ sub www_showMessage { =head2 www_unlockThread ( ) - Unlocks a discussion thread from the current message on down. +Unlocks a discussion thread from the current message on down. =cut @@ -1344,8 +1311,7 @@ sub www_unlockThread { =head2 www_view ( ) - The default display mechanism for any wobject. This web method MUST - be overridden. +The default display mechanism for any wobject. This web method MUST be overridden. =cut