various patches
This commit is contained in:
parent
c0bf7e46f0
commit
ff110de45c
5 changed files with 37 additions and 24 deletions
|
|
@ -83,6 +83,9 @@
|
|||
- bugfix [ 977201 ] ws client bug
|
||||
- bugfix [ 969740 ] Messageboard: Deleting of postings
|
||||
- Added an option to sort a select list by its values. Thanks to Roy Johnson.
|
||||
- RFE [ 960747 ] Make the attachment box templated. Thanks to Flavio Curti.
|
||||
- Snippets can now take up to 9 optional parameters as replacements similar
|
||||
to the SQL macro. Thanks to Andreas Ljunggren.
|
||||
|
||||
|
||||
6.0.3
|
||||
|
|
|
|||
|
|
@ -15,5 +15,6 @@ INSERT INTO template VALUES (1,'Default Group Delete Macro','<a href="<tmpl_var
|
|||
INSERT INTO template VALUES (1,'Default Homelink','<a class="homeLink" href="<tmpl_var homeLink.url>"><tmpl_var homeLink.text></a>','Macro/H_homeLink',1,1);
|
||||
INSERT INTO template VALUES (1,'Default Make Printable','<a class="makePrintableLink" href="<tmpl_var printable.url>"><tmpl_var printable.text></a>','Macro/r_printable',1,1);
|
||||
INSERT INTO template VALUES (1,'Default LoginToggle','<a class="loginToggleLink" href="<tmpl_var toggle.url>"><tmpl_var toggle.text></a>','Macro/LoginToggle',1,1);
|
||||
|
||||
INSERT INTO template VALUES (1, 'Attachment Box', '<p>\r\n <table cellpadding=3 cellspacing=0 border=1>\r\n <tr> \r\n <td class="tableHeader">\r\n<a href="<tmpl_var attachment.url>"><img src="<tmpl_var session.config.extrasURL>/attachment.gif" border="0" alt="<tmpl_var attachment.name>"></a></td><td>\r\n<a href="<tmpl_var attachment.url>"><img src="<tmpl_var attachment.icon>" align="middle" width="16" height="16" border="0" alt="<tmpl_var attachment.name>"><tmpl_var attachment.name></a>\r\n </td>\r\n </tr>\r\n </table>\r\n</p>\r\n', 'AttachmentBox', 1, 1);
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ use WebGUI::ErrorHandler;
|
|||
use WebGUI::HTTP;
|
||||
use WebGUI::Node;
|
||||
use WebGUI::Session;
|
||||
use Template;
|
||||
use WebGUI::URL;
|
||||
use WebGUI::Utility;
|
||||
|
||||
|
|
@ -83,20 +84,25 @@ These methods are available from this class:
|
|||
|
||||
=head2 box ( )
|
||||
|
||||
Displays the attachment in WebGUI's standard "Attachment Box".
|
||||
Displays the attachment box template.
|
||||
|
||||
Template-Variables:
|
||||
attachment.icon
|
||||
attachment.url
|
||||
attachment.name
|
||||
attachment.size
|
||||
attachment.type
|
||||
|
||||
=cut
|
||||
|
||||
sub box {
|
||||
my ($output);
|
||||
$output = '<p><table cellpadding=3 cellspacing=0 border=1><tr><td class="tableHeader">'.
|
||||
'<a href="'.$_[0]->getURL.'"><img src="'.$session{config}{extrasURL}.
|
||||
'/attachment.gif" border=0 alt="'.
|
||||
$_[0]->getFilename.'"></a></td><td><a href="'.$_[0]->getURL.
|
||||
'"><img src="'.$_[0]->getIcon.
|
||||
'" align="middle" width="16" height="16" border="0" alt="'.$_[0]->getFilename
|
||||
.'">'.$_[0]->getFilename.'</a></td></tr></table>';
|
||||
return $output;
|
||||
my %var;
|
||||
$var{"attachment.icon"} = $_[0]->getIcon;
|
||||
$var{"attachment.url"} = $_[0]->getURL;
|
||||
$var{"attachment.name"} = $_[0]->getFilename;
|
||||
$var{"attachment.size"} = $_[0]->getSize;
|
||||
$var{"attachment.type"} = $_[0]->getType;
|
||||
return WebGUI::Template::process(1,"AttachmentBox",\%var);
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -18,10 +18,13 @@ use WebGUI::Session;
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub process {
|
||||
my (@param, $temp);
|
||||
@param = WebGUI::Macro::getParams($_[0]);
|
||||
my @param = WebGUI::Macro::getParams($_[0]);
|
||||
if (my $collateral = WebGUI::Collateral->find($param[0])) {
|
||||
return $collateral->get("parameters");
|
||||
my $temp = $collateral->get("parameters");
|
||||
for my $i ( 1 .. $#param ) {
|
||||
$temp =~ s/\^$i\;/$param[$i]/g;
|
||||
}
|
||||
return $temp;
|
||||
} else {
|
||||
return undef;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4637,7 +4637,7 @@ A comment.
|
|||
<p/>
|
||||
|
||||
<b>^a; or ^a(); - My Account Link</b><br>
|
||||
A link to your account information. In addition you can change the link text by creating a macro like this <b>^a("Account Info");</b>.
|
||||
A link to your account information. In addition you can change the link text by creating a macro like this <b>^a("Account Info");</b>.
If you specify "linkonly" in the first parameter then only the URL will be returned. Also, you can specify the name of a template in the Macro/a_account namespace as the second parameter to override the default template.
|
||||
<p>
|
||||
|
||||
<b>NOTES:</b> You can also use the special case ^a(linkonly); to return only the URL to the account page and nothing more. Also, the .myAccountLink style sheet class is tied to this macro.
|
||||
|
|
@ -4649,7 +4649,7 @@ Displays a small text message to a user who is in admin mode. Example: ^Admi
|
|||
<p>
|
||||
|
||||
<b>^AdminToggle; or ^AdminToggle();</b><br>
|
||||
Places a link on the page which is only visible to content managers and adminstrators. The link toggles on/off admin mode. You can optionally specify other messages to display like this: ^AdminToggle("Edit On","Edit Off");
|
||||
Places a link on the page which is only visible to content managers and adminstrators. The link toggles on/off admin mode. You can optionally specify other messages to display like this: ^AdminToggle("Edit On","Edit Off");
This macro optionally takes a third parameter that allows you to specify an alternate template name in the Macro/AdminToggle namespace.
|
||||
<p>
|
||||
|
||||
<b>^CanEditText();</b><br>
|
||||
|
|
@ -4659,18 +4659,18 @@ Display a message to a user that can edit the current page.
|
|||
<p>
|
||||
|
||||
<b>^EditableToggle; or ^EditableToggle();</b><br>
|
||||
Exactly the same as AdminToggle, except that the toggle is only displayed if the user has the rights to edit the current page.
|
||||
Exactly the same as AdminToggle, except that the toggle is only displayed if the user has the rights to edit the current page. This macro takes up to three parameters. The first is a labe for "Turn Admin On", the second is a label for "Turn Admin Off", and the third is the name of a template in the Macro/EditableToggle namespace to replace the default template.
|
||||
<p>
|
||||
|
||||
<b>^GroupAdd();</b><br>
|
||||
Using this macro you can allow users to add themselves to a group. The first parameter is the name of the group this user should be added to. The second parameter is a text string for the user to click on to add themselves to this group.
|
||||
Using this macro you can allow users to add themselves to a group. The first parameter is the name of the group this user should be added to. The second parameter is a text string for the user to click on to add themselves to this group.
The third parameter allows you to specify the name of a template in the Macro/GroupAdd namespace to replace the default template.
|
||||
<p>
|
||||
<b>NOTE:</b> If the user is not logged in, or or already belongs to the group, or the group is not set to allow auto adds, then no link will be displayed.
|
||||
<p>
|
||||
|
||||
|
||||
<b>^GroupDelete();</b><br>
|
||||
Using this macro you can allow users to delete themselves from a group. The first parameter is the name of the group this user should be deleted from. The second parameter is a text string for the user to click on to delete themselves from this group.
|
||||
Using this macro you can allow users to delete themselves from a group. The first parameter is the name of the group this user should be deleted from. The second parameter is a text string for the user to click on to delete themselves from this group.
The third parameter allows you to specify the name of a template in the Macro/GroupDelete namespace to replace the default template.
|
||||
<p>
|
||||
<b>NOTE:</b> If the user is not logged in or the user does not belong to the group, or the group is not set to allow auto deletes, then no link will be displayed.
|
||||
<p>
|
||||
|
|
@ -4702,7 +4702,7 @@ The user id of the currently logged in user.
|
|||
<p>
|
||||
|
||||
|,
|
||||
lastUpdated => 1053779917
|
||||
lastUpdated => 1089730066
|
||||
},
|
||||
|
||||
'841' => {
|
||||
|
|
@ -5776,7 +5776,7 @@ Using parameters<br>
|
|||
|
||||
|
||||
<b>^Snippet();</b><br/>
|
||||
This macro retrieves the contents of a snippet in the collateral management system and inserts it into the page.
|
||||
This macro retrieves the contents of a snippet in the collateral management system and inserts it into the page.
You can optionally specify up to 9 additional parameters that will be replace these special characters in the snippet: ^1; ^2; ^3; ^4; ^5; ^6; ^7; ^8; ^9;
|
||||
<p />
|
||||
<i>Example:</i> ^Snippet("flash code");
|
||||
<p />
|
||||
|
|
@ -5794,7 +5794,7 @@ This macro builds a quick image viewer using nothing more than the collateral ma
|
|||
<p/>
|
||||
|
||||
|,
|
||||
lastUpdated => 1051221379
|
||||
lastUpdated => 1089730066
|
||||
},
|
||||
|
||||
'930' => {
|
||||
|
|
@ -6956,7 +6956,7 @@ The description of this forum as passed by the calling object.
|
|||
'842' => {
|
||||
message => q|<P>These macros are used to create navigation on the site. </P>
|
||||
<P><B>^H; or ^H(); - Home Link</B><BR>A link to the home page of this site. In addition you can change the link text by creating a macro like this <B>^H("Go Home");</B>.
|
||||
<P><B>NOTES:</B> You can also use the special case ^H(linkonly); to return only the URL to the home page and nothing more. Also, the .homeLink style sheet class is tied to this macro. </P>
|
||||
<P><B>NOTES:</B> You can also use the special case ^H(linkonly); to return only the URL to the home page and nothing more. Also, the .homeLink style sheet class is tied to this macro. And you can specify a second parameter that with the name of a template in the Macro/H_homeLink namespace that will override the default template. </P>
|
||||
<P><B>^/; - System URL</B><BR>The URL to the gateway script (example: <I>/index.pl/</I>).
|
||||
<P><B>^\; - Page URL</B><BR>The URL to the current page (example: <I>/index.pl/pagename</I>).
|
||||
<P><STRONG>^Navigation(crumbTrail);<BR></STRONG>A dynamically generated crumb trail to the current page.
|
||||
|
|
@ -6985,7 +6985,7 @@ The description of this forum as passed by the calling object.
|
|||
<P><B>.selectedMenuItem</B><BR>Use this class to highlight the current page in any of the menu macros.
|
||||
<P><B>.verticalMenu </B><BR>The vertical menu (if you use a vertical menu macro).
|
||||
<P><B>.horizontalMenu </B><BR>The horizontal menu (if you use a horizontal menu macro). </P>|,
|
||||
lastUpdated => 1078477366
|
||||
lastUpdated => 1089730066
|
||||
},
|
||||
|
||||
'1073' => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue