From 24283f7ca9440446cf0239092b62c04de0b0c6f3 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Wed, 21 Dec 2005 04:06:00 +0000 Subject: [PATCH] POD for final two macros --- lib/WebGUI/Macro/L_loginBox.pm | 37 +++++++++++++++++++++++++++++++++ lib/WebGUI/Macro/LoginToggle.pm | 29 ++++++++++++++++++++++++++ 2 files changed, 66 insertions(+) diff --git a/lib/WebGUI/Macro/L_loginBox.pm b/lib/WebGUI/Macro/L_loginBox.pm index 08e37aa6d..91474718c 100644 --- a/lib/WebGUI/Macro/L_loginBox.pm +++ b/lib/WebGUI/Macro/L_loginBox.pm @@ -17,12 +17,49 @@ use WebGUI::Session; use WebGUI::Asset::Template; use WebGUI::URL; +=head1 NAME + +Package WebGUI::Macro::AOIHits + +=head1 DESCRIPTION + +Macro for displaying either a login box and registration link to the +user, or, if they're logged in, a link to access their account and log out. + +=head2 _createURL ( text ) + +internal utility sub for wrapping text in a link. + +=head3 text + +text to wrap in a link for logging out. + +=cut + #------------------------------------------------------------------- sub _createURL { return ''.$_[0].''; } #------------------------------------------------------------------- + +=head2 process ( boxSize, text, templateId ) + +=head3 boxSize + +The size of the login box. Defaults to 12. + +=head3 text + +A custom text message, processed for embedded text surrounded by percent signs +to turn into links to logout. + +=head3 templateId + +The ID of a template for custom layout of the login box and text. + +=cut + sub process { my @param = @_; my $templateId = $param[2] || "PBtmpl0000000000000044"; diff --git a/lib/WebGUI/Macro/LoginToggle.pm b/lib/WebGUI/Macro/LoginToggle.pm index e46629e30..d847145e1 100644 --- a/lib/WebGUI/Macro/LoginToggle.pm +++ b/lib/WebGUI/Macro/LoginToggle.pm @@ -16,6 +16,35 @@ use WebGUI::Session; use WebGUI::Asset::Template; use WebGUI::URL; +=head1 NAME + +Package WebGUI::Macro::LoginToggle + +=head1 DESCRIPTION + +Macro for a login or logout message with link to the user depending on whether they are logged in or now. + +=head2 process ( [ loginText, logoutText, templateId ] ) + +Note, if loginText = 'linkonly', then only the link will be returned. + +=head3 loginText + +Text that will be displayed to the user if they are not logged in. If blank, an +internationalized message will be used. + +=head3 logoutText + +Text that will be displayed to the user if they are logged in. If blank, an +internationalized message will be used. + +=head3 templateId + +The ID of a template for custom layout of the link and text. + +=cut + + #------------------------------------------------------------------- sub process { my @param = @_;