diff --git a/docs/changelog/6.x.x.txt b/docs/changelog/6.x.x.txt index 53d46bf2f..93282fb6d 100644 --- a/docs/changelog/6.x.x.txt +++ b/docs/changelog/6.x.x.txt @@ -1,3 +1,7 @@ +6.2.3 + - Changed to new POD format. + + 6.2.2 - Made a dramatic performance enhancement to the page tree system by restructuring an overused, and inefficent method. diff --git a/docs/migration.txt b/docs/migration.txt index 102aedd9b..244945e16 100644 --- a/docs/migration.txt +++ b/docs/migration.txt @@ -164,4 +164,10 @@ update your code and database tables to take advantage of this. Some of the more important ID's that have been changed are User Ids, Group Ids, and Wobject Ids. See WebGUI::Id for more information. +5.10 POD + +We've switched to a new Plain Old Documentation (POD) format. See Ruling +WebGUI for details. + + diff --git a/lib/WebGUI/Affiliate.pm b/lib/WebGUI/Affiliate.pm index 9de10d7dd..38bcc2074 100644 --- a/lib/WebGUI/Affiliate.pm +++ b/lib/WebGUI/Affiliate.pm @@ -26,7 +26,7 @@ Package WebGUI::Affiliate Tracks where users come from. -NOTE: This package is experimental as is not officially supported yet. +B This package is experimental as is not officially supported yet. =head1 SYNOPSIS diff --git a/lib/WebGUI/Attachment.pm b/lib/WebGUI/Attachment.pm index 74701b85a..e73b528e5 100644 --- a/lib/WebGUI/Attachment.pm +++ b/lib/WebGUI/Attachment.pm @@ -111,18 +111,14 @@ sub box { Copies an attachment from one node to another. -=over - -=item newNode +=head3 newNode Define the node to copy the attachment to. -=item newNodeSub +=head3 newNodeSub If there is a subordinate element on this node define it here. -=back - =cut sub copy { @@ -164,14 +160,10 @@ sub copy { Generates a thumbnail for this attachment. -=over - -=item thumbnailSize +=head3 thumbnailSize Defaults to the global setting for thumbnail size. However, it can be overriden with this value. Specified in pixels. -=back - =cut sub createThumbnail { @@ -456,22 +448,18 @@ sub isImage { Constructor. -=over - -=item filename +=head3 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. -=item node +=head3 node The node where this attachment is (or will be placed). -=item nodeSubordinate +=head3 nodeSubordinate The subordinate element of the node where this attachment is (or will be placed). -=back - =cut sub new { @@ -487,14 +475,10 @@ sub new { Renames an attachment's filename. -=over - -=item newFilename +=head3 newFilename Define the new filename for this attachment. -=back - =cut sub rename { @@ -512,14 +496,10 @@ sub rename { Resizes this attachment to the specified size. Use this method only if the attachment is an image. -=over - -=item imageSize +=head3 imageSize Defaults to the max image size setting. Specify a value in pixels to resize this image to. -=back - =cut sub resizeImage { @@ -546,22 +526,18 @@ sub resizeImage { Grabs an attachment from a form POST and saves it to a node. It then returns the filename of the attachment. -=over - -=item formVariableName +=head3 formVariableName Provide the form variable name to which the file being uploaded is assigned. -=item thumbnailSize +=head3 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. -=item imageSize +=head3 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. -=back - =cut sub save { @@ -608,22 +584,18 @@ sub save { 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 +=head3 pathToFile Provide the local path to this file. -=item thumbnailSize +=head3 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 content settings. You can override that size by specifying one here. Size is measured in pixels of the longest side. -=item imageSize +=head3 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 content settings. -=back - =cut sub saveFromFilesystem { @@ -672,14 +644,10 @@ sub saveFromFilesystem { Stores a hash reference as an attachment. -=over - -=item hashref +=head3 hashref A hash reference containing the data you wish to persist to the filesystem. -=back - =cut sub saveFromHashref { @@ -696,14 +664,10 @@ sub saveFromHashref { Stores a scalar as a text attachment. -=over - -=item scalar +=head3 scalar A scalar variable containing the content to write to the filesystem. -=back - =cut sub saveFromScalar { diff --git a/lib/WebGUI/Auth.pm b/lib/WebGUI/Auth.pm index ff328766d..aeae8fd0d 100644 --- a/lib/WebGUI/Auth.pm +++ b/lib/WebGUI/Auth.pm @@ -162,14 +162,10 @@ sub authenticate { Gets or sets the authMethod in the Auth Object -=over - -=item authMethod +=head3 authMethod A string which sets the auth method for an instance of this class -=back - =cut sub authMethod { @@ -184,22 +180,18 @@ sub authMethod { Superclass method that performs general functionality for creating new accounts. -=over - -=item method +=head3 method Auth method that the form for creating users should call -=item vars +=head3 vars Array ref of template vars from subclass -=item template +=head3 template Template that this class should use for display purposes -=back - =cut sub createAccount { @@ -231,26 +223,22 @@ sub createAccount { Superclass method that performs general functionality for saving new accounts. -=over - -=item username +=head3 username Username for the account being created -=item properties +=head3 properties Properties from the subclass that should be saved as authentication parameters -=item password +=head3 password Password entered by the user. This is only used in for sending the user a notification by email of his/her username/password -=item profile +=head3 profile Hashref of profile values returned by the function WebGUI::Operation::Profile::validateProfileData() -=back - =cut sub createAccountSave { @@ -290,14 +278,10 @@ sub createAccountSave { Superclass method that displays a confirm message for deactivating a user's account. -=over - -=item method +=head3 method Auth method that the form for creating users should call -=back - =cut sub deactivateAccount { @@ -351,22 +335,18 @@ sub deleteParams { Superclass method that performs general functionality for viewing editable fields related to a user's account. -=over - -=item method +=head3 method Auth method that the form for updating a user's account should call -=item vars +=head3 vars Array ref of template vars from subclass -=item template +=head3 template Template that this class should use for display purposes -=back - =cut sub displayAccount { @@ -397,22 +377,18 @@ sub displayAccount { Superclass method that performs general functionality for creating new accounts. -=over - -=item method +=head3 method Auth method that the form for performing the login routine should call -=item vars +=head3 vars Array ref of template vars from subclass -=item template +=head3 template Template that this class should use for display purposes -=back - =cut sub displayLogin { @@ -503,14 +479,10 @@ sub getParams { Returns a setting for this authMethod instance. If none is specified, returns the system authMethod setting -=over - -=item setting +=head3 setting Specify a setting to retrieve -=back - =cut sub getSetting { @@ -595,22 +567,18 @@ sub logout { Constructor. -=over - -=item authMethod +=head3 authMethod This object's authentication method -=item userId +=head3 userId userId for the user requesting authentication. This defaults to $session{user}{userId} -=item callable +=head3 callable Array reference of methods allowed to be called externally; -=back - =cut sub new { @@ -654,14 +622,10 @@ sub profile { adds elements to the callable routines list. This list determines whether or not a method in this instance is allowed to be called externally -=over - -=item callableMethods +=head3 callableMethods Array reference containing a list of methods for this authentication instance that can be called externally -=back - =cut sub setCallable { @@ -676,22 +640,18 @@ sub setCallable { Saves the user's authentication parameters to the database. -=over - -=item userId +=head3 userId Specify a user id. -=item authMethod +=head3 authMethod Specify the authentication method to save these paramaters under. -=item data +=head3 data A hash reference containing parameter names and values to be saved. -=back - =cut sub saveParams { diff --git a/lib/WebGUI/Cache.pm b/lib/WebGUI/Cache.pm index 2cecbd2ec..7fb370791 100644 --- a/lib/WebGUI/Cache.pm +++ b/lib/WebGUI/Cache.pm @@ -63,14 +63,10 @@ sub delete { Remove content from the filesystem cache where the key meets the condition of the regular expression. -=over - -=item regex +=head3 regex A regular expression that will match keys in the current namespace. Example: m/^navigation_.*/ -=back - =cut sub deleteByRegex { @@ -100,18 +96,14 @@ sub get { Constructor. -=over - -=item key +=head3 key A key unique to this namespace. It is used to uniquely identify the cached content. -=item namespace +=head3 namespace Defaults to the config filename for the current site. The only reason to override the default is if you want the cached content to be shared among all WebGUI instances on this machine. A common alternative namespace is "URL", which is typically used when caching content using the setByHTTP method. -=back - =cut sub new { @@ -130,18 +122,14 @@ sub new { Save content to the filesystem cache. -=over - -=item content +=head3 content A scalar variable containing the content to be set. -=item ttl +=head3 ttl The time to live for this content. This is the amount of time (in seconds) that the content will remain in the cache. Defaults to "60". -=back - =cut sub set { @@ -156,18 +144,14 @@ sub set { Retrieves a document via HTTP and stores it in the cache and returns the content as a string. -=over - -=item url +=head3 url The URL of the document to retrieve. It must begin with the standard "http://". -=item ttl +=head3 ttl The time to live for this content. This is the amount of time (in seconds) that the content will remain in the cache. Defaults to "60". -=back - =cut sub setByHTTP { diff --git a/lib/WebGUI/Collateral.pm b/lib/WebGUI/Collateral.pm index 71cc58279..aecfa50df 100644 --- a/lib/WebGUI/Collateral.pm +++ b/lib/WebGUI/Collateral.pm @@ -101,14 +101,10 @@ sub deleteFile { An alternative to the constructor "new", use find as a constructor by name rather than id. -=over - -=item name +=head3 name The name of the collateral item you wish to instanciate. -=back - =cut sub find { @@ -122,14 +118,10 @@ sub find { Returns a hash reference containing all of the properties of this collateral item. -=over - -=item propertyName +=head3 propertyName If an individual propertyName is specified, then only that property value is returned as a scalar. -=back - =cut sub get { @@ -147,14 +139,10 @@ sub get { Constructor. -=over - -=item collateralId +=head3 collateralId The unique identifier for this piece of collateral. If set to "new" an id will be generated. -=back - =cut sub new { @@ -244,16 +232,12 @@ sub multiNew { Sets the value of a property for this collateral item. -=over - -=item properties +=head3 properties A hash reference containing the list of properties to set. The valid property names are "name", "parameters", "userId", "username", "collateralFolderId", "collateralType", and "thumbnailSize". If username or userId are not specified, the current user will be used. -=back - =cut sub set { diff --git a/lib/WebGUI/Config.pm b/lib/WebGUI/Config.pm index dcc5732ee..be0bca6d1 100644 --- a/lib/WebGUI/Config.pm +++ b/lib/WebGUI/Config.pm @@ -50,18 +50,14 @@ These subroutines are available from this package: Returns a hash reference containing the configuration data. It tries to get the data out of the memory cache first, but reads the config file directly if necessary. -=over - -=item webguiRoot +=head3 webguiRoot The path to the WebGUI installation. -=item configFile +=head3 configFile The filename of the config file to read. -=back - =cut sub getConfig { @@ -81,14 +77,10 @@ sub getConfig { Reads all the config file data for all defined sites into an in-memory cache. -=over - -=item webguiRoot +=head3 webguiRoot The path to the WebGUI installation. -=back - =cut sub loadAllConfigs { @@ -111,18 +103,14 @@ sub loadAllConfigs { Returns a hash reference containing the configuration data. It reads the config data directly from the file. -=over - -=item webguiRoot +=head3 webguiRoot The path to the WebGUI installation. -=item configFile +=head3 configFile The filename of the config file to read. -=back - =cut sub readConfig { diff --git a/lib/WebGUI/DatabaseLink.pm b/lib/WebGUI/DatabaseLink.pm index f6a8cd0eb..a1947a365 100644 --- a/lib/WebGUI/DatabaseLink.pm +++ b/lib/WebGUI/DatabaseLink.pm @@ -65,14 +65,10 @@ sub getList { Returns a hash containing a single database link. -=over - -=item databaseLinkId +=head3 databaseLinkId A valid databaseLinkId -=back - =cut sub get { @@ -85,14 +81,10 @@ sub get { Returns an array of hashrefs containing items which use a database link. This method will need to be updated any time a new item starts using Database Links. -=over - -=item databaseLinkId +=head3 databaseLinkId A valid databaseLinkId -=back - =cut sub whatIsUsing { @@ -178,14 +170,10 @@ sub dbh { Constructor. -=over - -=item databaseLinkId +=head3 databaseLinkId The databaseLinkId of the databaseLink you're creating an object reference for. -=back - =cut sub new { diff --git a/lib/WebGUI/DateTime.pm b/lib/WebGUI/DateTime.pm index 5d75c202a..c0315cc6a 100644 --- a/lib/WebGUI/DateTime.pm +++ b/lib/WebGUI/DateTime.pm @@ -83,26 +83,22 @@ sub dateToEpoch { Returns an epoch date with the amount of time added. -=over - -=item epoch +=head3 epoch The number of seconds since January 1, 1970. -=item years +=head3 years The number of years to add to the epoch. -=item months +=head3 months The number of months to add to the epoch. -=item days +=head3 days The number of days to add to the epoch. -=back - =cut sub addToDate { @@ -121,26 +117,22 @@ sub addToDate { Returns an epoch date with the amount of time added. -=over - -=item epoch +=head3 epoch The number of seconds since January 1, 1970. -=item hours +=head3 hours The number of hours to add to the epoch. -=item minutes +=head3 minutes The number of minutes to add to the epoch. -=item seconds +=head3 seconds The number of seconds to add to the epoch. -=back - =cut sub addToTime { @@ -159,14 +151,10 @@ sub addToTime { Returns an epoch date. -=over - -=item date +=head3 date An array of the format year, month, day, hour, min, sec. -=back - =cut sub arrayToEpoch { @@ -188,14 +176,10 @@ sub arrayToEpoch { Returns the epoch dates for the start and end of the day. -=over - -=item epoch +=head3 epoch The number of seconds since January 1, 1970. -=back - =cut sub dayStartEnd { @@ -212,14 +196,10 @@ sub dayStartEnd { Returns a date array in the form of year, month, day, hour, min, sec. -=over - -=item epoch +=head3 epoch An epoch date. -=back - =cut sub epochToArray { @@ -234,13 +214,11 @@ sub epochToArray { Returns a formated date string. -=over - -=item epoch +=head3 epoch The number of seconds since January 1, 1970. Defaults to NOW! -=item format +=head3 format A string representing the output format for the date. Defaults to '%z %Z'. You can use the following to format your date string: @@ -268,8 +246,6 @@ A string representing the output format for the date. Defaults to '%z %Z'. You c %z = The current user's date format preference. %Z = The current user's time format preference. -=back - =cut sub epochToHuman { @@ -359,18 +335,14 @@ sub epochToHuman { Returns a set date (used by WebGUI::HTMLForm->date) in the format of YYYY-MM-DD. -=over - -=item epoch +=head3 epoch The number of seconds since January 1, 1970. -=item withTime +=head3 withTime A boolean indicating that the time should be added to the output, thust turning the format into YYYY-MM-DD HH:MM:SS. -=back - =cut sub epochToSet { @@ -386,14 +358,10 @@ sub epochToSet { Returns a string containing the calendar month name in the language of the current user. -=over - -=item month +=head3 month An integer ranging from 1-12 representing the month. -=back - =cut sub getMonthName { @@ -430,14 +398,10 @@ sub getMonthName { Returns a string containing the weekday name in the language of the current user. -=over - -=item day +=head3 day An integer ranging from 1-7 representing the day of the week (Sunday is 1 and Saturday is 7). -=back - =cut sub getDayName { @@ -465,14 +429,10 @@ sub getDayName { Returns the total number of days in the month. -=over - -=item epoch +=head3 epoch An epoch date. -=back - =cut sub getDaysInMonth { @@ -488,18 +448,14 @@ sub getDaysInMonth { Returns the number of days between two epoch dates. -=over - -=item start +=head3 start An epoch date. -=item end +=head3 end An epoch date. -=back - =cut sub getDaysInInterval { @@ -518,14 +474,10 @@ sub getDaysInInterval { Returns the position (1 - 7) of the first day in the month. -=over - -=item epoch +=head3 epoch An epoch date. -=back - =cut sub getFirstDayInMonthPosition { @@ -548,14 +500,10 @@ sub getFirstDayInMonthPosition { Calculates the number of seconds into the day of an epoch date the epoch datestamp is. -=over - -=item epoch +=head3 epoch The number of seconds since January 1, 1970 00:00:00. -=back - =cut sub getSecondsFromEpoch { @@ -570,14 +518,10 @@ sub getSecondsFromEpoch { Returns an epoch date derived from the human date. -=over - -=item date +=head3 date The human date string. YYYY-MM-DD HH:MM:SS -=back - =cut sub humanToEpoch { @@ -601,18 +545,14 @@ sub humanToEpoch { Returns the number of seconds derived from the interval. -=over - -=item interval +=head3 interval An integer which represents the amount of time for the interval. -=item units +=head3 units A string which represents the units of the interval. The string must be 'years', 'months', 'weeks', 'days', 'hours', 'minutes', or 'seconds'. -=back - =cut sub intervalToSeconds { @@ -639,14 +579,10 @@ sub intervalToSeconds { Returns an array of time elements. The elements are: years, months, days, hours, minutes, seconds, day of year, day of week, daylight savings. -=over - -=item epoch +=head3 epoch The number of seconds since January 1, 1970. Defaults to now. -=back - =cut sub localtime { @@ -667,18 +603,14 @@ sub localtime { Returns the number of months between the start and end dates (inclusive). -=over - -=item startEpoch +=head3 startEpoch An epoch datestamp corresponding to the first month. -=item endEpoch +=head3 endEpoch An epoch datestamp corresponding to the last month. -=back - =cut sub monthCount { @@ -697,14 +629,10 @@ sub monthCount { Returns the epoch dates for the start and end of the month. -=over - -=item epoch +=head3 epoch The number of seconds since January 1, 1970. -=back - =cut sub monthStartEnd { @@ -721,14 +649,10 @@ sub monthStartEnd { Returns an interval and units derived the number of seconds. -=over - -=item seconds +=head3 seconds The number of seconds in the interval. -=back - =cut sub secondsToInterval { @@ -764,14 +688,10 @@ sub secondsToInterval { Returns a time string of the format HH::MM::SS on a 24 hour clock. See also timeToSeconds(). -=over - -=item seconds +=head3 seconds A number of seconds. -=back - =cut sub secondsToTime { @@ -791,14 +711,10 @@ sub secondsToTime { Returns an epoch date. -=over - -=item set +=head3 set A string in the format of YYYY-MM-DD or YYYY-MM-DD HH:MM:SS. -=back - =cut sub setToEpoch { @@ -842,14 +758,10 @@ sub time { Returns the seconds since 00:00:00 on a 24 hour clock. -=over - -=item timeString +=head3 timeString A string that looks similar to this: 15:05:32 -=back - =cut sub timeToSeconds { diff --git a/lib/WebGUI/ErrorHandler.pm b/lib/WebGUI/ErrorHandler.pm index d3fcacea0..c2df2a598 100644 --- a/lib/WebGUI/ErrorHandler.pm +++ b/lib/WebGUI/ErrorHandler.pm @@ -66,14 +66,10 @@ These functions are available from this package: Inserts an AUDIT type message into the WebGUI log. -=over - -=item message +=head3 message Whatever message you wish to insert into the log. -=back - =cut sub audit { @@ -224,14 +220,10 @@ sub getWarnings { Adds a SECURITY type message to the log. -=over - -=item message +=head3 message The message you wish to add to the log. -=back - =cut sub security { @@ -340,14 +332,10 @@ sub showWarnings { Generates a stamp to be added to the log file. Use this in conjunction with your message for writeLog(). -=over - -=item type +=head3 type The type of message this is. You may use whatever type you wish. WebGUI currently uses AUDIT, WARNING, FATAL, and SECURITY. -=back - =cut sub stamp { @@ -361,14 +349,10 @@ sub stamp { Adds a WARNING type message to the log. -=over - -=item message +=head3 message The message you wish to add to the log. -=back - =cut sub warn { @@ -383,14 +367,10 @@ sub warn { Writes a message to the log. -=over - -=item message +=head3 message The message you wish to write to the log. -=back - =cut sub writeLog { diff --git a/lib/WebGUI/Export.pm b/lib/WebGUI/Export.pm index 62d30e3bb..5ca2dda37 100644 --- a/lib/WebGUI/Export.pm +++ b/lib/WebGUI/Export.pm @@ -64,14 +64,10 @@ These methods are available from this package: Executes the export and returns html content. -=over - -=item filename +=head3 filename Full path to a file. -=back - =cut sub generate { @@ -149,65 +145,61 @@ Constructor. Options can be set when a new Export object is constructed, or afterwards with the set method. None of the options is required. -=over - -=item pageId +=head3 pageId Sets the page to be generated. Defaults to current page. -=item styleId +=head3 styleId Use this to override the default styleId. Defaults to the page styleId. -=item userId +=head3 userId Runs the export as this user. Defaults to 1 (Visitor). -=item altSiteURL +=head3 altSiteURL Use this to override the absolute site URL. A valid value would be "http://www.site.com/". Setting this negates the effect of the relativeUrls option. -=item noCache +=head3 noCache Is set to true by default. This will make sure that the exported page is generated and not fetched from cache. -=item noHttpHeader +=head3 noHttpHeader Turns off the inclusion of a HTTP header. By default this option is set to true. -=item adminOn +=head3 adminOn Turns on / off the adminbar in the generated page. Is false by default. -=item stripHTML +=head3 stripHTML Strips HTML from the document and outputs only text. Is disabled by default. -=item relativeUrls +=head3 relativeUrls If set, all navigation URL's will be constructed relative. By default all links will be made absolute. This option is negated if altSiteURL is set. -=item extrasURL +=head3 extrasURL You can specify an alternate URL for the extras location. By default the extrasURL setting from the config file is used. -=item uploadsURL +=head3 uploadsURL You can specify an alternate URL for the uploads location. By default the uploadsURL setting from the config file is used. -=back - =cut sub new { @@ -239,14 +231,10 @@ sub new { Gets the value for key from the class. -=over - -=item key +=head3 key See documentation on the "new" constructor for an overview of all options. -=back - =cut sub get { @@ -261,14 +249,10 @@ sub get { Sets properties for this export to the object. -=over - -=item options +=head3 options See documentation on the "new" constructor for an overview of all options. -=back - =cut sub set { diff --git a/lib/WebGUI/Form.pm b/lib/WebGUI/Form.pm index 995dc921a..b2dc2d601 100644 --- a/lib/WebGUI/Form.pm +++ b/lib/WebGUI/Form.pm @@ -115,28 +115,24 @@ sub _fixTags { Returns a checkbox form element. -=over - -=item name +=head3 name The name field for this form element. -=item checked +=head3 checked If you'd like this box to be defaultly checked, set this to "1". -=item value +=head3 value The default value for this form element. Defaults to "1". -=item extras +=head3 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()"' -=back - =cut sub checkbox { @@ -152,32 +148,28 @@ sub checkbox { Returns checkbox list. -=over - -=item name +=head3 name The name field for this form element. -=item options +=head3 options The list of options for this list. Should be passed as a hash reference. -=item value +=head3 value The default value(s) for this form element. This should be passed as an array reference. -=item vertical +=head3 vertical If set to "1" the radio button elements will be laid out horizontally. Defaults to "0". -=item extras +=head3 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()"' -=back - =cut sub checkList { @@ -211,36 +203,32 @@ sub checkList { 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 +=head3 name The name field for this form element. -=item options +=head3 options The list of options for the select list. Should be passed as a hash reference. -=item value +=head3 value The default value(s) for this form element. This should be passed as an array reference. -=item size +=head3 size The number of characters tall this form element should be. Defaults to "1". -=item multiple +=head3 multiple A boolean value for whether this select list should allow multiple selections. Defaults to "0". -=item extras +=head3 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()"' -=back - =cut sub combo { @@ -265,28 +253,24 @@ sub combo { Returns a content type select list field. This is usually used to help tell WebGUI how to treat posted content. -=over - -=item name +=head3 name The name field for this form element. -=item types +=head3 types An array reference of field types to be displayed. The types are "mixed", "html", "code", and "text". Defaults to all. -=item value +=head3 value The default value for this form element. Defaults to "mixed". -=item extras +=head3 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()"' -=back - =cut sub contentType { @@ -324,18 +308,14 @@ sub contentType { Returns a select list of database links. -=over - -=item name +=head3 name The name field for this form element. Defaults to "databaseLinkId". -=item value +=head3 value The unique identifier for the selected template. Defaults to "0", which is the WebGUI database. -=back - =cut sub databaseLink { @@ -359,32 +339,28 @@ sub databaseLink { Returns a date field. -=over - -=item name +=head3 name The name field for this form element. -=item value +=head3 value The default date. Pass as an epoch value. Defaults to today. -=item extras +=head3 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 size +=head3 size The number of characters wide this form element should be. There should be no reason for anyone to specify this. -=item noDate +=head3 noDate By default a date is placed in the "value" field. Set this to "1" to turn off the default date. -=back - =cut sub date { @@ -419,22 +395,18 @@ sub date { Returns a date/time field. -=over - -=item name +=head3 name The the base name for this form element. This form element actually returns two values under different names. They are name_date and name_time. -=item value +=head3 value The date and time. Pass as an epoch value. Defaults to today and now. -=item extras +=head3 extras Extra parameters to add to the date/time form element such as javascript or stylesheet information. -=back - =cut sub dateTime { @@ -466,18 +438,14 @@ sub dateTime { Returns a dynamic configurable field. -=over - -=item fieldType +=head3 fieldType The field type to use. The field name is the name of the method from this forms package. -=item options +=head3 options The field options. See the documentation for the desired field for more information. -=back - =cut sub dynamicField { @@ -520,32 +488,28 @@ sub dynamicField { Returns an email address field. -=over - -=item name +=head3 name The name field for this form element. -=item value +=head3 value The default value for this form element. -=item maxlength +=head3 maxlength The maximum number of characters to allow in this form element. -=item extras +=head3 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 size +=head3 size The number of characters wide this form element should be. There should be no reason for anyone to specify this. -=back - =cut sub email { @@ -566,32 +530,28 @@ sub email { Returns a field type select list field. This is primarily useful for building dynamic form builders. -=over - -=item name +=head3 name The name field for this form element. -=item types +=head3 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. Defaults to all. -=item value +=head3 value The default value for this form element. -=item size +=head3 size The number of characters tall this form element should be. Defaults to "1". -=item extras +=head3 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()"' -=back - =cut sub fieldType { @@ -658,24 +618,20 @@ sub fieldType { Returns a file upload field. -=over - -=item name +=head3 name The name field for this form element. -=item extras +=head3 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 size +=head3 size The number of characters wide this form element should be. There should be no reason for anyone to specify this. -=back - =cut sub file { @@ -691,24 +647,20 @@ sub file { Returns a select list containing the content filter options. This is for use with WebGUI::HTML::filter(). -=over - -=item name +=head3 name The name field for this form element. This defaults to "filterContent". -=item value +=head3 value The default value for this form element. -=item extras +=head3 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()"' -=back - =cut sub filterContent { @@ -749,26 +701,22 @@ sub formFooter { Returns a form header. -=over - -=item action +=head3 action The form action. Defaults to the current page. -=item method +=head3 method The form method. Defaults to "POST". -=item enctype +=head3 enctype The form enctype. Defaults to "multipart/form-data". -=item extras +=head3 extras If you want to add anything special to the form header like javascript actions or stylesheet info, then use this. -=back - =cut sub formHeader { @@ -796,32 +744,28 @@ sub formHeader { Returns an floating point field. -=over - -=item name +=head3 name The name field for this form element. -=item value +=head3 value The default value for this form element. -=item maxlength +=head3 maxlength The maximum number of characters to allow in this form element. Defaults to 11. -=item extras +=head3 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 size +=head3 size The number of characters wide this form element should be. There should be no reason for anyone to specify this. -=back - =cut sub float { @@ -846,36 +790,32 @@ sub float { 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 +=head3 name The name field for this form element. -=item value +=head3 value The selected group id(s) for this form element. This should be passed as an array reference. Defaults to "7" (Everyone). -=item size +=head3 size How many rows should be displayed at once? -=item multiple +=head3 multiple Set to "1" if multiple groups should be selectable. -=item extras +=head3 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 excludeGroups +=head3 excludeGroups An array reference containing a list of groups to exclude from the list. -=back - =cut sub group { @@ -907,18 +847,14 @@ sub group { Returns a hidden field. -=over - -=item name +=head3 name The name field for this form element. -=item value +=head3 value The default value for this form element. -=back - =cut sub hidden { @@ -932,22 +868,18 @@ sub hidden { 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 +=head3 name The name of this field. -=item options +=head3 options A hash reference where the key is the "name" of the hidden field. -=item value +=head3 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). -=back - =cut sub hiddenList { @@ -973,41 +905,37 @@ sub hiddenList { 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 +=head3 name The name field for this form element. -=item value +=head3 value The default value for this form element. -=item extras +=head3 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 wrap +=head3 wrap The method for wrapping text in the text area. Defaults to "virtual". There should be almost no reason to specify this. -=item rows +=head3 rows The number of characters tall this form element should be. There should be no reason for anyone to specify this. -=item columns +=head3 columns The number of characters wide this form element should be. There should be no reason for anyone to specify this. -=item popupToggle +=head3 popupToggle Defaults to "0". If set to "1" the rich editor will be a pop-up editor. If set to "0" the rich editor will be inline. -NOTE: WebGUI uses a great variety of rich editors. Not all of them are capable of inline mode, so even if you leave this set to "0" the editor may be a pop-up anyway. - -=back +B WebGUI uses a great variety of rich editors. Not all of them are capable of inline mode, so even if you leave this set to "0" the editor may be a pop-up anyway. =cut @@ -1056,32 +984,28 @@ sub HTMLArea { Returns an integer field. -=over - -=item name +=head3 name The name field for this form element. -=item value +=head3 value The default value for this form element. -=item maxlength +=head3 maxlength The maximum number of characters to allow in this form element. Defaults to 11. -=item extras +=head3 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 size +=head3 size The number of characters wide this form element should be. There should be no reason for anyone to specify this. -=back - =cut sub integer { @@ -1103,28 +1027,24 @@ sub integer { Returns a time interval field. -=over - -=item name +=head3 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. -=item intervalValue +=head3 intervalValue The default value for interval portion of this form element. Defaults to '1'. -=item unitsValue +=head3 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'. -=item extras +=head3 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()"' -=back - =cut sub interval { @@ -1159,32 +1079,28 @@ sub interval { Returns a password field. -=over - -=item name +=head3 name The name field for this form element. -=item value +=head3 value The default value for this form element. -=item maxlength +=head3 maxlength The maximum number of characters to allow in this form element. Defaults to "35". -=item extras +=head3 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 size +=head3 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. -=back - =cut sub password { @@ -1202,32 +1118,28 @@ sub password { Returns a telephone number field. -=over - -=item name +=head3 name The name field for this form element. -=item value +=head3 value The default value for this form element. -=item maxlength +=head3 maxlength The maximum number of characters to allow in this form element. -=item extras +=head3 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 size +=head3 size The number of characters wide this form element should be. There should be no reason for anyone to specify this. -=back - =cut sub phone { @@ -1248,29 +1160,25 @@ sub phone { Returns a radio button. -=over - -=item name +=head3 name The name field for this form element. -=item checked +=head3 checked If you'd like this radio button to be defaultly checked, set this to "1". -=item value +=head3 value The default value for this form element. -=item extras +=head3 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()"' -=back - =cut sub radio { @@ -1285,32 +1193,28 @@ sub radio { Returns a radio button list field. -=over - -=item name +=head3 name The name field for this form element. -=item options +=head3 options The list of options for this list. Should be passed as a hash reference. -=item value +=head3 value The default value for this form element. This should be passed as a scalar. -=item vertical +=head3 vertical If set to "1" the radio button elements will be laid out horizontally. Defaults to "0". -=item extras +=head3 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()"' -=back - =cut sub radioList { @@ -1340,40 +1244,36 @@ sub radioList { Returns a select list field. -=over - -=item name +=head3 name The name field for this form element. -=item options +=head3 options The list of options for this select list. Should be passed as a hash reference. -=item value +=head3 value The default value(s) for this form element. This should be passed as an array reference. -=item size +=head3 size The number of characters tall this form element should be. Defaults to "1". -=item multiple +=head3 multiple A boolean value for whether this select list should allow multiple selections. Defaults to "0". -=item extras +=head3 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 sortByValue +=head3 sortByValue A boolean value for whether or not the values in the options hash should be sorted. -=back - =cut sub selectList { @@ -1410,20 +1310,16 @@ sub selectList { Returns a submit button. -=over - -=item value +=head3 value The button text for this submit button. Defaults to "save". -=item extras +=head3 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()"' -=back - =cut sub submit { @@ -1440,28 +1336,24 @@ sub submit { Returns a select list of templates. -=over - -=item name +=head3 name The name field for this form element. Defaults to "templateId". -=item value +=head3 value The unique identifier for the selected template. Defaults to "1". -=item namespace +=head3 namespace The namespace for the list of templates to return. If this is omitted, all templates will be displayed. -=item extras +=head3 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()"' -=back - =cut sub template { @@ -1481,32 +1373,28 @@ sub template { Returns a text input field. -=over - -=item name +=head3 name The name field for this form element. -=item value +=head3 value The default value for this form element. -=item maxlength +=head3 maxlength The maximum number of characters to allow in this form element. -=item extras +=head3 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 size +=head3 size The number of characters wide this form element should be. There should be no reason for anyone to specify this. -=back - =cut sub text { @@ -1526,36 +1414,32 @@ sub text { Returns a text area field. -=over - -=item name +=head3 name The name field for this form element. -=item value +=head3 value The default value for this form element. -=item extras +=head3 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 wrap +=head3 wrap The method for wrapping text in the text area. Defaults to "virtual". There should be almost no reason to specify this. -=item rows +=head3 rows The number of characters tall this form element should be. There should be no reason for anyone to specify this. -=item columns +=head3 columns The number of characters wide this form element should be. There should be no reason for anyone to specify this. -=back - =cut sub textarea { @@ -1576,32 +1460,28 @@ sub textarea { Returns a time field, 24 hour format. -=over - -=item name +=head3 name The name field for this form element. -=item value +=head3 value The default value for this form element. Defaults to the current time (like "15:03:42"). -=item maxlength +=head3 maxlength The maximum number of characters to allow in this form element. Defaults to 8. -=item extras +=head3 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 size +=head3 size The number of characters wide this form element should be. There should be no reason for anyone to specify this. Defaults to 8. -=back - =cut sub timeField { @@ -1627,32 +1507,28 @@ sub timeField { Returns a URL field. -=over - -=item name +=head3 name The name field for this form element. -=item value +=head3 value The default value for this form element. -=item maxlength +=head3 maxlength The maximum number of characters to allow in this form element. Defaults to 2048. -=item extras +=head3 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 size +=head3 size The number of characters wide this form element should be. There should be no reason for anyone to specify this. -=back - =cut sub url { @@ -1673,28 +1549,24 @@ sub url { Returns a "What next?" select list for use with chained action forms in WebGUI. -=over - -=item options +=head3 options A hash reference of the possible actions that could happen next. -=item value +=head3 value The selected element in this list. -=item name +=head3 name The name field for this form element. Defaults to "proceed". -=item extras +=head3 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()"' -=back - =cut sub whatNext { @@ -1715,24 +1587,20 @@ sub whatNext { Returns a yes/no radio field. -=over - -=item name +=head3 name The name field for this form element. -=item value +=head3 value The default value(s) for this form element. Valid values are "1" and "0". Defaults to "1". -=item extras +=head3 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()"' -=back - =cut sub yesNo { @@ -1766,32 +1634,28 @@ sub yesNo { Returns a zip code field. -=over - -=item name +=head3 name The name field for this form element. -=item value +=head3 value The default value for this form element. -=item maxlength +=head3 maxlength The maximum number of characters to allow in this form element. -=item extras +=head3 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 size +=head3 size The number of characters wide this form element should be. There should be no reason for anyone to specify this. -=back - =cut sub zipcode { diff --git a/lib/WebGUI/FormProcessor.pm b/lib/WebGUI/FormProcessor.pm index 3a830767a..c55bc48f9 100644 --- a/lib/WebGUI/FormProcessor.pm +++ b/lib/WebGUI/FormProcessor.pm @@ -77,14 +77,10 @@ sub _checkEmailAddy { Returns an array or a carriage return ("\n") separated scalar depending upon whether you're returning the values into an array or a scalar. -=over - -=item name +=head3 name The name of the form variable to retrieve. -=back - =cut sub checkbox { @@ -98,14 +94,10 @@ sub checkbox { Returns an array or a carriage return ("\n") separated scalar depending upon whether you're returning the values into an array or a scalar. -=over - -=item name +=head3 name The name of the form variable to retrieve. -=back - =cut sub checkList { @@ -119,14 +111,10 @@ sub checkList { Returns either an array of values or a scalar value depending upon what you request. -=over - -=item name +=head3 name The name of the form variable to retrieve. -=back - =cut sub combo { @@ -143,14 +131,10 @@ sub combo { Returns a content type. Defaults to "mixed". -=over - -=item name +=head3 name The name of the form variable to retrieve. -=back - =cut sub contentType { @@ -163,14 +147,10 @@ sub contentType { Returns an epoch datestamp. -=over - -=item name +=head3 name The name of the form variable to retrieve. -=back - =cut sub date { @@ -184,14 +164,10 @@ sub date { Returns an epoch datestamp. -=over - -=item name +=head3 name The name of the form variable to retrieve. -=back - =cut sub dateTime { @@ -204,14 +180,10 @@ sub dateTime { Returns an email address. -=over - -=item name +=head3 name The name of the form variable to retrieve. -=back - =cut sub email { @@ -228,14 +200,10 @@ sub email { Returns a field type. Defaults to "text". -=over - -=item name +=head3 name The name of the form variable to retrieve. -=back - =cut sub fieldType { @@ -249,14 +217,10 @@ sub fieldType { Returns a scalar filter type. Defaults to "most". -=over - -=item name +=head3 name The name of the form variable to retrieve. -=back - =cut sub filter { @@ -270,14 +234,10 @@ sub filter { Returns a floating point (decimal) number. Defaults to "0.0". -=over - -=item name +=head3 name The name of the form variable to retrieve. -=back - =cut sub float { @@ -294,14 +254,10 @@ sub float { Returns a group Id. Defaults to 2 (registered users). -=over - -=item name +=head3 name The name of the form variable to retrieve. -=back - =cut sub group { @@ -318,14 +274,10 @@ sub group { Returns a string. -=over - -=item name +=head3 name The name of the form variable to retrieve. -=back - =cut sub hidden { @@ -339,14 +291,10 @@ sub hidden { Returns an array or a carriage return ("\n") separated scalar depending upon whether you're returning the values into an array or a scalar. -=over - -=item name +=head3 name The name of the form variable to retrieve. -=back - =cut sub hiddenList { @@ -360,14 +308,10 @@ sub hiddenList { Returns a string of HTML that has been cleaned of header information. -=over - -=item name +=head3 name The name of the form variable to retrieve. -=back - =cut sub HTMLArea { @@ -381,14 +325,10 @@ sub HTMLArea { Returns an integer. Defaults to "0". -=over - -=item name +=head3 name The name of the form variable to retrieve. -=back - =cut sub integer { @@ -405,14 +345,10 @@ sub integer { Returns an interval in seconds. Defaults to "0". -=over - -=item name +=head3 name The name of the form variable to retrieve. -=back - =cut sub interval { @@ -426,14 +362,10 @@ sub interval { Returns a string. -=over - -=item name +=head3 name The name of the form variable to retrieve. -=back - =cut sub password { @@ -447,14 +379,10 @@ sub password { Returns a string filtered to allow only digits, spaces, and these special characters: + - ( ) -=over - -=item name +=head3 name The name of the form variable to retrieve. -=back - =cut sub phone { @@ -471,22 +399,18 @@ sub phone { Returns whatever would be the expected result of the method type that was specified. This method also checks to make sure that the field is not returning a string filled with nothing but whitespace. -=over - -=item name +=head3 name The name of the form variable to retrieve. -=item type +=head3 type The type of form element this variable came from. Defaults to "text" if not specified. -=item default +=head3 default The default value for this variable. If the variable is undefined then the default value will be returned instead. -=back - =cut sub process { @@ -510,14 +434,10 @@ sub process { Returns a string. -=over - -=item name +=head3 name The name of the form variable to retrieve. -=back - =cut sub radio { @@ -531,14 +451,10 @@ sub radio { Returns a string. -=over - -=item name +=head3 name The name of the form variable to retrieve. -=back - =cut sub radioList { @@ -552,14 +468,10 @@ sub radioList { Returns an array or a carriage return ("\n") separated scalar depending upon whether you're returning the values into an array or a scalar. -=over - -=item name +=head3 name The name of the form variable to retrieve. -=back - =cut sub selectList { @@ -574,14 +486,10 @@ sub selectList { Returns a template id. Defaults to "1". -=over - -=item name +=head3 name The name of the form variable to retrieve. -=back - =cut sub template { @@ -598,14 +506,10 @@ sub template { Returns a string of text. -=over - -=item name +=head3 name The name of the form variable to retrieve. -=back - =cut sub text { @@ -619,14 +523,10 @@ sub text { Returns a string of text. -=over - -=item name +=head3 name The name of the form variable to retrieve. -=back - =cut sub textarea { @@ -641,14 +541,10 @@ sub textarea { Returns the number of seconds since 00:00:00 on a 24 hour clock. Note, this will adjust for the user's time offset in the reverse manner that the form field adjusts for it in order to make the times come out appropriately. -=over - -=item name +=head3 name The name of the form variable to retrieve. -=back - =cut sub timeField { @@ -662,14 +558,10 @@ sub timeField { Returns a URL. -=over - -=item name +=head3 name The name of the form variable to retrieve. -=back - =cut sub url { @@ -690,14 +582,10 @@ sub url { Returns either a 1 or 0 representing yes and no. Defaults to "0". -=over - -=item name +=head3 name The name of the form variable to retrieve. -=back - =cut sub yesNo { @@ -714,14 +602,10 @@ sub yesNo { Returns a string which allows uppercase alpha characters, digits, spaces, and hypens (dashes). -=over - -=item name +=head3 name The name of the form variable to retrieve. -=back - =cut sub zipcode { diff --git a/lib/WebGUI/Forum.pm b/lib/WebGUI/Forum.pm index 260421070..d5b021736 100644 --- a/lib/WebGUI/Forum.pm +++ b/lib/WebGUI/Forum.pm @@ -68,14 +68,10 @@ These methods are available from this class: Returns a boolean whether the user has the privileges required to post. -=over - -=item userId +=head3 userId Defaults to $session{user}{userId}. Specify a user ID to check privileges for. -=back - =cut sub canPost { @@ -90,14 +86,10 @@ sub canPost { Returns a boolean whether the user has the privileges required to view the forum. -=over - -=item userId +=head3 userId Defaults to $session{user}{userId}. Specify a user ID to check privileges for. -=back - =cut sub canView { @@ -112,9 +104,7 @@ sub canView { Creates a new forum. Returns a forum object. -=over - -=item forumParams +=head3 forumParams A hash reference containing a list of the parameters to default the forum to. The valid parameters are: @@ -138,8 +128,6 @@ archiveAfter - interval postsPerPage - integer masterForumId - Forum ID -=back - =cut sub create { @@ -181,14 +169,10 @@ sub decrementThreads { Returns a hash reference containing all of the properties of the forum. -=over - -=item param +=head3 param If specified then this method will return the value of this one parameter as a scalar. Param is the name of the parameter to return. See the forum table for details. -=back - =cut sub get { @@ -205,14 +189,10 @@ sub get { Returns a thread object. -=over - -=item threadId +=head3 threadId The unique identifier of a thread in this forum. -=back - =cut sub getThread { @@ -229,14 +209,10 @@ sub getThread { Returns a boolean indicating whether the user is a moderator. -=over - -=item userId +=head3 userId Defaults to $session{user}{userId}. A user id to test for moderator privileges. -=back - =cut sub isModerator { @@ -251,18 +227,14 @@ sub isModerator { Increments this forum's reply counter. -=over - -=item lastPostDate +=head3 lastPostDate The date of the post being added. -=item lastPostId +=head3 lastPostId The unique identifier of the post being added. -=back - =cut sub incrementReplies { @@ -276,18 +248,14 @@ sub incrementReplies { Increments the thread counter for this forum. -=over - -=item lastPostDate +=head3 lastPostDate The date of the post that was just added. -=item lastPostId +=head3 lastPostId The unique identifier of the post that was just added. -=back - =cut sub incrementThreads { @@ -314,14 +282,10 @@ sub incrementViews { Returns a boolean indicating whether the user is subscribed to the forum. -=over - -=item userId +=head3 userId The user to check for the subscription. Defaults to $session{user}{userId}. -=back - =cut sub isSubscribed { @@ -337,14 +301,10 @@ sub isSubscribed { Constructor. -=over - -=item forumId +=head3 forumId The unique identifier of the forum to retrieve the object for. -=back - =cut sub new { @@ -428,14 +388,10 @@ sub recalculateRating { Sets the forum properties both in the object and to the database. -=over - -=item data +=head3 data A hash reference containing the properties to set. See the forum table for details. -=back - =cut sub set { @@ -453,18 +409,14 @@ sub set { Sets the pertinent details for the last post. Can also be done directly using the set method. -=over - -=item lastPostDate +=head3 lastPostDate The epoch date of the post. -=item lastPostId +=head3 lastPostId The unique id of the post. -=back - =cut sub setLastPost { @@ -481,14 +433,10 @@ sub setLastPost { Subscribes a user to this forum. -=over - -=item userId +=head3 userId The unique identifier of the user to subscribe. Defaults to the current user. -=back - =cut sub subscribe { @@ -505,14 +453,10 @@ sub subscribe { Unsubscribes a user from this forum. -=over - -=item userId +=head3 userId The unique identifier of the user to unsubscribe. Defaults to the current user. -=back - =cut sub unsubscribe { diff --git a/lib/WebGUI/Forum/Post.pm b/lib/WebGUI/Forum/Post.pm index 3591cb7c2..7d48fcfc8 100644 --- a/lib/WebGUI/Forum/Post.pm +++ b/lib/WebGUI/Forum/Post.pm @@ -68,14 +68,10 @@ These methods are available from this class: Returns a boolean indicating whether the user can edit the current post. -=over - -=item userId +=head3 userId The unique identifier to check privileges against. Defaults to the current user. -=back - =cut sub canEdit { @@ -91,14 +87,10 @@ sub canEdit { Returns a boolean indicating whether the user can view the current post. -=over - -=item userId +=head3 userId The unique identifier to check privileges against. Defaults to the current user. -=back - =cut sub canView { @@ -123,14 +115,10 @@ sub canView { Creates a new post. -=over - -=item data +=head3 data A hash reference containing the data to use to create the post. See the forumPost table for details. -=back - =cut sub create { @@ -148,14 +136,10 @@ sub create { Returns a hash reference containing all of the parameters of this post. -=over - -=item param +=head3 param The name of a parameter to get. If specified then the method will return only the value for this parameter as a scalar. -=back - =cut sub get { @@ -214,18 +198,14 @@ sub getThread { Returns a boolean indicating whether this user has already rated this post. -=over - -=item userId +=head3 userId A unique identifier for a user to check. Defaults to the current user. -=item ipAddress +=head3 ipAddress If the user ID equals 1 (visitor) then an IP address is used to distinguish the user. Defaults to the current user's ip address. -=back - =cut sub hasRated { @@ -259,14 +239,10 @@ sub incrementViews { Returns a boolean indicating whether this post is marked read for the user. -=over - -=item userId +=head3 userId A unique id for a user that you want to check. Defaults to the current user. -=back - =cut sub isMarkedRead { @@ -299,14 +275,10 @@ sub isReply { Marks this post read for this user. -=over - -=item userId +=head3 userId A unique identifier for a user. Defaults to the current user. -=back - =cut sub markRead { @@ -325,14 +297,10 @@ sub markRead { Constructor. -=over - -=item postId +=head3 postId The unique identifier for the post object you wish to retrieve. -=back - =cut sub new { @@ -351,22 +319,18 @@ sub new { Stores a rating against this post. -=over - -=item rating +=head3 rating An integer between 1 and 5 (5 being best) to rate this post with. -=item userId +=head3 userId The unique id for the user rating this post. Defaults to the current user. -=item ipAddress +=head3 ipAddress The ip address of the user doing the rating. Defaults to the current user's IP. -=back - =cut sub rate { @@ -402,14 +366,10 @@ sub recalculateRating { Sets properties to the database and the object. -=over - -=item data +=head3 data A hash reference containing the properties to set. See the forumPost table for details. -=back - =cut @@ -511,14 +471,10 @@ sub setStatusPending { Negates the markRead method. -=over - -=item userId +=head3 userId The unique id of the user marking unread. Defaults to the current user. -=back - =cut sub unmarkRead { diff --git a/lib/WebGUI/Forum/Thread.pm b/lib/WebGUI/Forum/Thread.pm index e5437a69b..930c461e3 100644 --- a/lib/WebGUI/Forum/Thread.pm +++ b/lib/WebGUI/Forum/Thread.pm @@ -75,18 +75,14 @@ These methods are available from this class: Creates a new thread, including the root post in that thread. -=over - -=item data +=head3 data The properties of this thread. See the forumThread table for details. -=item postData +=head3 postData The properties of the root post in this thread. See the forumPost table and the WebGUI::Forum::Post->create method for details. -=back - =cut sub create { @@ -126,14 +122,10 @@ sub decrementReplies { Returns a hash reference containing all the properties of this thread. -=over - -=item param +=head3 param The name of a specific property. If specified only the value of that property will be return as a scalar. -=back - =cut sub get { @@ -184,14 +176,10 @@ sub getNextThread { Returns a post object. -=over - -=item postId +=head3 postId The unique id of the post object you wish to retrieve. -=back - =cut sub getPost { @@ -239,18 +227,14 @@ sub isLocked { Increments the replies counter for this thread. -=over - -=item lastPostDate +=head3 lastPostDate The date of the reply that caused the replies counter to be incremented. -=item lastPostId +=head3 lastPostId The id of the reply that caused the replies counter to be incremented. -=back - =cut sub incrementReplies { @@ -293,14 +277,10 @@ sub isSticky { Returns a boolean indicating whether the user is subscribed to this thread. -=over - -=item userId +=head3 userId The unique id of the user to check. Defaults to the current user. -=back - =cut sub isSubscribed { @@ -330,14 +310,10 @@ sub lock { Constructor. -=over - -=item threadId +=head3 threadId The unique id of the thread object you wish to retrieve. -=back - =cut sub new { @@ -374,14 +350,10 @@ sub recalculateRating { Sets properties for this thread both to the object and to the database. -=over - -=item data +=head3 data A hash reference containing the properties to set. See the forumThread table for details. -=back - =cut sub set { @@ -399,18 +371,14 @@ sub set { Sets the pertinent details for the last post. Can also be done directly using the set method. -=over - -=item lastPostDate +=head3 lastPostDate The epoch date of the post. -=item lastPostId +=head3 lastPostId The unique id of the post. -=back - =cut sub setLastPost { @@ -507,14 +475,10 @@ sub stick { Subscribes the user to this thread. -=over - -=item userId +=head3 userId The unique id of the user. Defaults to the current user. -=back - =cut sub subscribe { @@ -557,14 +521,10 @@ sub unstick { Negates the subscribe method. -=over - -=item userId +=head3 userId The unique id of the user to unsubscribe. Defaults to the current user. -=back - =cut sub unsubscribe { diff --git a/lib/WebGUI/Forum/UI.pm b/lib/WebGUI/Forum/UI.pm index 6315b04b5..51142f0e0 100644 --- a/lib/WebGUI/Forum/UI.pm +++ b/lib/WebGUI/Forum/UI.pm @@ -123,14 +123,10 @@ These functions are available from this package: Cuts a subject string off at 30 characters. -=over - -=item subject +=head3 subject The string to format. -=back - =cut sub chopSubject { @@ -143,18 +139,14 @@ sub chopSubject { Formats the URL to approve a post. -=over - -=item callback +=head3 callback The url to get back to the calling object. -=item postId +=head3 postId The unique id for the post. -=back - =cut sub formatApprovePostURL { @@ -167,18 +159,14 @@ sub formatApprovePostURL { Formats the url to delete a post. -=over - -=item callback +=head3 callback The url to get back tot he calling object. -=item postId +=head3 postId The unique id for the post. -=back - =cut sub formatDeletePostURL { @@ -191,18 +179,14 @@ sub formatDeletePostURL { Formats the url to deny a post. -=over - -=item callback +=head3 callback The url to get back tot he calling object. -=item postId +=head3 postId The unique id for the post. -=back - =cut sub formatDenyPostURL { @@ -215,18 +199,14 @@ sub formatDenyPostURL { Formats the url to edit a post. -=over - -=item callback +=head3 callback The url to get back tot he calling object. -=item postId +=head3 postId The unique id for the post. -=back - =cut sub formatEditPostURL { @@ -239,18 +219,14 @@ sub formatEditPostURL { Formats the url to the forum search engine. -=over - -=item callback +=head3 callback The url to get back tot he calling object. -=item forumId +=head3 forumId The unique id for the forum. -=back - =cut sub formatForumSearchURL { @@ -263,22 +239,18 @@ sub formatForumSearchURL { Formats the url to change the default sort. -=over - -=item callback +=head3 callback The url to get back tot he calling object. -=item forumId +=head3 forumId The unique id for the forum. -=item sortBy +=head3 sortBy The sort by string. Can be views, rating, date replies, or lastreply. -=back - =cut sub formatForumSortByURL { @@ -291,18 +263,14 @@ sub formatForumSortByURL { Formats the url to subscribe to the forum. -=over - -=item callback +=head3 callback The url to get back tot he calling object. -=item forumId +=head3 forumId The unique id for the forum. -=back - =cut sub formatForumSubscribeURL { @@ -315,18 +283,14 @@ sub formatForumSubscribeURL { Formats the url to unsubscribe from the forum. -=over - -=item callback +=head3 callback The url to get back tot he calling object. -=item forumId +=head3 forumId The unique id for the forum. -=back - =cut sub formatForumUnsubscribeURL { @@ -339,18 +303,14 @@ sub formatForumUnsubscribeURL { Formats the url to view the forum. -=over - -=item callback +=head3 callback The url to get back tot he calling object. -=item forumId +=head3 forumId The unique id for the forum. -=back - =cut sub formatForumURL { @@ -364,18 +324,14 @@ sub formatForumURL { Formats a post message for display. -=over - -=item post +=head3 post The post object for this message. -=item forum +=head3 forum The forum object for this message. Defaults to post->getThread->getForum. -=back - =cut sub formatMessage { @@ -395,18 +351,14 @@ sub formatMessage { Formats the url to view the next thread. -=over - -=item callback +=head3 callback The url to get back tot he calling object. -=item postId +=head3 postId The unique id for the post. -=back - =cut sub formatNextThreadURL { @@ -419,18 +371,14 @@ sub formatNextThreadURL { Formats the url to start a new thread. -=over - -=item callback +=head3 callback The url to get back tot he calling object. -=item forumId +=head3 forumId The unique id for the forum. -=back - =cut sub formatNewThreadURL { @@ -443,14 +391,10 @@ sub formatNewThreadURL { Formats the date as human readable according to the user's profile. -=over - -=item epoch +=head3 epoch The date represented as the number of seconds since January 1, 1970. -=back - =cut sub formatPostDate { @@ -463,14 +407,10 @@ sub formatPostDate { Formats the time as human readable according to the user's profile. -=over - -=item epoch +=head3 epoch The date represented as the number of seconds since January 1, 1970. -=back - =cut sub formatPostTime { @@ -483,18 +423,14 @@ sub formatPostTime { Formats the url to view the previous thread. -=over - -=item callback +=head3 callback The url to get back tot he calling object. -=item postId +=head3 postId The unique id for the post. -=back - =cut sub formatPreviousThreadURL { @@ -507,22 +443,18 @@ sub formatPreviousThreadURL { Formats the url to rate a post. -=over - -=item callback +=head3 callback The url to get back tot he calling object. -=item postId +=head3 postId The unique id for the post. -=item rating +=head3 rating An integer between 1 and 5 (5 = best). -=back - =cut sub formatRatePostURL { @@ -535,26 +467,22 @@ sub formatRatePostURL { Formats the url to reply to a post. -=over - -=item callback +=head3 callback The url to get back tot he calling object. -=item postId +=head3 postId The unique id for the post. -=item forumId +=head3 forumId The unique id for the forum. -=item withQuote +=head3 withQuote If specified the reply with automatically quote the parent post. -=back - =cut sub formatReplyPostURL { @@ -569,14 +497,10 @@ sub formatReplyPostURL { Returns an internationalized string for the status based upon the key. -=over - -=item status +=head3 status A string key. Can be approved, archived, deleted, denied, or pending. -=back - =cut sub formatStatus { @@ -598,22 +522,18 @@ sub formatStatus { Formats the url to change the layout of a thread. -=over - -=item callback +=head3 callback The url to get back tot he calling object. -=item postId +=head3 postId The unique id for the post. -=item layout +=head3 layout A string indicating the type of layout to use. Can be flat, nested, or threaded. -=back - =cut sub formatThreadLayoutURL { @@ -626,18 +546,14 @@ sub formatThreadLayoutURL { Formats the url to lock a thread. -=over - -=item callback +=head3 callback The url to get back tot he calling object. -=item postId +=head3 postId The unique id for the post. -=back - =cut sub formatThreadLockURL { @@ -650,18 +566,14 @@ sub formatThreadLockURL { Formats the url to make a thread sticky. -=over - -=item callback +=head3 callback The url to get back tot he calling object. -=item postId +=head3 postId The unique id for the post. -=back - =cut sub formatThreadStickURL { @@ -674,18 +586,14 @@ sub formatThreadStickURL { Formats the url to subscribe to a thread. -=over - -=item callback +=head3 callback The url to get back tot he calling object. -=item postId +=head3 postId The unique id for the post. -=back - =cut sub formatThreadSubscribeURL { @@ -698,18 +606,14 @@ sub formatThreadSubscribeURL { Formats the url to unlock a thread. -=over - -=item callback +=head3 callback The url to get back tot he calling object. -=item postId +=head3 postId The unique id for the post. -=back - =cut sub formatThreadUnlockURL { @@ -722,18 +626,14 @@ sub formatThreadUnlockURL { Formats the url to make a sticky thread no longer sticky. -=over - -=item callback +=head3 callback The url to get back tot he calling object. -=item postId +=head3 postId The unique id for the post. -=back - =cut sub formatThreadUnstickURL { @@ -746,18 +646,14 @@ sub formatThreadUnstickURL { Formats the url to unsubscribe from a thread. -=over - -=item callback +=head3 callback The url to get back tot he calling object. -=item postId +=head3 postId The unique id for the post. -=back - =cut sub formatThreadUnsubscribeURL { @@ -770,18 +666,14 @@ sub formatThreadUnsubscribeURL { Formats the url to view a thread. -=over - -=item callback +=head3 callback The url to get back tot he calling object. -=item postId +=head3 postId The unique id for the post. -=back - =cut sub formatThreadURL { @@ -794,14 +686,10 @@ sub formatThreadURL { Formats the url to view a users profile. -=over - -=item userId +=head3 userId The unique id for the user. -=back - =cut sub formatUserProfileURL { @@ -814,14 +702,10 @@ sub formatUserProfileURL { Returns a forum containing the editable properties of a forum. -=over - -=item forumId +=head3 forumId The unique id of the forum. -=back - =cut sub forumProperties { @@ -1029,9 +913,7 @@ sub forumPropertiesSave { Returns the output of the various www_ subroutines. -=over - -=item caller +=head3 caller A hash reference containing information passed from the calling object. The following are hash keys that should be passed: @@ -1043,8 +925,6 @@ description: The description of the parent object for display in the fourm templ forumId: The ID of the forum that is attached to the calling object. -=back - =cut sub forumOp { @@ -1078,18 +958,14 @@ sub forumOp { Returns a hash reference compatible with WebGUI's templating system. -=over - -=item caller +=head3 caller A hash reference containing information passed from the calling object. -=item forum +=head3 forum The unique id for the forum. -=back - =cut sub getForumTemplateVars { @@ -1211,30 +1087,26 @@ sub getForumTemplateVars { Returns a hash reference compatible with WebGUI's templating system containing the template variables for a post. -=over - -=item post +=head3 post A post object. -=item thread +=head3 thread A thread object. -=item forum +=head3 forum A forum object. -=item caller +=head3 caller A hash reference containing information passed from the calling object. -=item var +=head3 var A hash reference to be prepended to the hashref being returned. -=back - =cut sub getPostTemplateVars { @@ -1297,18 +1169,14 @@ sub getPostTemplateVars { Returns a hash reference compatible with WebGUI's template system containing the template variables for the thread. -=over - -=item caller +=head3 caller A hash reference containing information passed from the calling object. -=item post +=head3 post A post object. -=back - =cut sub getThreadTemplateVars { @@ -1391,26 +1259,22 @@ sub getThreadTemplateVars { Send notifications to the thread and forum subscribers that a new post has been made. -=over - -=item post +=head3 post A post object. -=item thread +=head3 thread A thread object. -=item forum +=head3 forum A forum object. -=item caller +=head3 caller A hash reference containing information passed from the calling object. -=back - =cut sub notifySubscribers { @@ -1450,34 +1314,30 @@ sub notifySubscribers { Returns an array reference with the template variables from all the posts in a thread. -=over - -=item post +=head3 post A post object. -=item thread +=head3 thread A thread object. -=item forum +=head3 forum A forum object. -=item depth +=head3 depth An integer representing the depth of the current recurrsion. Starts at 0. -=item caller +=head3 caller A hash reference containing information passed from the calling object. -=item currentPost +=head3 currentPost The unique id of the post that was selected by the user in this thread. -=back - =cut sub recurseThread { @@ -1507,30 +1367,26 @@ sub recurseThread { Returns an array reference with the template variables from all the posts in a thread in flat mode. In flat mode messages are ordered by submission date, so threading is not maintained. -=over - -=item post +=head3 post A post object. -=item thread +=head3 thread A thread object. -=item forum +=head3 forum A forum object. -=item caller +=head3 caller A hash reference containing information passed from the calling object. -=item currentPost +=head3 currentPost The unique id of the post that was selected by the user in this thread. -=back - =cut sub getFlatThread { @@ -1552,18 +1408,14 @@ sub getFlatThread { Sets the post to approved and sends any necessary notifications. -=over - -=item caller +=head3 caller A hash reference containing information passed from the calling object. -=item post +=head3 post A post object. -=back - =cut sub setPostApproved { @@ -1581,18 +1433,14 @@ sub setPostApproved { Sets the post to deleted and sends any necessary notifications. -=over - -=item caller +=head3 caller A hash reference containing information passed from the calling object. -=item post +=head3 post A post object. -=back - =cut sub setPostDeleted { @@ -1606,18 +1454,14 @@ sub setPostDeleted { Sets the post to denied and sends any necessary notifications. -=over - -=item caller +=head3 caller A hash reference containing information passed from the calling object. -=item post +=head3 post A post object. -=back - =cut sub setPostDenied { @@ -1632,18 +1476,14 @@ sub setPostDenied { Sets the post to pending and sends any necessary notifications. -=over - -=item caller +=head3 caller A hash reference containing information passed from the calling object. -=item post +=head3 post A post object. -=back - =cut sub setPostPending { @@ -1659,18 +1499,14 @@ sub setPostPending { Sets a new post's status based upon forum settings. -=over - -=item caller +=head3 caller A hash reference containing information passed from the calling object. -=item post +=head3 post A post object. -=back - =cut sub setPostStatus { @@ -1688,14 +1524,10 @@ sub setPostStatus { The web method to approve a post. -=over - -=item caller +=head3 caller A hash reference containing information passed from the calling object. -=back - =cut sub www_approvePost { @@ -1712,14 +1544,10 @@ sub www_approvePost { The web method to prompt a user as to whether they actually want to delete a post. -=over - -=item caller +=head3 caller A hash reference containing information passed from the calling object. -=back - =cut sub www_deletePost { @@ -1740,14 +1568,10 @@ sub www_deletePost { The web method to delete a post. -=over - -=item caller +=head3 caller A hash reference containing information passed from the calling object. -=back - =cut sub www_deletePostConfirm { @@ -1764,14 +1588,10 @@ sub www_deletePostConfirm { The web method to deny a post. -=over - -=item caller +=head3 caller A hash reference containing information passed from the calling object. -=back - =cut sub www_denyPost { @@ -1788,14 +1608,10 @@ sub www_denyPost { The web method to subscribe to a forum. -=over - -=item caller +=head3 caller A hash reference containing information passed from the calling object. -=back - =cut sub www_forumSubscribe { @@ -1812,14 +1628,10 @@ sub www_forumSubscribe { The web method to unsubscribe from a forum. -=over - -=item caller +=head3 caller A hash reference containing information passed from the calling object. -=back - =cut sub www_forumUnsubscribe { @@ -1836,14 +1648,10 @@ sub www_forumUnsubscribe { The web method to display the next thread in the forum. -=over - -=item caller +=head3 caller A hash reference containing information passed from the calling object. -=back - =cut sub www_nextThread { @@ -1863,14 +1671,10 @@ sub www_nextThread { The web method to display the post form. -=over - -=item caller +=head3 caller A hash reference containing information passed from the calling object. -=back - =cut sub www_post { @@ -1994,14 +1798,10 @@ sub www_post { The web method to generate a preview of a posting. -=over - -=item caller +=head3 caller A hash reference containing information passed from the calling object. -=back - =cut sub www_postPreview { @@ -2057,14 +1857,10 @@ sub www_postPreview { The web method to save the data from the post form. -=over - -=item caller +=head3 caller A hash reference containing information passed from the calling object. -=back - =cut sub www_postSave { @@ -2138,14 +1934,10 @@ sub www_postSave { The web method to view the previous thread in this forum. -=over - -=item caller +=head3 caller A hash reference containing information passed from the calling object. -=back - =cut sub www_previousThread { @@ -2165,14 +1957,10 @@ sub www_previousThread { The web method to rate a post. -=over - -=item caller +=head3 caller A hash reference containing information passed from the calling object. -=back - =cut sub www_ratePost { @@ -2189,14 +1977,10 @@ sub www_ratePost { The web method to display and use the forum search interface. -=over - -=item caller +=head3 caller A hash reference containing information passed from the calling object. -=back - =cut sub www_search { @@ -2296,14 +2080,10 @@ sub www_search { The web method to lock a thread. -=over - -=item caller +=head3 caller A hash reference containing information passed from the calling object. -=back - =cut sub www_threadLock { @@ -2320,14 +2100,10 @@ sub www_threadLock { The web method to make a thread sticky. -=over - -=item caller +=head3 caller A hash reference containing information passed from the calling object. -=back - =cut sub www_threadStick { @@ -2344,14 +2120,10 @@ sub www_threadStick { The web method to subscribe to a thread. -=over - -=item caller +=head3 caller A hash reference containing information passed from the calling object. -=back - =cut sub www_threadSubscribe { @@ -2368,14 +2140,10 @@ sub www_threadSubscribe { The web method to unlock a thread. -=over - -=item caller +=head3 caller A hash reference containing information passed from the calling object. -=back - =cut sub www_threadUnlock { @@ -2392,14 +2160,10 @@ sub www_threadUnlock { The web method to make a sticky thread normal again. -=over - -=item caller +=head3 caller A hash reference containing information passed from the calling object. -=back - =cut sub www_threadUnstick { @@ -2416,14 +2180,10 @@ sub www_threadUnstick { The web method to unsubscribe from a thread. -=over - -=item caller +=head3 caller A hash reference containing information passed from the calling object. -=back - =cut sub www_threadUnsubscribe { @@ -2440,18 +2200,14 @@ sub www_threadUnsubscribe { The web method to display a forum. -=over - -=item caller +=head3 caller The url to get back to the calling object. -=item forumId +=head3 forumId Specify a forumId and call this method directly, rather than over the web. -=back - =cut sub www_viewForum { @@ -2483,18 +2239,14 @@ sub www_viewForum { The web method to display a thread. -=over - -=item caller +=head3 caller A hash reference containing information passed from the calling object. -=item postId +=head3 postId Specify a postId and call this method directly, rather than over the web. -=back - =cut sub www_viewThread { diff --git a/lib/WebGUI/Group.pm b/lib/WebGUI/Group.pm index 3a990b979..ca039db67 100755 --- a/lib/WebGUI/Group.pm +++ b/lib/WebGUI/Group.pm @@ -81,14 +81,10 @@ sub _create { Adds groups to this group. -=over - -=item groups +=head3 groups An array reference containing the list of group ids to add to this group. -=back - =cut sub addGroups { @@ -101,14 +97,10 @@ sub addGroups { Returns an boolean stating whether users can add themselves to this group. -=over - -=item value +=head3 value If specified, the autoAdd is set to this value. -=back - =cut sub autoAdd { @@ -130,14 +122,10 @@ sub autoAdd { Returns an boolean stating whether users can delete themselves from this group. -=over - -=item value +=head3 value If specified, the autoDelete is set to this value. -=back - =cut sub autoDelete { @@ -186,14 +174,10 @@ sub delete { Deletes groups from this group. -=over - -=item groups +=head3 groups An array reference containing the list of group ids to delete from this group. -=back - =cut sub deleteGroups { @@ -207,14 +191,10 @@ sub deleteGroups { Returns the number of days after the expiration to delete the grouping. -=over - -=item value +=head3 value If specified, deleteOffset is set to this value. Defaults to "-14". -=back - =cut sub deleteOffset { @@ -236,14 +216,10 @@ sub deleteOffset { Returns the description of this group. -=over - -=item value +=head3 value If specified, the description is set to this value. -=back - =cut sub description { @@ -265,14 +241,10 @@ sub description { Returns a boolean value whether or not to notify the user of the group expiry. -=over - -=item value +=head3 value If specified, expireNotify is set to this value. -=back - =cut sub expireNotify { @@ -294,14 +266,10 @@ sub expireNotify { Returns the message to send to the user about expiration. -=over - -=item value +=head3 value If specified, expireNotifyMessage is set to this value. -=back - =cut sub expireNotifyMessage { @@ -324,14 +292,10 @@ sub expireNotifyMessage { Returns the number of days after the expiration to notify the user. -=over - -=item value +=head3 value If specified, expireNotifyOffset is set to this value. -=back - =cut sub expireNotifyOffset { @@ -353,14 +317,10 @@ sub expireNotifyOffset { Returns the number of seconds any grouping with this group should expire after. -=over - -=item value +=head3 value If specified, expireOffset is set to this value. -=back - =cut sub expireOffset { @@ -382,14 +342,10 @@ sub expireOffset { An alternative to the constructor "new", use find as a constructor by name rather than id. -=over - -=item name +=head3 name The name of the group you wish to instanciate. -=back - =cut sub find { @@ -417,14 +373,10 @@ sub groupId { Returns the amount of karma required to be in this group. -=over - -=item value +=head3 value If specified, the karma threshold is set to this value. -=back - =cut sub karmaThreshold { @@ -446,14 +398,10 @@ sub karmaThreshold { Returns the ip address range(s) the user must be a part of to belong to this group. -=over - -=item value +=head3 value If specified, the ipFilter is set to this value. -=back - =cut sub ipFilter { @@ -475,14 +423,10 @@ sub ipFilter { Returns a boolean value indicating whether the group should be managable from the group manager. System level groups and groups autocreated by wobjects would use this parameter. -=over - -=item value +=head3 value If specified, isEditable is set to this value. -=back - =cut sub isEditable { @@ -517,14 +461,10 @@ sub lastUpdated { Returns the name of this group. -=over - -=item value +=head3 value If specified, the name is set to this value. -=back - =cut sub name { @@ -546,14 +486,10 @@ sub name { Constructor. -=over - -=item groupId +=head3 groupId The groupId of the group you're creating an object reference for. If specified as "new" then a new group will be created and assigned the next available groupId. If left blank then the object methods will just return default values for everything. -=back - =cut sub new { @@ -583,14 +519,10 @@ sub new { Returns the name of this group. -=over - -=item value +=head3 value If specified, the name is set to this value. -=back - =cut sub scratchFilter { @@ -611,14 +543,10 @@ sub scratchFilter { Returns a boolean value indicating whether the group should show in forms that display a list of groups. System level groups and groups autocreated by wobjects would use this parameter. -=over - -=item value +=head3 value If specified, showInForms is set to this value. -=back - =cut sub showInForms { @@ -642,14 +570,10 @@ sub showInForms { Returns the dbQuery for this group. -=over - -=item value +=head3 value If specified, the dbQuery is set to this value. -=back - =cut sub dbQuery { @@ -670,14 +594,10 @@ sub dbQuery { Returns the databaseLinkId for this group. -=over - -=item value +=head3 value If specified, the databaseLinkId is set to this value. -=back - =cut sub databaseLinkId { @@ -698,14 +618,10 @@ sub databaseLinkId { Returns the dbCacheTimeout for this group. -=over - -=item value +=head3 value If specified, the dbCacheTimeout is set to this value. -=back - =cut sub dbCacheTimeout { diff --git a/lib/WebGUI/Grouping.pm b/lib/WebGUI/Grouping.pm index dd09c52b7..62fc08bd2 100755 --- a/lib/WebGUI/Grouping.pm +++ b/lib/WebGUI/Grouping.pm @@ -58,18 +58,14 @@ These functions are available from this package: Adds groups to a group. -=over - -=item groups +=head3 groups An array reference containing the list of group ids to add. -=item toGroups +=head3 toGroups An array reference containing the list of group ids to add the first list to. -=back - =cut sub addGroupsToGroups { @@ -92,22 +88,18 @@ sub addGroupsToGroups { Adds users to the specified groups. -=over - -=item users +=head3 users An array reference containing a list of users. -=item groups +=head3 groups An array reference containing a list of groups. -=item expireOffset +=head3 expireOffset An override for the default offset of the grouping. Specified in seconds. -=back - =cut sub addUsersToGroups { @@ -134,18 +126,14 @@ sub addUsersToGroups { Deletes groups from these groups. -=over - -=item groups +=head3 groups An array reference containing the list of group ids to delete. -=item fromGroups +=head3 fromGroups An array reference containing the list of group ids to delete from. -=back - =cut sub deleteGroupsFromGroups { @@ -163,18 +151,14 @@ sub deleteGroupsFromGroups { Deletes a list of users from the specified groups. -=over - -=item users +=head3 users An array reference containing a list of users. -=item groups +=head3 groups An array reference containing a list of groups. -=back - =cut sub deleteUsersFromGroups { @@ -192,14 +176,10 @@ sub deleteUsersFromGroups { Returns an array reference containing a list of groups the specified group is in. -=over - -=item groupId +=head3 groupId A unique identifier for the group. -=back - =cut sub getGroupsForGroup { @@ -213,18 +193,14 @@ sub getGroupsForGroup { Returns an array reference containing a list of groups the specified user is in. -=over - -=item userId +=head3 userId A unique identifier for the user. -=item withoutExpired +=head3 withoutExpired If set to "1" then the listing will not include expired groupings. Defaults to "0". -=back - =cut sub getGroupsForUser { @@ -252,18 +228,14 @@ sub getGroupsForUser { Returns an array reference containing a list of groups that belong to the specified group. -=over - -=item groupId +=head3 groupId A unique identifier for the group. -=item recursive +=head3 recursive A boolean value to determine whether the method should return the groups directly in the group, or to follow the entire groups of groups hierarchy. Defaults to "0". -=back - =cut @@ -302,18 +274,14 @@ sub getGroupsInGroup { Returns an array reference containing a list of users that belong to the specified group. -=over - -=item groupId +=head3 groupId A unique identifier for the group. -=item recursive +=head3 recursive A boolean value to determine whether the method should return the users directly in the group or to follow the entire groups of groups hierarchy. Defaults to "0". -=back - =cut sub getUsersInGroup { @@ -334,18 +302,14 @@ sub getUsersInGroup { Returns a boolean (0|1) value signifying that the user has the required privileges. Always returns true for Admins. -=over - -=item groupId +=head3 groupId The group that you wish to verify against the user. Defaults to group with Id 3 (the Admin group). -=item userId +=head3 userId The user that you wish to verify against the group. Defaults to the currently logged in user. -=back - =cut sub isInGroup { @@ -477,22 +441,18 @@ sub isInGroup { Returns a 1 or 0 depending upon whether the user is a sub-admin for this group. -=over - -=item userId +=head3 userId An integer that is the unique identifier for a user. -=item groupId +=head3 groupId An integer that is the unique identifier for a group. -=item value +=head3 value If specified the admin flag will be set to this value. -=back - =cut sub userGroupAdmin { @@ -511,22 +471,18 @@ sub userGroupAdmin { Returns the epoch date that this grouping will expire. -=over - -=item userId +=head3 userId An integer that is the unique identifier for a user. -=item groupId +=head3 groupId An integer that is the unique identifier for a group. -=item epoch +=head3 epoch If specified the expire date will be set to this value. -=back - =cut sub userGroupExpireDate { diff --git a/lib/WebGUI/HTML.pm b/lib/WebGUI/HTML.pm index cb3a35dcd..50da81e04 100644 --- a/lib/WebGUI/HTML.pm +++ b/lib/WebGUI/HTML.pm @@ -53,16 +53,12 @@ These methods are available from this package: Returns an HTML segment that has been stripped of the tag and anything before it, as well as the tag and anything after it. It's main purpose is to get rid of META tags and other garbage from an HTML page that will be used as a segment inside of another page. -NOTE: This filter does have one exception, it leaves anything before the tag that is enclosed in or tags. +B This filter does have one exception, it leaves anything before the tag that is enclosed in or tags. -=over - -=item html +=head3 html The HTML segment you want cleaned. -=back - =cut sub cleanSegment { @@ -95,18 +91,14 @@ sub cleanSegment { Returns HTML with unwanted tags filtered out. -=over - -=item html +=head3 html The HTML content you want filtered. -=item filter +=head3 filter Choose from "all", "none", "macros", "javascript", or "most". Defaults to "most". "all" removes all HTML tags and macros; "none" removes no HTML tags; "javascript" removes all references to javacript and macros; "macros" removes all macros, but nothing else; and "most" removes all but simple formatting tags like bold and italics. -=back - =cut sub filter { @@ -151,18 +143,14 @@ sub filter { Formats various text types into HTML. -=over - -=item content +=head3 content The text content to be formatted. -=item contentType +=head3 contentType The content type to use as formatting. Valid types are 'html', 'text', 'code', and 'mixed'. Defaults to mixed. See also the contentType method in WebGUI::Form, WebGUI::HTMLForm, and WebGUI::FormProcessor. -=back - =cut sub format { @@ -194,14 +182,10 @@ sub format { Converts html to text. It currently handles only text, so tables or forms are not converted. -=over - -=item html +=head3 html The html segment you want to convert to text. -=back - =cut sub html2text { @@ -240,18 +224,14 @@ sub html2text { Returns html with all relative links converted to absolute. -=over - -=item html +=head3 html The html to be made absolute. -=item baseURL +=head3 baseURL The base URL to use. Defaults to current page's url. -=back - =cut sub makeAbsolute { @@ -322,14 +302,10 @@ sub makeAbsolute { Processes text using the WebGUI replacements system. -=over - -=item content +=head3 content The content to be processed through the replacements filter. -=back - =cut sub processReplacements { diff --git a/lib/WebGUI/HTMLForm.pm b/lib/WebGUI/HTMLForm.pm index 09cc0eae9..2daac7a1d 100644 --- a/lib/WebGUI/HTMLForm.pm +++ b/lib/WebGUI/HTMLForm.pm @@ -218,40 +218,36 @@ sub _uiLevelChecksOut { Adds a checkbox row to this form. -=over - -=item name +=head3 name The name field for this form element. -=item label +=head3 label The left column label for this form row. -=item checked +=head3 checked If you'd like this box to be defaultly checked, set this to "1". -=item subtext +=head3 subtext Extra text to describe this form element or to provide special instructions. -=item value +=head3 value The default value for this form element. Defaults to "1". -=item extras +=head3 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 +=head3 uiLevel The UI level for this field. See the WebGUI developer's site for details. Defaults to "0". -=back - =cut sub checkbox { @@ -285,44 +281,40 @@ sub checkbox { Adds a checkbox list row to this form. -=over - -=item name +=head3 name The name field for this form element. -=item options +=head3 options The list of options for this list. Should be passed as a hash reference. -=item label +=head3 label The left column label for this form row. -=item value +=head3 value The default value(s) for this form element. This should be passed as an array reference. -=item vertical +=head3 vertical If set to "1" the radio button elements will be laid out horizontally. Defaults to "0". -=item extras +=head3 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 subtext +=head3 subtext Extra text to describe this form element or to provide special instructions. -=item uiLevel +=head3 uiLevel The UI level for this field. See the WebGUI developer's site for details. Defaults to "0". -=back - =cut sub checkList { @@ -356,48 +348,44 @@ sub checkList { 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 +=head3 name The name field for this form element. -=item options +=head3 options The list of options for this select list. Should be passed as a hash reference. -=item label +=head3 label The left column label for this form row. -=item value +=head3 value The default value(s) for this form element. This should be passed as an array reference. -=item size +=head3 size The number of characters tall this form element should be. Defaults to "1". -=item multiple +=head3 multiple A boolean value for whether this select list should allow multiple selections. Defaults to "0". -=item extras +=head3 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 subtext +=head3 subtext Extra text to describe this form element or to provide special instructions. -=item uiLevel +=head3 uiLevel The UI level for this field. See the WebGUI developer's site for details. Defaults to "0". -=back - =cut sub combo { @@ -432,40 +420,36 @@ sub combo { Adds a content type select list field to this form. -=over - -=item name +=head3 name The name field for this form element. -=item types +=head3 types An array reference of field types to be displayed. The valid types are "code", "mixed", "html", and "text". Defaults to all types. -=item label +=head3 label The left column label for this form row. Defaults to "Content Type". -=item value +=head3 value The default value for this form element. -=item extras +=head3 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 subtext +=head3 subtext Extra text to describe this form element or to provide special instructions. -=item uiLevel +=head3 uiLevel The UI level for this field. See the WebGUI developer's site for details. Defaults to "3". -=back - =cut sub contentType { @@ -501,36 +485,32 @@ sub contentType { Adds a database link select list to the form. -=over - -=item name +=head3 name The name of this form element. -=item value +=head3 value The default value for this form element. -=item label +=head3 label The left column label for this form row. Defaults to "Database Link". -=item afterEdit +=head3 afterEdit A URL that will be acted upon after editing a database link. Typically there is a link next to the select list that reads "Edit this database link" and this is the URL to go to after editing is complete. -=item extras +=head3 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 +=head3 uiLevel The UI level for this field. See the WebGUI developer's site for details. Defaults to "5". -=back - =cut sub databaseLink { @@ -570,44 +550,40 @@ sub databaseLink { Adds a date row to this form. -=over - -=item name +=head3 name The name field for this form element. -=item label +=head3 label The left column label for this form row. -=item value +=head3 value The default date. Pass as an epoch value. Defaults to today. -=item extras +=head3 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 subtext +=head3 subtext Extra text to describe this form element or to provide special instructions. -=item size +=head3 size The number of characters wide this form element should be. There should be no reason for anyone to specify this. -=item noDate +=head3 noDate By default a date is placed in the "value" field. Set this to "1" to turn off the default date. -=item uiLevel +=head3 uiLevel The UI level for this field. See the WebGUI developer's site for details. Defaults to "0". -=back - =cut sub date { @@ -642,34 +618,30 @@ sub date { Adds a date time row to this form. -=over - -=item name +=head3 name The name field for this form element. -=item label +=head3 label The left column label for this form row. -=item value +=head3 value The default date and time. Pass as an epoch value. Defaults to today and now. -=item subtext +=head3 subtext Extra text to describe this form element or to provide special instructions. -=item uiLevel +=head3 uiLevel The UI level for this field. See the WebGUI developer's site for details. Defaults to "0". -=item extras +=head3 extras Extra parameters such as javascript or style sheet information that you wish to add to the form element. -=back - =cut sub dateTime { @@ -703,18 +675,14 @@ Adds a dynamic field to this form. This is primarily useful for building dynamic Because of the dynamic nature of this field, it supports only the -option=>value way of specifying parameters. -=over - -=item fieldType +=head3 fieldType The field type to use. The field name is the name of the method from this forms package. -=item options +=head3 options The field options. See the documentation for the desired field for more information. -=back - =cut sub dynamicField { @@ -746,44 +714,40 @@ sub dynamicField { Adds an email address row to this form. -=over - -=item name +=head3 name The name field for this form element. -=item label +=head3 label The left column label for this form row. -=item value +=head3 value The default value for this form element. -=item maxlength +=head3 maxlength The maximum number of characters to allow in this form element. -=item extras +=head3 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 subtext +=head3 subtext Extra text to describe this form element or to provide special instructions. -=item size +=head3 size The number of characters wide this form element should be. There should be no reason for anyone to specify this. -=item uiLevel +=head3 uiLevel The UI level for this field. See the WebGUI developer's site for details. Defaults to "0". -=back - =cut sub email { @@ -817,44 +781,40 @@ sub email { Adds a field type select list field to this form. This is primarily useful for building dynamic form builders. -=over - -=item name +=head3 name The name field for this form element. -=item types +=head3 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. Defaults to all types. -=item label +=head3 label The left column label for this form row. -=item value +=head3 value The default value for this form element. -=item size +=head3 size The number of characters tall this form element should be. Defaults to "1". -=item extras +=head3 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 subtext +=head3 subtext Extra text to describe this form element or to provide special instructions. -=item uiLevel +=head3 uiLevel The UI level for this field. See the WebGUI developer's site for details. Defaults to "0". -=back - =cut sub fieldType { @@ -889,36 +849,32 @@ sub fieldType { Adds a file browse row to this form. -=over - -=item name +=head3 name The name field for this form element. -=item label +=head3 label The left column label for this form row. -=item subtext +=head3 subtext Extra text to describe this form element or to provide special instructions. -=item extras +=head3 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 size +=head3 size The number of characters wide this form element should be. There should be no reason for anyone to specify this. -=item uiLevel +=head3 uiLevel The UI level for this field. See the WebGUI developer's site for details. Defaults to "0". -=back - =cut sub file { @@ -944,37 +900,33 @@ sub file { Adds a content filter select list to the form for use with the WebGUI::HTML::filter() function. -=over - -=item name +=head3 name The name field for this form element. Defaults to "filterContent". -=item label +=head3 label The left column label for this form row. Defaults to "Filter Content" (internationalized). -=item value +=head3 value The default value for this form element. -=item extras +=head3 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 subtext +=head3 subtext Extra text to describe this form element or to provide special instructions. -=item uiLevel +=head3 uiLevel The UI level for this field. See the WebGUI developer's site for details. Defaults to "0". -=back - =cut sub filterContent { @@ -1007,44 +959,40 @@ sub filterContent { Adds an integer row to this form. -=over - -=item name +=head3 name The name field for this form element. -=item label +=head3 label The left column label for this form row. -=item value +=head3 value The default value for this form element. -=item maxlength +=head3 maxlength The maximum number of characters to allow in this form element. Defaults to 11. -=item extras +=head3 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 subtext +=head3 subtext Extra text to describe this form element or to provide special instructions. -=item size +=head3 size The number of characters wide this form element should be. There should be no reason for anyone to specify this. -=item uiLevel +=head3 uiLevel The UI level for this field. See the WebGUI developer's site for details. Defaults to "0". -=back - =cut sub float { @@ -1079,48 +1027,44 @@ sub float { 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 +=head3 name The name field for this form element. -=item label +=head3 label The left column label for this form row. -=item value +=head3 value The default value(s) for this form element. This should be passed as an array reference. Defaults to "7" (Everyone). -=item size +=head3 size How many rows should be displayed at once? -=item multiple +=head3 multiple Set to "1" if multiple groups should be selectable. -=item extras +=head3 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 subtext +=head3 subtext Extra text to describe this form element or to provide special instructions. -=item uiLevel +=head3 uiLevel The UI level for this field. See the WebGUI developer's site for details. Defaults to "0". -=item excludeGroups +=head3 excludeGroups An array reference containing a list of groups to exclude from the list. -=back - =cut sub group { @@ -1159,18 +1103,14 @@ sub group { Adds a hidden row to this form. -=over - -=item name +=head3 name The name field for this form element. -=item value +=head3 value The default value for this form element. -=back - =cut sub hidden { @@ -1188,53 +1128,49 @@ sub hidden { 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 +=head3 name The name field for this form element. -=item label +=head3 label The left column label for this form row. -=item value +=head3 value The default value for this form element. -=item subtext +=head3 subtext Extra text to describe this form element or to provide special instructions. -=item extras +=head3 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 wrap +=head3 wrap The method for wrapping text in the text area. Defaults to "virtual". There should be almost no reason to specify this. -=item rows +=head3 rows The number of characters tall this form element should be. There should be no reason for anyone to specify this. -=item columns +=head3 columns The number of characters wide this form element should be. There should be no reason for anyone to specify this. -=item uiLevel +=head3 uiLevel The UI level for this field. See the WebGUI developer's site for details. Defaults to "0". -=item popupToggle +=head3 popupToggle Defaults to "0". If set to "1" the rich editor will be a pop-up editor. If set to "0" the rich editor will be inline. -NOTE: WebGUI uses a great variety of rich editors. Not all of them are capable of inline mode, so even if you leave this set to "0" the editor may be a pop-up anyway. - -=back +B WebGUI uses a great variety of rich editors. Not all of them are capable of inline mode, so even if you leave this set to "0" the editor may be a pop-up anyway. =cut @@ -1270,44 +1206,40 @@ sub HTMLArea { Adds an integer row to this form. -=over - -=item name +=head3 name The name field for this form element. -=item label +=head3 label The left column label for this form row. -=item value +=head3 value The default value for this form element. -=item maxlength +=head3 maxlength The maximum number of characters to allow in this form element. Defaults to 11. -=item extras +=head3 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 subtext +=head3 subtext Extra text to describe this form element or to provide special instructions. -=item size +=head3 size The number of characters wide this form element should be. There should be no reason for anyone to specify this. -=item uiLevel +=head3 uiLevel The UI level for this field. See the WebGUI developer's site for details. Defaults to "0". -=back - =cut sub integer { @@ -1340,40 +1272,36 @@ sub integer { Adds a time interval row to this form. -=over - -=item name +=head3 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. -=item label +=head3 label The left column label for this form row. -=item intervalValue +=head3 intervalValue The default value for interval portion of this form element. Defaults to '1'. -=item unitsValue +=head3 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'. -=item extras +=head3 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 subtext +=head3 subtext Extra text to describe this form element or to provide special instructions. -=item uiLevel +=head3 uiLevel The UI level for this field. See the WebGUI developer's site for details. Defaults to "0". -=back - =cut sub interval { @@ -1410,38 +1338,34 @@ sub interval { Constructor. -=over - -=item noTable +=head3 noTable If this is set to "1" then no table elements will be wrapped around each form element. Defaults to "0". -=item action +=head3 action The Action URL for the form information to be submitted to. This defaults to the current page. -=item method +=head3 method The form's submission method. This defaults to "POST" and probably shouldn't be changed. -=item extras +=head3 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: '"name"="myForm" onChange="myForm.submit()"' -=item enctype +=head3 enctype The ecapsulation type for this form. This defaults to "multipart/form-data" and should probably never be changed. -=item tableExtras +=head3 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: '"name"="myForm" class="formTable"' -=back - =cut sub new { @@ -1468,44 +1392,40 @@ sub new { Adds a password row to this form. -=over - -=item name +=head3 name The name field for this form element. -=item label +=head3 label The left column label for this form row. -=item value +=head3 value The default value for this form element. -=item subtext +=head3 subtext Extra text to describe this form element or to provide special instructions. -=item maxlength +=head3 maxlength The maximum number of characters to allow in this form element. Defaults to "35". -=item extras +=head3 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 size +=head3 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. -=item uiLevel +=head3 uiLevel The UI level for this field. See the WebGUI developer's site for details. Defaults to "0". -=back - =cut sub password { @@ -1538,44 +1458,40 @@ sub password { Adds a text row to this form. -=over - -=item name +=head3 name The name field for this form element. -=item label +=head3 label The left column label for this form row. -=item value +=head3 value The default value for this form element. -=item maxlength +=head3 maxlength The maximum number of characters to allow in this form element. -=item extras +=head3 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 subtext +=head3 subtext Extra text to describe this form element or to provide special instructions. -=item size +=head3 size The number of characters wide this form element should be. There should be no reason for anyone to specify this. -=item uiLevel +=head3 uiLevel The UI level for this field. See the WebGUI developer's site for details. Defaults to "0". -=back - =cut sub phone { @@ -1632,40 +1548,36 @@ sub printRowsOnly { Adds a radio button row to this form. -=over - -=item name +=head3 name The name field for this form element. -=item label +=head3 label The left column label for this form row. -=item checked +=head3 checked If you'd like this radio button to be defaultly checked, set this to "1". -=item value +=head3 value The default value for this form element. -=item subtext +=head3 subtext Extra text to describe this form element or to provide special instructions. -=item extras +=head3 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 +=head3 uiLevel The UI level for this field. See the WebGUI developer's site for details. Defaults to "0". -=back - =cut sub radio { @@ -1699,44 +1611,40 @@ sub radio { Adds a radio button list row to this form. -=over - -=item name +=head3 name The name field for this form element. -=item options +=head3 options The list of options for this list. Should be passed as a hash reference. -=item label +=head3 label The left column label for this form row. -=item value +=head3 value The default value for this form element. Should be passed as a scalar. -=item vertical +=head3 vertical If set to "1" the radio button elements will be laid out horizontally. Defaults to "0". -=item extras +=head3 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 subtext +=head3 subtext Extra text to describe this form element or to provide special instructions. -=item uiLevel +=head3 uiLevel The UI level for this field. See the WebGUI developer's site for details. Defaults to "0". -=back - =cut sub radioList { @@ -1770,14 +1678,10 @@ sub radioList { 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 +=head3 uiLevel The UI level for this field. See the WebGUI developer's site for details. Defaults to "0". -=back - =cut sub raw { @@ -1796,26 +1700,22 @@ sub raw { 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 +=head3 value The read only value. -=item label +=head3 label The left column label for this form row. -=item subtext +=head3 subtext Extra text to describe this form element or to provide special instructions. -=item uiLevel +=head3 uiLevel The UI level for this field. See the WebGUI developer's site for details. Defaults to "0". -=back - =cut sub readOnly { @@ -1844,52 +1744,48 @@ sub select { Adds a select list row to this form. -=over - -=item name +=head3 name The name field for this form element. -=item options +=head3 options The list of options for this select list. Should be passed as a hash reference. -=item label +=head3 label The left column label for this form row. -=item value +=head3 value The default value(s) for this form element. This should be passed as an array reference. -=item size +=head3 size The number of characters tall this form element should be. Defaults to "1". -=item multiple +=head3 multiple A boolean value for whether this select list should allow multiple selections. Defaults to "0". -=item extras +=head3 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 subtext +=head3 subtext Extra text to describe this form element or to provide special instructions. -=item uiLevel +=head3 uiLevel The UI level for this field. See the WebGUI developer's site for details. Defaults to "0". -=item sortByValue +=head3 sortByValue A boolean value for whether the values in the options hash should be sorted. -=back - =cut sub selectList { @@ -1925,28 +1821,24 @@ sub selectList { Adds a submit button row to this form. -=over - -=item value +=head3 value The button text for this submit button. Defaults to "save". -=item label +=head3 label The left column label for this form row. -=item extras +=head3 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 subtext +=head3 subtext Extra text to describe this form element or to provide special instructions. -=back - =cut sub submit { @@ -1968,40 +1860,36 @@ sub submit { Adds a template select list to the form. -=over - -=item name +=head3 name The name of this form element. -=item value +=head3 value The default value for this form element. -=item label +=head3 label The left column label for this form row. -=item namespace +=head3 namespace The namespace (or type) of templates to show in this list. Defaults to "Page". -=item afterEdit +=head3 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 +=head3 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 +=head3 uiLevel The UI level for this field. See the WebGUI developer's site for details. Defaults to "0". -=back - =cut sub template { @@ -2040,44 +1928,40 @@ sub template { Adds a text row to this form. -=over - -=item name +=head3 name The name field for this form element. -=item label +=head3 label The left column label for this form row. -=item value +=head3 value The default value for this form element. -=item maxlength +=head3 maxlength The maximum number of characters to allow in this form element. -=item extras +=head3 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 subtext +=head3 subtext Extra text to describe this form element or to provide special instructions. -=item size +=head3 size The number of characters wide this form element should be. There should be no reason for anyone to specify this. -=item uiLevel +=head3 uiLevel The UI level for this field. See the WebGUI developer's site for details. Defaults to "0". -=back - =cut sub text { @@ -2110,48 +1994,44 @@ sub text { Adds a text area row to this form. -=over - -=item name +=head3 name The name field for this form element. -=item label +=head3 label The left column label for this form row. -=item value +=head3 value The default value for this form element. -=item subtext +=head3 subtext Extra text to describe this form element or to provide special instructions. -=item extras +=head3 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 wrap +=head3 wrap The method for wrapping text in the text area. Defaults to "virtual". There should be almost no reason to specify this. -=item rows +=head3 rows The number of characters tall this form element should be. There should be no reason for anyone to specify this. -=item columns +=head3 columns The number of characters wide this form element should be. There should be no reason for anyone to specify this. -=item uiLevel +=head3 uiLevel The UI level for this field. See the WebGUI developer's site for details. Defaults to "0". -=back - =cut sub textarea { @@ -2185,40 +2065,36 @@ sub textarea { Adds a date row to this form. -=over - -=item name +=head3 name The name field for this form element. -=item label +=head3 label The left column label for this form row. -=item value +=head3 value The default time. Pass as a number of seconds. Defaults to 0. -=item extras +=head3 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 subtext +=head3 subtext Extra text to describe this form element or to provide special instructions. -=item size +=head3 size The number of characters wide this form element should be. There should be no reason for anyone to specify this. -=item uiLevel +=head3 uiLevel The UI level for this field. See the WebGUI developer's site for details. Defaults to "0". -=back - =cut sub timeField { @@ -2251,44 +2127,40 @@ sub timeField { Adds a URL row to this form. -=over - -=item name +=head3 name The name field for this form element. -=item label +=head3 label The left column label for this form row. -=item value +=head3 value The default value for this form element. -=item maxlength +=head3 maxlength The maximum number of characters to allow in this form element. Defaults to 2048. -=item extras +=head3 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 subtext +=head3 subtext Extra text to describe this form element or to provide special instructions. -=item size +=head3 size The number of characters wide this form element should be. There should be no reason for anyone to specify this. -=item uiLevel +=head3 uiLevel The UI level for this field. See the WebGUI developer's site for details. Defaults to "0". -=back - =cut sub url { @@ -2321,40 +2193,36 @@ sub url { Adds a "What next?" select list to this form for use with chained action forms in WebGUI. -=over - -=item options +=head3 options A hash reference of the possible actions that could happen next. -=item value +=head3 value The selected element in this list. -=item name +=head3 name The name field for this form element. Defaults to "proceed". -=item label +=head3 label The left column label for this form row. -=item subtext +=head3 subtext Extra text to describe this form element or to provide special instructions. -=item uiLevel +=head3 uiLevel The UI level for this field. See the WebGUI developer's site for details. Defaults to "1". -=item extras +=head3 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()"' -=back - =cut sub whatNext { @@ -2388,36 +2256,32 @@ sub whatNext { Adds a yes/no radio menu to this form. -=over - -=item name +=head3 name The name field for this form element. -=item label +=head3 label The left column label for this form row. -=item value +=head3 value The default value(s) for this form element. Valid values are "1" and "0". Defaults to "1". -=item extras +=head3 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 subtext +=head3 subtext Extra text to describe this form element or to provide special instructions. -=item uiLevel +=head3 uiLevel The UI level for this field. See the WebGUI developer's site for details. Defaults to "0". -=back - =cut sub yesNo { @@ -2449,44 +2313,40 @@ sub yesNo { Adds a zip code row to this form. -=over - -=item name +=head3 name The name field for this form element. -=item label +=head3 label The left column label for this form row. -=item value +=head3 value The default value for this form element. -=item maxlength +=head3 maxlength The maximum number of characters to allow in this form element. -=item extras +=head3 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 subtext +=head3 subtext Extra text to describe this form element or to provide special instructions. -=item size +=head3 size The number of characters wide this form element should be. There should be no reason for anyone to specify this. -=item uiLevel +=head3 uiLevel The UI level for this field. See the WebGUI developer's site for details. Defaults to "0". -=back - =cut sub zipcode { diff --git a/lib/WebGUI/HTTP.pm b/lib/WebGUI/HTTP.pm index 47e068d24..0929ab6c7 100644 --- a/lib/WebGUI/HTTP.pm +++ b/lib/WebGUI/HTTP.pm @@ -115,22 +115,18 @@ sub getStatus { Sends a cookie to the browser. -=over - -=item name +=head3 name 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 +=head3 value The value to set. -=item timeToLive +=head3 timeToLive The time that the cookie should remain in the browser. Defaults to "+10y" (10 years from now). -=back - =cut sub setCookie { @@ -152,18 +148,14 @@ sub setCookie { Override the default filename for the document, which is usually the page url. Usually used with setMimeType(). -=over - -=item filename +=head3 filename The filename to set. -=item mimetype +=head3 mimetype The mimetype for this file. Defaults to "application/octet-stream". -=back - =cut sub setFilename { @@ -180,16 +172,12 @@ sub setFilename { Override mime type for the document, which is defaultly "text/html". Also see setFilename(). -NOTE: By setting the mime type to something other than "text/html" WebGUI will automatically not process the normal page contents. Instead it will return only the content of your Wobject function or Operation. +B By setting the mime type to something other than "text/html" WebGUI will automatically not process the normal page contents. Instead it will return only the content of your Wobject function or Operation. -=over - -=item mimetype +=head3 mimetype The mime type for the document. -=back - =cut sub setMimeType { @@ -203,14 +191,10 @@ sub setMimeType { Disables the printing of a HTTP header. Useful in situations when content is not returned to a browser (export to disk for example). -=over - -=item boolean +=head3 boolean Any value other than 0 will disable header printing. -=back - =cut sub setNoHeader { @@ -223,14 +207,10 @@ sub setNoHeader { Sets the necessary information in the HTTP header to redirect to another URL. -=over - -=item url +=head3 url The URL to redirect to. -=back - =cut sub setRedirect { @@ -245,14 +225,10 @@ sub setRedirect { Sets the HTTP status code. -=over - -=item status +=head3 status An HTTP status code. It takes the form of "NNN Message" where NNN is a 3 digit status number and Message is some text explaining the status number. -=back - =cut sub setStatus { diff --git a/lib/WebGUI/Icon.pm b/lib/WebGUI/Icon.pm index a35c5122a..94e120cef 100644 --- a/lib/WebGUI/Icon.pm +++ b/lib/WebGUI/Icon.pm @@ -89,18 +89,14 @@ sub _getBaseURL { Generates a button with the word "Copy" printed on it. -=over - -=item urlParameters +=head3 urlParameters Any URL parameters that need to be tacked on to the current URL to accomplish whatever function this button represents. -=item pageURL +=head3 pageURL The URL to any page. Defaults to the current page. -=back - =cut sub copyIcon { @@ -117,18 +113,14 @@ sub copyIcon { Generates a button with the word "Cut" printed on it. -=over - -=item urlParameters +=head3 urlParameters Any URL parameters that need to be tacked on to the current URL to accomplish whatever function this button represents. -=item pageURL +=head3 pageURL The URL to any page. Defaults to the current page. -=back - =cut sub cutIcon { @@ -145,18 +137,14 @@ sub cutIcon { Generates a button that represents a delete operation. -=over - -=item urlParameters +=head3 urlParameters Any URL parameters that need to be tacked on to the current URL to accomplish whatever function this button represents. -=item pageURL +=head3 pageURL The URL to any page. Defaults to the current page. -=back - =cut sub deleteIcon { @@ -185,18 +173,14 @@ sub dragIcon { Generates a button with the word "Edit" printed on it. -=over - -=item urlParameters +=head3 urlParameters Any URL parameters that need to be tacked on to the current URL to accomplish whatever function this button represents. -=item pageURL +=head3 pageURL The URL to any page. Defaults to the current page. -=back - =cut sub editIcon { @@ -213,18 +197,14 @@ sub editIcon { Generates an export button. -=over - -=item urlParameters +=head3 urlParameters Any URL parameters that need to be tacked on to the current URL to accomplish whatever function this button represents. -=item pageURL +=head3 pageURL The URL to any page. Defaults to the current page. -=back - =cut sub exportIcon { @@ -266,18 +246,14 @@ sub getToolbarOptions { Generates a button with the word "Help" printed on it. -=over - -=item helpId +=head3 helpId The id in the help table that relates to the help documentation for your function. -=item namespace +=head3 namespace If your help documentation is not in the WebGUI namespace, then you must specify the namespace for this help. -=back - =cut sub helpIcon { @@ -294,18 +270,14 @@ sub helpIcon { Generates a button that represents a management function. -=over - -=item urlParameters +=head3 urlParameters Any URL parameters that need to be tacked on to the current URL to accomplish whatever function this button represents. -=item pageURL +=head3 pageURL The URL to any page. Defaults to the current page. -=back - =cut sub manageIcon { @@ -322,18 +294,14 @@ sub manageIcon { Generates a button with a double down arrow printed on it. -=over - -=item urlParameters +=head3 urlParameters Any URL parameters that need to be tacked on to the current URL to accomplish whatever function this button represents. -=item pageURL +=head3 pageURL The URL to any page. Defaults to the current page. -=back - =cut sub moveBottomIcon { @@ -350,18 +318,14 @@ sub moveBottomIcon { Generates a button with a down arrow printed on it. -=over - -=item urlParameters +=head3 urlParameters Any URL parameters that need to be tacked on to the current URL to accomplish whatever function this button represents. -=item pageURL +=head3 pageURL The URL to any page. Defaults to the current page. -=back - =cut sub moveDownIcon { @@ -378,18 +342,14 @@ sub moveDownIcon { Generates a button with a left arrow printed on it. -=over - -=item urlParameters +=head3 urlParameters Any URL parameters that need to be tacked on to the current URL to accomplish whatever function this button represents. -=item pageURL +=head3 pageURL The URL to any page. Defaults to the current page. -=back - =cut sub moveLeftIcon { @@ -406,18 +366,14 @@ sub moveLeftIcon { Generates a button with a right arrow printed on it. -=over - -=item urlParameters +=head3 urlParameters Any URL parameters that need to be tacked on to the current URL to accomplish whatever function this button represents. -=item pageURL +=head3 pageURL The URL to any page. Defaults to the current page. -=back - =cut sub moveRightIcon { @@ -434,18 +390,14 @@ sub moveRightIcon { Generates a button with a double up arrow printed on it. -=over - -=item urlParameters +=head3 urlParameters Any URL parameters that need to be tacked on to the current URL to accomplish whatever function this button represents. -=item pageURL +=head3 pageURL The URL to any page. Defaults to the current page. -=back - =cut sub moveTopIcon { @@ -462,18 +414,14 @@ sub moveTopIcon { Generates a button with an up arrow printed on it. -=over - -=item urlParameters +=head3 urlParameters Any URL parameters that need to be tacked on to the current URL to accomplish whatever function this button represents. -=item pageURL +=head3 pageURL The URL to any page. Defaults to the current page. -=back - =cut sub moveUpIcon { @@ -502,18 +450,14 @@ sub pageIcon { Generates a button with the word "Paste" printed on it. -=over - -=item urlParameters +=head3 urlParameters Any URL parameters that need to be tacked on to the current URL to accomplish whatever function this button represents. -=item pageURL +=head3 pageURL The URL to any page. Defaults to the current page. -=back - =cut sub pasteIcon { @@ -530,18 +474,14 @@ sub pasteIcon { Generates a button with a shortcut symbol printed on it, similar to the shortcut icon in Microsoft Windows or the link Icon in Gnome. -=over - -=item urlParameters +=head3 urlParameters Any URL parameters that need to be tacked on to the current URL to accomplish whatever function this button represents. -=item pageURL +=head3 pageURL The URL to any page. Defaults to the current page. -=back - =cut sub shortcutIcon { @@ -558,18 +498,14 @@ sub shortcutIcon { Generates a button with the word "View" printed on it. -=over - -=item urlParameters +=head3 urlParameters Any URL parameters that need to be tacked on to the current URL to accomplish whatever function this button represents. -=item pageURL +=head3 pageURL The URL to any page. Defaults to the current page. -=back - =cut sub viewIcon { diff --git a/lib/WebGUI/Id.pm b/lib/WebGUI/Id.pm index 1838fc970..88d2c0983 100644 --- a/lib/WebGUI/Id.pm +++ b/lib/WebGUI/Id.pm @@ -31,7 +31,7 @@ Package WebGUI::Id This package generates global unique ids, sometimes called GUIDs. A global unique ID is guaranteed to be unique everywhere and at everytime. -NOTE: There is no such thing as perfectly unique ID's, but the chances of a duplicate ID are so minute that they are effectively unique. +B There is no such thing as perfectly unique ID's, but the chances of a duplicate ID are so minute that they are effectively unique. =head1 SYNOPSIS diff --git a/lib/WebGUI/International.pm b/lib/WebGUI/International.pm index 54bebad23..5b6850f49 100644 --- a/lib/WebGUI/International.pm +++ b/lib/WebGUI/International.pm @@ -53,22 +53,18 @@ These functions/methods are available from this package: 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 +=head3 internationalId An integer that relates to a message in the international table in the WebGUI database. -=item namespace +=head3 namespace A string that relates to the namespace field in the international table in the WebGUI database. Defaults to 'WebGUI'. -=item languageId +=head3 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). -=back - =cut sub get { @@ -100,18 +96,14 @@ sub get { Returns a hash reference to a particular language's properties. -=over - -=item languageId +=head3 languageId Defaults to "English". The language to retrieve the properties for. -=item propertyName +=head3 propertyName If this is specified, only the value of the property will be returned, instead of the hash reference to all properties. The valid values are "charset", "toolbar", and "label". -=back - =cut sub getLanguage { @@ -165,18 +157,14 @@ sub getLanguages { The constructor for the International function if using it in OO mode. -=over - -=item namespace +=head3 namespace Specify a default namespace. Defaults to "WebGUI". -=item languageId +=head3 languageId Specify a default language. Defaults to user preference. -=back - =cut sub new { diff --git a/lib/WebGUI/Macro.pm b/lib/WebGUI/Macro.pm index 54a43de93..dbc35aa73 100644 --- a/lib/WebGUI/Macro.pm +++ b/lib/WebGUI/Macro.pm @@ -28,7 +28,7 @@ Package WebGUI::Macro 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. +B 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 SYNOPSIS @@ -71,14 +71,10 @@ $nestedMacro = qr /(\^ # Start with carat Removes all the macros from the HTML segment. -=over - -=item html +=head3 html The segment to be filtered. -=back - =cut sub filter { @@ -96,14 +92,10 @@ sub filter { A simple, but error prone mechanism for getting a prameter list from a string. Returns an array of parameters. -=over - -=item parameterString +=head3 parameterString A string containing a comma separated list of paramenters. -=back - =cut sub getParams { @@ -124,14 +116,10 @@ sub getParams { Nullifies all macros in this content segment. -=over - -=item html +=head3 html A string of HTML to be processed. -=back - =cut sub negate { @@ -147,14 +135,10 @@ sub negate { Runs all the WebGUI macros to and replaces them in the HTML with their output. -=over - -=item html +=head3 html A string of HTML to be processed. -=back - =cut sub process { diff --git a/lib/WebGUI/Mail.pm b/lib/WebGUI/Mail.pm index 3fcdf3b98..059259af5 100644 --- a/lib/WebGUI/Mail.pm +++ b/lib/WebGUI/Mail.pm @@ -48,34 +48,30 @@ These methods are available from this class: Sends an SMTP email message to the specified user. -=over - -=item to +=head3 to An email address for the TO line. -=item subject +=head3 subject The subject line for the email. -=item message +=head3 message The message body for the email. -=item cc +=head3 cc The email address for the CC line. -=item from +=head3 from The email address for the FROM line. Defaults to the email address specified in the Company Settings. -=item bcc +=head3 bcc The email address for the BCC line. -=back - =cut sub send { diff --git a/lib/WebGUI/MessageLog.pm b/lib/WebGUI/MessageLog.pm index 578934b04..caf57418c 100644 --- a/lib/WebGUI/MessageLog.pm +++ b/lib/WebGUI/MessageLog.pm @@ -79,42 +79,38 @@ sub _notify { Adds an entry to the message log and sends out notification to users. -=over - -=item userId +=head3 userId The id of the user that should receive this notification. -NOTE: This can be left blank if you're specifying a groupId. +B This can be left blank if you're specifying a groupId. -=item groupId +=head3 groupId The id of the group that should receive this notification. -NOTE: This can be left blank if you're specifying a userId. +B This can be left blank if you're specifying a userId. -=item subject +=head3 subject The subject of the notification. -=item message +=head3 message The content of the notification. -=item url +=head3 url The URL of any action that should be taken based upon this notification (if any). -=item status +=head3 status Defaults to 'notice'. Can be 'pending', 'notice', or 'completed'. -=item from +=head3 from The addressee email address. Defaults to company email. -=back - =cut sub addEntry { @@ -151,38 +147,34 @@ sub addEntry { Adds an entry to the message log using a translated message from the internationalization system and sends out notifications to users. -=over - -=item userId +=head3 userId The id of the user that should receive this notification. -NOTE: This can be left blank if you're specifying a groupId. +B This can be left blank if you're specifying a groupId. -=item groupId +=head3 groupId The id of the group that should receive this notification. -NOTE: This can be left blank if you're specifying a userId. +B This can be left blank if you're specifying a userId. -=item url +=head3 url The URL of any action that should be taken based upon this notification (if any). -=item internationalId +=head3 internationalId The unique identifier from the internationalization system of the message to send. -=item namespace +=head3 namespace The namespace from the internationalization system of the message to send. Defaults to "WebGUI"; -=item status +=head3 status Defaults to 'notice'. Can be 'pending', 'notice', or 'completed'. -=back - =cut sub addInternationalizedEntry { @@ -226,14 +218,10 @@ sub addInternationalizedEntry { Set a message log entry to complete. -=over - -=item messageLogId +=head3 messageLogId The id of the message to complete. -=back - =cut sub completeEntry { diff --git a/lib/WebGUI/MetaData.pm b/lib/WebGUI/MetaData.pm index b19625845..f87e53f24 100644 --- a/lib/WebGUI/MetaData.pm +++ b/lib/WebGUI/MetaData.pm @@ -70,14 +70,10 @@ sub getFieldTypes { Deletes a field from the metadata system. -=over - -=item fieldId +=head3 fieldId The fieldId to be deleted. -=back - =cut sub deleteField { @@ -94,19 +90,15 @@ sub deleteField { Returns a hash reference containing metadata field properties for a single field. -=over - -=item fieldId +=head3 fieldId The fieldId for which you want to retrieve field properties. -=item wobjectId +=head3 wobjectId If specified, the method will not only get the field properties, but the value for this wobjectId as well. -=back - =cut sub getField { @@ -129,19 +121,15 @@ If a wobjectId is specified, the metadata values for that wobject are included as well. You can limit the output to a certain field by specifying a fieldId. -=over - -=item wobjectId +=head3 wobjectId If specified, the hashRef will contain the metadata values for this wobject. -=item fieldId +=head3 fieldId If specified, the hashRef will contain only this field. -=back - =cut sub getMetaDataFields { @@ -176,14 +164,10 @@ sub getMetaDataFields { Saves posted metadata for requested wobjectId -=over - -=item wobjectId +=head3 wobjectId The Id from the wobject you want to save metadata for. -=back - =cut sub metaDataSave { @@ -217,14 +201,10 @@ sub metaDataSave { Deletes the metadata for requested wobjectId -=over - -=item wobjectId +=head3 wobjectId The Id from the wobject you want to delete metadata for. -=back - =cut sub metaDataDelete { @@ -238,18 +218,14 @@ sub metaDataDelete { Duplicates Metadata -=over - -=item fromWobjectId +=head3 fromWobjectId The original wobject Id -=item toWobjectId +=head3 toWobjectId The new wobject Id -=back - =cut sub MetaDataDuplicate { @@ -271,9 +247,7 @@ sub MetaDataDuplicate { This function will search for a wobject that match a metadata criteria set. If no wobject is found, undef will be returned. -=over - -=item hashRef +=head3 hashRef A typical hashRef for this function will look like: @@ -287,8 +261,6 @@ Most of the time this will be a: WebGUI::SQL->quickHashRef("select * from WobjectProxy where wobjectId=$proxiedId"); -=back - =cut sub getWobjectByCriteria { diff --git a/lib/WebGUI/Navigation.pm b/lib/WebGUI/Navigation.pm index de573302c..ebcae09d5 100644 --- a/lib/WebGUI/Navigation.pm +++ b/lib/WebGUI/Navigation.pm @@ -387,15 +387,11 @@ If no identifier is specified, the class identifier will be used. This routine can be called both as a method or as a function. -=over - -=item identifier +=head3 identifier The configuration to use. Config is stored in the table Navigation in the database. -=back - =cut sub getConfig { @@ -441,14 +437,12 @@ sub getMethodNames { Constructor. -=over - -=item identifier +=head3 identifier The configuration to use. Config is stored in the table Navigation in the database. -=item options +=head3 options Instead of using an existing configuration, you can also drop in your own parameters of the form: option => value. @@ -460,8 +454,6 @@ $custom = WebGUI::Navigation->new( template=>'
' ); -=back - =cut sub new { diff --git a/lib/WebGUI/Node.pm b/lib/WebGUI/Node.pm index e9f5c5d56..04190d950 100644 --- a/lib/WebGUI/Node.pm +++ b/lib/WebGUI/Node.pm @@ -150,18 +150,14 @@ sub getURL { Constructor. -=over - -=item node1 +=head3 node1 The first level of the hash heirarchy. -=item node2 +=head3 node2 The second level of the hash heirarchy. -=back - =cut sub new { @@ -175,22 +171,18 @@ sub new { Archives this node into a tar file and then compresses it with a zlib algorithm. -=over - -=item filename +=head3 filename The name of the tar file to be created. Should ideally end with ".tar.gz". -=item node1 +=head3 node1 The node where you would like to create this tar file. Defaults to "temp". -=item node2 +=head3 node2 If you need a second level node to store the file, then specify it here. -=back - =cut sub tar { @@ -217,22 +209,18 @@ sub tar { Unarchives a file into this node. -=over - -=item filename +=head3 filename The name of the tar file to be untarred. -=item node1 +=head3 node1 The node where the tar file exists. Defaults to "temp". -=item node2 +=head3 node2 If the file exists in a sub-node, then specifiy it here. -=back - =cut sub untar { diff --git a/lib/WebGUI/Operation/Page.pm b/lib/WebGUI/Operation/Page.pm index a2e72ae03..174efaa99 100644 --- a/lib/WebGUI/Operation/Page.pm +++ b/lib/WebGUI/Operation/Page.pm @@ -69,14 +69,10 @@ sub _changeWobjectPrivileges { This private function set an entire subtree with $page as root to the same privilege and/or style settings. These properties are set to be a duplicate of those in page. -=over - -=item page +=head3 page This is the page whose ancestors should be changed. This must be an WebGUI::Page instance. -=back - =cut # This combines _recusivelyChangePrivileges and _recusivelyChangeStyle, since there's no use in walking down a tree twice. sub _recursivelyChangeProperties { @@ -179,18 +175,14 @@ sub _selectPositions { Walks down the page tree from page with id pageId and returns an indented list of the pages it walks over. Also prints edit/delete/move buttons. -=item pageId +=head3 pageId The id of the page you want to start from -=item initialDepth +=head3 initialDepth The depth the tree should start with. Defaults to zero. -=over - -=back - =cut sub _traversePageTree { my (%wobject, $output, $spacer, $page, $currentPage, $options, $currentPageId, $currentUrlizedTitle, $wobjects); @@ -232,8 +224,6 @@ sub _traversePageTree { This will cut the page defined by $session{page}{pageId} (ie. the current page) and all it's children from the pagetree and place it on the clipboard. -=back - =cut sub www_cutPage { my ($page); @@ -256,8 +246,6 @@ sub www_cutPage { This function returns an 'Are you sure' page for moving the page to the trash. -=back - =cut sub www_deletePage { my ($output); @@ -282,8 +270,6 @@ sub www_deletePage { Actually transfers the page to the trash. -=back - =cut sub www_deletePageConfirm { if ($session{page}{isSystem}) { @@ -303,8 +289,6 @@ sub www_deletePageConfirm { Displays the properties for a page. -=back - =cut sub www_editPage { my ($f, $endDate, $output, $subtext, $childCount, %hash, %page); @@ -550,8 +534,6 @@ sub www_editPage { Stores the data from www_editPage to the database and tree cache. -=back - =cut sub www_editPageSave { my ($pageId, $currentPage, $page); @@ -619,8 +601,6 @@ sub www_editPageSave { Displays the export page administrative interface -=back - =cut sub www_exportPage { @@ -672,8 +652,6 @@ sub www_exportPage { Displays the export status page -=back - =cut @@ -705,8 +683,6 @@ sub www_exportPageStatus { Executes the export process and displays real time status. This operation is displayed by exportPageStatus in an IFRAME. -=back - =cut @@ -800,8 +776,6 @@ sub _checkExportPath { Moves page down in the context of it's sisters. -=back - =cut sub www_movePageDown { if (WebGUI::Page::canEdit($session{page}{pageId})) { @@ -818,8 +792,6 @@ sub www_movePageDown { Moves page up in the context of it's sisters. -=back - =cut sub www_movePageUp { if (WebGUI::Page::canEdit($session{page}{pageId})) { @@ -836,8 +808,6 @@ sub www_movePageUp { Same as www_movePageUp wit this difference that this module returns the www_viewPageTree method. -=back - =cut sub www_moveTreePageUp { if (WebGUI::Page::canEdit($session{form}{pageId})) { @@ -853,8 +823,6 @@ sub www_moveTreePageUp { Same as www_movePageDown with this difference that this module returns the www_viewPageTree method. -=back - =cut sub www_moveTreePageDown { if (WebGUI::Page::canEdit($session{form}{pageId})) { @@ -871,8 +839,6 @@ sub www_moveTreePageDown { Move the page one level left in the tree. In other words, the page is moved up one place in the hierarchy. Another way to look at is that the mother of the current page becomes the elder sister of the current page. -=back - =cut sub www_moveTreePageLeft { if (WebGUI::Page::canEdit($session{form}{pageId})) { @@ -935,8 +901,6 @@ sub www_rearrangeWobjects { Returns a HTML formatted indented pagetree complete with edit/delete/cut/move buttons -=back - =cut sub www_viewPageTree { my ($output); diff --git a/lib/WebGUI/Operation/Profile.pm b/lib/WebGUI/Operation/Profile.pm index 908f85cb8..72b8dcab6 100644 --- a/lib/WebGUI/Operation/Profile.pm +++ b/lib/WebGUI/Operation/Profile.pm @@ -86,14 +86,10 @@ sub getRequiredProfileFields { Checks the value of the email address passed in to see if it is duplicated in the system. Returns true of false. Will return false if the email address passed in is same as the email address of the current user. -=over - -=item email +=head3 email email address to check for duplication -=back - =cut sub isDuplicateEmail { diff --git a/lib/WebGUI/Page.pm b/lib/WebGUI/Page.pm index 491f43d89..ea47552f5 100644 --- a/lib/WebGUI/Page.pm +++ b/lib/WebGUI/Page.pm @@ -193,14 +193,10 @@ sub _processWobjectFunctions { Adds page to the right of the children of the object this method is invoked on. Returns the new page object. -=over - -=item page +=head3 page A WebGUI::Page instance to be added to the children of the current object. -=back - =cut sub add { @@ -242,14 +238,10 @@ sub ancestors { Returns a boolean (0|1) value signifying that the user has the required privileges. -=over - -=item pageId +=head3 pageId The unique identifier for the page that you wish to check the privileges on. Defaults to the current page id. -=back - =cut sub canEdit { @@ -336,14 +328,10 @@ sub canMoveUp { Returns a boolean (0|1) value signifying that the user has the required privileges. Always returns users that have the rights to edit this page. -=over - -=item pageId +=head3 pageId The unique identifier for the page that you wish to check the privileges on. Defaults to the current page id. -=back - =cut sub canView { @@ -370,14 +358,10 @@ sub canView { Returns the number of template positions in the specified page template. -=over - -=item templateId +=head3 templateId The id of the page template you wish to count. -=back - =cut sub countTemplatePositions { @@ -440,14 +424,10 @@ sub daughters { Deletes the cached version of a specified page. Note that this is something else than the cached page tree. This funtion should be invoked in a non-OO context; -=over - -=item pageId +=head3 pageId The id of the page to decache. Defaults to the current page id. -=back - =cut sub deCache { @@ -506,14 +486,10 @@ sub descendants { Returns an HTML string containing a small representation of the page template. -=over - -=item templateId +=head3 templateId The id of the page template you wish to draw. -=back - =cut sub drawTemplate { @@ -662,14 +638,10 @@ sub generation { Returns a hash reference of all the page properties. -=over - -=item property +=head3 property Returns a scalar containing the value of the specififed proeprty. -=back - =cut sub get { @@ -704,15 +676,11 @@ sub getAnonymousRoot { Return the first (leftmost) daughter of the current node when called in instance context, returns the first daughter of 'pageId' when called in class context. -=over - -=item pageId +=head3 pageId Only required if called in class context. The pageId of the page of which you want the daughter of. Defaults to the current page. -=back - =cut sub getFirstDaughter { @@ -737,15 +705,11 @@ sub getFirstDaughter { Returns the grandmother of the current node, or, when called in class context, the garndmother of 'pageId'. -=over - -=item pageId +=head3 pageId Only required if called in class context. The pageId of the page of which you want the grandmother of. Defaults to the current page. -=back - =cut sub getGrandmother { @@ -769,15 +733,11 @@ sub getGrandmother { Returns the left sister of the current node, or, when called in class context, the left sister of 'pageId'. -=over - -=item pageId +=head3 pageId Only required if called in class context. The pageId of the page of which you want the left sister of. Defaults to the current page. -=back - =cut sub getLeftSister { @@ -800,15 +760,11 @@ sub getLeftSister { Returns the mother of the current node, or, when called in class context, the left sister of 'pageId'. -=over - -=item pageId +=head3 pageId Only required if called in class context. The pageId of the page of which you want the mother of. Defaults to the current page. -=back - =cut @@ -832,14 +788,10 @@ sub getMother { Returns the page identified by 'pageId'. -=over - -=item pageId +=head3 pageId The pageId of the page you want. Defaults to the current page. -=back - =cut sub getPage { @@ -857,15 +809,11 @@ sub getPage { Returns the right sister of the current node, or, when called in class context, the right sister of 'pageId'. -=over - -=item pageId +=head3 pageId Only required if called in class context. The pageId of the page of which you want the right sister of. Defaults to the current page. -=back - =cut @@ -889,15 +837,11 @@ sub getRightSister { Returns the top page (child of a WebGUI root, depth = 1) of the current node, or, when called in class context, the top of 'pageId'. -=over - -=item pageId +=head3 pageId Only required if called in class context. The pageId of the page of which you want the top page of. Defaults to the current page. -=back - =cut @@ -936,14 +880,10 @@ sub getTemplateList { Returns an HTML template. -=over - -=item templateId +=head3 templateId The id of the page template you wish to retrieve. Defaults to the current page's template id. -=back - =cut sub getTemplate { @@ -958,14 +898,10 @@ sub getTemplate { Returns a hash reference containing the positions available in the specified page template. -=over - -=item templateId +=head3 templateId The id of the page template you wish to retrieve the positions from. -=back - =cut sub getTemplatePositions { @@ -984,15 +920,11 @@ sub getTemplatePositions { Returns the WebGUI root (depth = 0) of the current node, or, when called in class context, the WebGUI root of 'pageId'. -=over - -=item pageId +=head3 pageId Only required if called in class context. The pageId of the page of which you want the WebGUI root of. Defaults to the current page. -=back - =cut sub getWebGUIRoot { @@ -1061,18 +993,14 @@ sub leaves_under { Returns a unique page URL. -=over - -=item url +=head3 url The URL you're hoping for. -=item pageId +=head3 pageId The page id of the page you're creating a URL for. -=back - =cut sub makeUnique { @@ -1103,14 +1031,10 @@ sub makeUnique { Moves a page to another page (ie. makes the page you execute this method on a child of newMother). Returns 1 if the move was succesfull, 0 otherwise. -=over - -=item newMother +=head3 newMother The page under which the current page should be moved. This should be an WebGUI::Page object. -=back - =cut sub move{ @@ -1324,14 +1248,10 @@ containing page properties. You can use the latter if you already have page prop something like it for example), and save a (redundant) database query. You can of course also use it to fool the system with dummy pages and do all kinds of magic that I can't imagine with it. -=over - -=item pageId || { properties } +=head3 pageId || { properties } You can pass either a pageId or a properties hashref. See above for an explanation -=back - =cut sub new { @@ -1362,14 +1282,10 @@ sub new { Pastes a page under newMother. -=over - -=item newMother +=head3 newMother The page under which the current page should be pasted. This should be an WebGUI::Page object. -=back - =cut sub paste{ @@ -1581,14 +1497,10 @@ the state of the tree is saved to the database. This method purges the Navigation cache. Note that if you have to save a lot of properties in row, it's better to use setWithoutRecache, and call recacheNavigation manually. This saves some time. -=over - -=item properties +=head3 properties The properties you want to set. This parameter is optional and should be a hashref of the form {propertyA => valueA, propertyB => valueB, etc...} -=back - =cut sub set { @@ -1608,14 +1520,10 @@ sub set { See set. The only difference with set is that the cached version of the pagetree is not updated. This means that you must update it manually by invoking recachePageTree afterwards. -=over - -=item properties +=head3 properties The properties you want to set. This parameter is optional and should be a hashref of the form {propertyA => valueA, propertyB => valueB, etc...} -=back - =cut sub setWithoutRecache { @@ -1639,15 +1547,11 @@ Traverses the tree from this node down in pre-order fashion and excutes (maps) t onto each node. Also maps onto this node except if it is the anonymous root. This has some but very limited compatibility with the callback property of the walk_down method of Tree::DAG_Node. -=over - -=item mappingFunction +=head3 mappingFunction This should be a coderef pointing to your mapping function. The arguments that are passed to this function are a page object and a hashref containing only _depth for now. -=back - =cut sub traversePreOrder { diff --git a/lib/WebGUI/Paginator.pm b/lib/WebGUI/Paginator.pm index 988e3d14e..48cbd6b00 100644 --- a/lib/WebGUI/Paginator.pm +++ b/lib/WebGUI/Paginator.pm @@ -64,14 +64,10 @@ These methods are available from this class: Adds paginator template vars to a hash reference. -=over - -=item hashRef +=head3 hashRef The hash reference to append the variables to. -=back - =cut sub appendTemplateVars { @@ -282,16 +278,12 @@ sub getNumberOfPages { 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. +B This is really only useful if you passed in an array reference of strings when you created this object. -=over - -=item pageNumber +=head3 pageNumber Defaults to the page you're currently viewing. This is mostly here as an override and probably has no real use. -=back - =cut sub getPage { @@ -305,14 +297,10 @@ sub getPage { Returns the data from the page specified as an array reference. -=over - -=item pageNumber +=head3 pageNumber Defaults to the page you're currently viewing. This is mostly here as an override and probably has no real use. -=back - =cut sub getPageData { @@ -348,14 +336,10 @@ sub getPageNumber { Returns links to all pages in this paginator. -=over - -=item limit +=head3 limit An integer representing the maximum number of page links to return. Defaultly all page links will be returned. -=back - =cut sub getPageLinks { @@ -429,26 +413,22 @@ sub getRowCount { Constructor. -=over - -=item currentURL +=head3 currentURL The URL of the current page including attributes. The page number will be appended to this in all links generated by the paginator. -=item paginateAfter +=head3 paginateAfter The number of rows to display per page. If left blank it defaults to 50. -=item pageNumber +=head3 pageNumber By default the page number will be determined by looking at $session{form}{pn}. If that is empty the page number will be defaulted to "1". If you'd like to override the page number specify it here. -=item formVar +=head3 formVar Specify the form variable the paginator should use in it's links. Defaults to "pn". -=back - =cut sub new { @@ -466,14 +446,10 @@ sub new { Provide the paginator with data by giving it an array reference. -=over - -=item arrayRef +=head3 arrayRef The array reference that contains the data to be paginated. -=back - =cut sub setDataByArrayRef { @@ -490,24 +466,20 @@ sub setDataByArrayRef { 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. +B This retrieves only the current page's data for efficiency. -=over - -=item query +=head3 query An SQL query that will retrieve a data set. -=item dbh +=head3 dbh A DBI-style database handler. Defaults to the WebGUI site handler. -=item unconditional +=head3 unconditional A boolean indicating that the query should be read unconditionally. Defaults to "0". If set to "1" and the unconditional read results in an error, the error will be returned by this method. -=back - =cut sub setDataByQuery { diff --git a/lib/WebGUI/PassiveProfiling.pm b/lib/WebGUI/PassiveProfiling.pm index cd84e0146..abf7e4a21 100644 --- a/lib/WebGUI/PassiveProfiling.pm +++ b/lib/WebGUI/PassiveProfiling.pm @@ -47,14 +47,10 @@ These functions/methods are available from this package: Adds a wobjectId to the passive profile log. -=over - -=item wobjectId +=head3 wobjectId The wobjectId to add. -=back - =cut sub add { @@ -77,14 +73,10 @@ sub add { Adds all wobjects on current page to the passive profile log. Optionally you can specify an alternate pageId. -=over - -=item pageId +=head3 pageId The pageId of the page you want to log. -=back - =cut sub addPage { @@ -104,14 +96,10 @@ sub addPage { Summarizes passive profile log data using the metadata attributes. An entry is logged in the passiveProfileAOI table. -=over - -=item hashRef +=head3 hashRef A hashRef with userId and wobjectId. -=back - =cut sub summarizeAOI { diff --git a/lib/WebGUI/Persistent.pm b/lib/WebGUI/Persistent.pm index e53b1866e..8ee8350bd 100644 --- a/lib/WebGUI/Persistent.pm +++ b/lib/WebGUI/Persistent.pm @@ -124,37 +124,29 @@ more of the following keys. } } -=over - -=item properties +=head3 properties This should be a hash reference keyed by the field names of the table that this class refers to (and should be able to be manipulated with this classes get() and set() methods). The values of the hash reference should be hash references containing settings for each field. -=over - -=item * defaultValue +=head3 * defaultValue The default value for this field (optional). -=item * key +=head3 * key Should be true for the primary key column (one field must be set in this way). -=item * quote +=head3 * quote Should be true for fields that need to be quoted in database queries. -=back - -=item table +=head3 table This must be set to the name of the table that this class represents. -=back - =cut sub classSettings { @@ -255,14 +247,10 @@ sub minimumFields { =head2 multiDelete( -where => @whereClauses, %p ) -=over - -=item -where +=head3 -where See multiNew(). -=back - =cut sub multiDelete { @@ -290,9 +278,7 @@ Unrecognised parameters are combined to form the where clause: Additional, more complicated parameters maybe passed using the -where option. -=over - -=item -where +=head3 -where If provided -where must be an array reference, which is evaluated to generate an Sql where clause using the properties in classSettings. Any left over named @@ -307,18 +293,16 @@ Evaluates to: A in (1,2) AND (B = 3 OR C = 'hello') AND D = (B * 3) -=item -fields +=head3 -fields This maybe an array reference of fields to be selected from the database, otherwise, all fields in properties are selected unless the -minimumFields option is true. -=item -minimumFields +=head3 -minimumFields If true the minimum fields are selected from the database. -=back - =cut sub multiNew { @@ -347,33 +331,29 @@ sub multiNew { =head2 new -=over - -=item -properties +=head3 -properties If a hash reference of property names to values is provided to this method, then the database is not queried. This is mainly used for creating new rows by calling set afterwards (if not specified the value of the key column is set to 'new', so that when set() is called, and insert takes place). -=item -where +=head3 -where See multiNew(). -=item -fields +=head3 -fields See multiNew(). -=item -minimumFields +=head3 -minimumFields See multiNew(). -=item -noSet +=head3 -noSet If true this stops the set() method from doing writing to the database. -=back - =cut sub new { diff --git a/lib/WebGUI/Persistent/Query.pm b/lib/WebGUI/Persistent/Query.pm index c1d48bfe1..ef5846f38 100644 --- a/lib/WebGUI/Persistent/Query.pm +++ b/lib/WebGUI/Persistent/Query.pm @@ -97,33 +97,25 @@ sub buildWhereElement { =head2 new( %p ) -=over - -=item properties +=head3 properties A hashref of field name to a hash reference of property settings. Currently used settings are: -=over - -=item * quote +=head3 * quote If true values for this field are automatically quoted. -=back - -=item table +=head3 table The name of the table to query. -=item where +=head3 where A hash reference or array reference of arguments to build a where clause from. See parseWhereArgs for details. -=back - =cut sub new { @@ -172,13 +164,11 @@ sub _parsePart { Recursivley parses a list of where arguments joining them with "AND" or "OR". Arguments may take a number of forms: -=over - -=item * scalar +=head3 * scalar ("A = 1") is left unchanged. -=item * array reference +=head3 * array reference An array reference causes the joining argument to switch from 'AND' to 'OR' (or visa-versa) for its contents: @@ -189,7 +179,7 @@ becomes: "(A = 1 OR C = 2)" -=item * hash reference +=head3 * hash reference These are a convienent way of being able to dynamically build up complex queries gradually. @@ -200,8 +190,6 @@ becomes: "A = 1 AND C = 2" -=back - This routine is flexiable enough to be able to parse arguments of the form: ({A => [1,2]},[{B => 3,C => 4}],{D => 5}) diff --git a/lib/WebGUI/Persistent/Query/Delete.pm b/lib/WebGUI/Persistent/Query/Delete.pm index 3b959b793..c52be1a2d 100644 --- a/lib/WebGUI/Persistent/Query/Delete.pm +++ b/lib/WebGUI/Persistent/Query/Delete.pm @@ -63,33 +63,25 @@ sub buildQuery { =head2 new( %p ) -=over - -=item properties +=head3 properties A hashref of field name to a hash reference of property settings. Currently used settings are: -=over - -=item * quote +=head3 * quote If true values for this field are automatically quoted. -=back - -=item table +=head3 table The name of the table to query. -=item where +=head3 where A hash reference or array reference of arguments to build a where clause from. See parseWhereArgs for details. -=back - =cut 1; diff --git a/lib/WebGUI/Persistent/Query/Insert.pm b/lib/WebGUI/Persistent/Query/Insert.pm index 800e109ad..d1d0a4452 100644 --- a/lib/WebGUI/Persistent/Query/Insert.pm +++ b/lib/WebGUI/Persistent/Query/Insert.pm @@ -81,28 +81,20 @@ sub buildQuery { =head2 new( %p ) -=over - -=item data +=head3 data A hash reference of field name to value. -=item properties +=head3 properties -=over - -=item * quote +=head3 * quote If true values for this field are automatically quoted. -=back - -=item table +=head3 table The name of the table to query. -=back - =cut sub new { diff --git a/lib/WebGUI/Persistent/Query/Select.pm b/lib/WebGUI/Persistent/Query/Select.pm index 3e19b9dc3..d77fc0483 100644 --- a/lib/WebGUI/Persistent/Query/Select.pm +++ b/lib/WebGUI/Persistent/Query/Select.pm @@ -119,39 +119,33 @@ sub buildSelectFields { =head2 new( %p ) -=over - -=item fields +=head3 fields An array reference of field names (optional). -=item groupBy +=head3 groupBy An array reference of fields to group results by -=item limit +=head3 limit A scalar limit. -=item orderBy +=head3 orderBy An array reference of fields to order results by -=item properties +=head3 properties -=over - -=item * quote +=head3 * quote If true values for this field are automatically quoted. -=back - -=item table +=head3 table The name of the table to query. -=item where +=head3 where A hash reference or array reference of arguments to build a where clause from. See WebGUI::Persistent::Query::parseWhereArgs for details. diff --git a/lib/WebGUI/Persistent/Query/Update.pm b/lib/WebGUI/Persistent/Query/Update.pm index ec5fedf20..38ac3cecb 100644 --- a/lib/WebGUI/Persistent/Query/Update.pm +++ b/lib/WebGUI/Persistent/Query/Update.pm @@ -81,31 +81,23 @@ sub buildSet { =head2 new( %p ) -=over - -=item data +=head3 data A hash reference of field name to value. -=item properties +=head3 properties -=over - -=item * quote +=head3 * quote If true values for this field are automatically quoted. -=back +=head3 table -=item table - -=item where +=head3 where A hash reference or array reference of arguments to build a where clause from. See WebGUI::Persistent::Query::parseWhereArgs for details. -=back - =cut sub new { diff --git a/lib/WebGUI/Persistent/Tree.pm b/lib/WebGUI/Persistent/Tree.pm index 021561cd0..384d3c6b4 100644 --- a/lib/WebGUI/Persistent/Tree.pm +++ b/lib/WebGUI/Persistent/Tree.pm @@ -148,38 +148,30 @@ sub canUp { $_[0]->left_sister } This class method must be overridden to return a hash reference with one or more of the following keys. -=over - -=item useDummyRoot +=head3 useDummyRoot This should be set to true for classes that don't store their root node in the database. -=item properties +=head3 properties This should be a hash reference keyed by the field names of the table that this class refers to (and should be able to be manipulated with this classes get() and set() methods). The values of the hash reference should be hash references containing settings for each field. -=over - -=item * defaultValue +=head3 * defaultValue The default value for this field (optional). -=item * key +=head3 * key Should be true for the primary key column (one field must be set in this way). -=item * quote +=head3 * quote Should be true for fields that need to be quoted in database queries. -=back - -=back - =cut #------------------------------------------------------------------- diff --git a/lib/WebGUI/SQL.pm b/lib/WebGUI/SQL.pm index 64fa55e14..63ebb58dc 100644 --- a/lib/WebGUI/SQL.pm +++ b/lib/WebGUI/SQL.pm @@ -103,14 +103,10 @@ sub array { Starts a transaction sequence. To be used with commit and rollback. Any writes after this point will not be applied to the database until commit is called. -=over - -=item dbh +=head3 dbh A database handler. Defaults to the WebGUI default database handler. -=back - =cut sub beginTransaction { @@ -126,18 +122,14 @@ sub beginTransaction { Builds an array of data from a series of rows. -=over - -=item sql +=head3 sql An SQL query. The query must select only one column of data. -=item dbh +=head3 dbh By default this method uses the WebGUI database handler. However, you may choose to pass in your own if you wish. -=back - =cut sub buildArray { @@ -158,18 +150,14 @@ sub buildArray { Builds an array reference of data from a series of rows. -=over - -=item sql +=head3 sql An SQL query. The query must select only one column of data. -=item dbh +=head3 dbh By default this method uses the WebGUI database handler. However, you may choose to pass in your own if you wish. -=back - =cut sub buildArrayRef { @@ -183,18 +171,14 @@ sub buildArrayRef { Builds a hash of data from a series of rows. -=over - -=item sql +=head3 sql An SQL query. The query must select at least two columns of data, the first being the key for the hash, the second being the value. If the query selects more than two columns, then the last column will be the value and the remaining columns will be joined together by an underscore "_" to form a complex key. -=item dbh +=head3 dbh By default this method uses the WebGUI database handler. However, you may choose to pass in your own if you wish. -=back - =cut sub buildHash { @@ -217,18 +201,14 @@ sub buildHash { Builds a hash reference of data from a series of rows. -=over - -=item sql +=head3 sql An SQL query. The query must select at least two columns of data, the first being the key for the hash, the second being the value. If the query selects more than two columns, then the last column will be the value and the remaining columns will be joined together by an underscore "_" to form a complex key. -=item dbh +=head3 dbh By default this method uses the WebGUI database handler. However, you may choose to pass in your own if you wish. -=back - =cut sub buildHashRef { @@ -245,14 +225,10 @@ sub buildHashRef { Ends a transaction sequence. To be used with beginTransaction. Applies all of the writes since beginTransaction to the database. -=over - -=item dbh +=head3 dbh A database handler. Defaults to the WebGUI default database handler. -=back - =cut sub commit { @@ -294,14 +270,10 @@ sub errorMessage { Executes a prepared SQL statement. -=over - -=item values +=head3 values A list of values to be used in the placeholders defined in the prepared statement. -=back - =cut sub execute { @@ -344,16 +316,12 @@ sub getColumnNames { Increments an incrementer of the specified type and returns the value. -NOTE: This is not a regular method, but is an exported subroutine. +B This is not a regular method, but is an exported subroutine. -=over - -=item idName +=head3 idName Specify the name of one of the incrementers in the incrementer table. -=back - =cut sub getNextId { @@ -369,26 +337,22 @@ sub getNextId { Returns a row of data as a hash reference from the specified table. -=over - -=item table +=head3 table The name of the table to retrieve the row of data from. -=item key +=head3 key The name of the column to use as the retrieve key. Should be a primary or unique key in the table. -=item keyValue +=head3 keyValue The value to search for in the key column. -=item dbh +=head3 dbh A database handler to use. Defaults to the WebGUI database handler. -=back - =cut sub getRow { @@ -462,18 +426,14 @@ sub hashRef { Returns a statement handler. To be used in creating prepared statements. Use with the execute method. -=over - -=item sql +=head3 sql An SQL statement. Can use the "?" placeholder for maximum performance on multiple statements with the execute method. -=item dbh +=head3 dbh A database handler. Defaults to the WebGUI default database handler. -=back - =cut sub prepare { @@ -495,18 +455,14 @@ sub prepare { Executes a query and returns a single row of data as an array. -=over - -=item sql +=head3 sql An SQL query. -=item dbh +=head3 dbh By default this method uses the WebGUI database handler. However, you may choose to pass in your own if you wish. -=back - =cut sub quickArray { @@ -524,18 +480,14 @@ sub quickArray { Executes a query and returns a comma delimited text blob with column headers. -=over - -=item sql +=head3 sql An SQL query. -=item dbh +=head3 dbh By default this method uses the WebGUI database handler. However, you may choose to pass in your own if you wish. -=back - =cut sub quickCSV { @@ -557,18 +509,14 @@ sub quickCSV { Executes a query and returns a single row of data as a hash. -=over - -=item sql +=head3 sql An SQL query. -=item dbh +=head3 dbh By default this method uses the WebGUI database handler. However, you may choose to pass in your own if you wish. -=back - =cut sub quickHash { @@ -589,18 +537,14 @@ sub quickHash { Executes a query and returns a single row of data as a hash reference. -=over - -=item sql +=head3 sql An SQL query. -=item dbh +=head3 dbh By default this method uses the WebGUI database handler. However, you may choose to pass in your own if you wish. -=back - =cut sub quickHashRef { @@ -623,18 +567,14 @@ sub quickHashRef { Executes a query and returns a tab delimited text blob with column headers. -=over - -=item sql +=head3 sql An SQL query. -=item dbh +=head3 dbh By default this method uses the WebGUI database handler. However, you may choose to pass in your own if you wish. -=back - =cut sub quickTab { @@ -655,20 +595,16 @@ sub quickTab { Returns a string quoted and ready for insert into the database. -NOTE: This is not a regular method, but is an exported subroutine. +B This is not a regular method, but is an exported subroutine. -=over - -=item string +=head3 string Any scalar variable that needs to be escaped to be inserted into the database. -=item dbh +=head3 dbh The database handler. Defaults to the WebGUI database handler. -=back - =cut sub quote { @@ -683,20 +619,16 @@ sub quote { Returns a comma seperated string quoted and ready for insert/select into/from the database. This is typically used for a statement like "select * from someTable where field in (".quoteAndJoin(\@strings).")". -NOTE: This is not a regular method, but is an exported subroutine. +B This is not a regular method, but is an exported subroutine. -=over - -=item arrayRef +=head3 arrayRef An array reference containing strings to be quoted. -=item dbh +=head3 dbh The database handler. Defaults to the WebGUI database handler. -=back - =cut sub quoteAndJoin { @@ -716,18 +648,14 @@ sub quoteAndJoin { Returns a statement handler. This is a utility method that runs both a prepare and execute all in one. -=over - -=item sql +=head3 sql An SQL query. -=item dbh +=head3 dbh By default this method uses the WebGUI database handler. However, you may choose to pass in your own if you wish. -=back - =cut sub read { @@ -746,14 +674,10 @@ sub read { Ends a transaction sequence. To be used with beginTransaction. Cancels all of the writes since beginTransaction. -=over - -=item dbh +=head3 dbh A database handler. Defaults to the WebGUI default database handler. -=back - =cut sub rollback { @@ -782,26 +706,22 @@ sub rows { Inserts/updates a row of data into the database. Returns the value of the key. -=over - -=item table +=head3 table The name of the table to use. -=item key +=head3 key The name of the primary key of the table. -=item data +=head3 data A hash reference containing column names and values to be set. -=item dbh +=head3 dbh A database handler to use. Defaults to the WebGUI database handler. -=back - =cut sub setRow { @@ -829,18 +749,14 @@ sub setRow { 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 +=head3 sql An SQL query. -=item dbh +=head3 dbh By default this method uses the WebGUI database handler. However, you may choose to pass in your own if you wish. -=back - =cut sub unconditionalRead { @@ -864,18 +780,14 @@ sub unconditionalRead { A method specifically designed for writing to the database in an efficient manner. -=over - -=item sql +=head3 sql An SQL insert or update. -=item dbh +=head3 dbh By default this method uses the WebGUI database handler. However, you may choose to pass in your own if you wish. -=back - =cut sub write { diff --git a/lib/WebGUI/Search.pm b/lib/WebGUI/Search.pm index 403bf5b03..8f110aeb3 100644 --- a/lib/WebGUI/Search.pm +++ b/lib/WebGUI/Search.pm @@ -50,30 +50,26 @@ These methods are available from this package: Generates and returns the constraints to an SQL where clause based upon input from the user. -=over - -=item fieldList +=head3 fieldList An array reference that contains a list of the fields (table columns) to be considered when searching. -=item all +=head3 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. -=item atLeastOne +=head3 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. -=item exactPhrase +=head3 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. -=item without +=head3 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. -=back - =cut sub buildConstraints { @@ -138,18 +134,14 @@ sub buildConstraints { Generates and returns the advanced search form. -=over - -=item hiddenFields +=head3 hiddenFields A hash reference that contains any name/value pairs that should be included as hidden fields in the search form. -=item numResults +=head3 numResults A form param that can optionally specify the number of results to display. Defaults to 25. -=back - =cut sub form { @@ -202,14 +194,10 @@ sub form { Returns a URL that toggles the value "search" in the user's scratch variables on and off. -=over - -=item pairs +=head3 pairs URL name value pairs (this=that&foo=bar) to be passed with this toggle. -=back - =cut sub toggleURL { diff --git a/lib/WebGUI/Session.pm b/lib/WebGUI/Session.pm index 0e2153c01..c5ff92f39 100644 --- a/lib/WebGUI/Session.pm +++ b/lib/WebGUI/Session.pm @@ -40,7 +40,7 @@ Package WebGUI::Session 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. +B 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. @@ -163,18 +163,14 @@ sub close { Converts a visitor session to a user session. -=over - -=item sessionId +=head3 sessionId The session to convert. -=item userId +=head3 userId The user for the session to become. -=back - =cut sub convertVisitorToUser { @@ -194,14 +190,10 @@ sub convertVisitorToUser { Deletes a scratch variable for all users. This function must be used with care. -=over - -=item name +=head3 name The name of the scratch variable. -=back - =cut sub deleteAllScratch { @@ -217,14 +209,10 @@ sub deleteAllScratch { Deletes a scratch variable. -=over - -=item name +=head3 name The name of the scratch variable. -=back - =cut sub deleteScratch { @@ -240,14 +228,10 @@ sub deleteScratch { Removes the specified user session from memory and database. -=over - -=item sessionId +=head3 sessionId The session to end. -=back - =cut sub end { @@ -268,14 +252,10 @@ sub end { Retrieves the current value of a scratch variable. -=over - -=item varName +=head3 varName The name of the variable set with setScratch(). -=back - =cut sub getScratch { @@ -289,22 +269,18 @@ sub getScratch { Opens a closed ( or new ) WebGUI session. -=over - -=item webguiRoot +=head3 webguiRoot The path to the WebGUI files. -=item configFile +=head3 configFile The filename of the config file that WebGUI should operate from. -=item fastcgi +=head3 fastcgi A pointer to a Fast CGI object. -=back - =cut sub open { @@ -385,14 +361,10 @@ sub open { Updates the WebGUI session to reflect new page information. -=over - -=item pageId +=head3 pageId Specify which page you want to change to. -=back - =cut sub refreshPageInfo { @@ -406,16 +378,12 @@ sub refreshPageInfo { Updates the user session variables from the database. -NOTE: This also updates the user information. +B This also updates the user information. -=over - -=item sessionId +=head3 sessionId The session id to update. -=back - =cut sub refreshSessionVars { @@ -429,14 +397,10 @@ sub refreshSessionVars { Refreshes the user's information from the database into this user session. -=over - -=item userId +=head3 userId The user id to refresh into this session. -=back - =cut sub refreshUserInfo { @@ -451,18 +415,14 @@ sub refreshUserInfo { 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 +=head3 name The name of the scratch variable. -=item value +=head3 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. -=back - =cut sub setScratch { @@ -487,18 +447,14 @@ sub setScratch { Start a new user session. -=over - -=item userId +=head3 userId The user id of the user to create a session for. -=item sessionId +=head3 sessionId Session id will be generated if not specified. In almost every case you should let the system generate the session id. -=back - =cut sub start { diff --git a/lib/WebGUI/Style.pm b/lib/WebGUI/Style.pm index 925040566..1fd261c06 100644 --- a/lib/WebGUI/Style.pm +++ b/lib/WebGUI/Style.pm @@ -94,14 +94,10 @@ sub generateAdditionalHeadTags { Retrieves the template for this style. -=over - -=item templateId +=head3 templateId The unique identifier for the template to retrieve. Defaults to the style template tied to the current page. -=back - =cut sub getTemplate { @@ -116,18 +112,14 @@ sub getTemplate { Returns a parsed style with content based upon the current WebGUI session information. -=over - -=item content +=head3 content The content to be parsed into the style. Usually generated by WebGUI::Page::generate(). -=item templateId +=head3 templateId The unique identifier for the template to retrieve. Defaults to the style template tied to the current page. -=back - =cut sub process { @@ -184,18 +176,14 @@ sub process { Sets a tag into the of this rendered page for this page view. This is typically used for dynamically adding references to CSS and RSS documents. -=over - -=item url +=head3 url The URL to the document you are linking. -=item params +=head3 params A hash reference containing the other parameters to be included in the link tag, such as "rel" and "type". -=back - =cut sub setLink { @@ -212,14 +200,10 @@ sub setLink { Sets a tag into the of this rendered page for this page view. -=over - -=item params +=head3 params A hash reference containing the parameters of the meta tag. -=back - =cut sub setMeta { @@ -235,14 +219,10 @@ sub setMeta { Sets data to be output into the of the current rendered page for this page view. -=over - -=item tags +=head3 tags A raw string containing tags. This is just a raw string so you must actually pass in the full tag to use this call. -=back - =cut sub setRawHeadTags { @@ -257,18 +237,14 @@ sub setRawHeadTags { Sets a