From 877c8e1afa4e5c30bd2ae29be811c5e225304d8d Mon Sep 17 00:00:00 2001 From: JT Smith Date: Thu, 17 Feb 2005 03:47:35 +0000 Subject: [PATCH] bunch of bug fixes --- docs/upgrades/upgrade_6.2.11-6.3.0.pl | 6 +- lib/WebGUI/Asset.pm | 4 +- lib/WebGUI/Asset/Wobject.pm | 2 +- lib/WebGUI/Help/Collaboration.pm | 7 + lib/WebGUI/Help/USS.pm | 74 - lib/WebGUI/Help/WebGUI.pm | 172 --- lib/WebGUI/Wobject.pm | 1599 ---------------------- lib/WebGUI/i18n/English/Collaboration.pm | 7 + lib/WebGUI/i18n/English/USS.pm | 905 ------------ lib/WebGUI/i18n/English/WebGUI.pm | 1354 +----------------- sbin/preload.perl | 26 +- 11 files changed, 28 insertions(+), 4128 deletions(-) create mode 100644 lib/WebGUI/Help/Collaboration.pm delete mode 100644 lib/WebGUI/Help/USS.pm delete mode 100644 lib/WebGUI/Wobject.pm create mode 100644 lib/WebGUI/i18n/English/Collaboration.pm delete mode 100644 lib/WebGUI/i18n/English/USS.pm diff --git a/docs/upgrades/upgrade_6.2.11-6.3.0.pl b/docs/upgrades/upgrade_6.2.11-6.3.0.pl index 0de3ca4ed..0ce585921 100644 --- a/docs/upgrades/upgrade_6.2.11-6.3.0.pl +++ b/docs/upgrades/upgrade_6.2.11-6.3.0.pl @@ -199,6 +199,7 @@ WebGUI::SQL->write("alter table WobjectProxy change proxyByCriteria shortcutByCr WebGUI::SQL->write("alter table WobjectProxy change proxyCriteria shortcutCriteria text not null"); WebGUI::SQL->write("alter table WobjectProxy rename Shortcut"); WebGUI::SQL->write("update asset set className='WebGUI::Asset::Shortcut' where className='WebGUI::Asset::Wobject::WobjectProxy'"); +WebGUI::SQL->write("delete from wobject where assetId is null or assetId = ''"); # protect ourselves from crap WebGUI::SQL->write("alter table wobject drop column wobjectId"); WebGUI::SQL->write("alter table wobject add primary key (assetId)"); WebGUI::SQL->write("alter table wobject drop column templateId"); @@ -247,7 +248,7 @@ WebGUI::SQL->write("alter table Product_related drop column wobjectId"); WebGUI::SQL->write("alter table Product_specification drop column wobjectId"); WebGUI::SQL->write("alter table Product_related drop column RelatedWobjectId"); WebGUI::SQL->write("alter table Product_accessory drop column AccessoryWobjectId"); -# I sure hope all the events got a unique assetId, because if they didn't....... +WebGUI::SQL->write("delete from EventsCalendar_event where assetId is null or assetId = ''"); # protect ourselves from crap WebGUI::SQL->write("alter table EventsCalendar_event add primary key (assetId)"); WebGUI::SQL->write("alter table EventsCalendar_event drop column name"); WebGUI::SQL->write("alter table EventsCalendar_event drop column wobjectId"); @@ -457,6 +458,7 @@ my %folderNameCache; my $collateralRankCounter = 1; my $sth = WebGUI::SQL->read("select * from collateralFolder where collateralFolderId <> '0'"); while (my $data = $sth->hashRef) { + print "\t\tConverting folder ".$data->{collateralFolderId}."\n" unless ($quiet); my $url = fixUrl('doesntexist',$data->{name}); $folderNameCache{$data->{name}} = $url; my $folderId = WebGUI::SQL->setRow("asset","assetId",{ @@ -494,6 +496,7 @@ my $lastCollateralFolderId = 'nolastid'; my ($parentId, $baseLineage, $rank); my $sth = WebGUI::SQL->read("select * from collateral order by collateralFolderId"); while (my $data = $sth->hashRef) { + print "\t\tConverting collateral item ".$data->{collateralId}." for folder ".$data->{collateralFolderId}."\n" unless ($quiet); unless ($lastCollateralFolderId eq $data->{collateralFolderId}) { $rank = 1; my $id = $data->{collateralFolderId}; @@ -1068,6 +1071,7 @@ $sth->finish; WebGUI::SQL->write("alter table template drop primary key"); WebGUI::SQL->write("alter table template drop column templateId"); WebGUI::SQL->write("alter table template drop column name"); +WebGUI::SQL->write("delete from where assetId is null or assetId = ''"); # protect ourselves from crap WebGUI::SQL->write("alter table template add primary key (assetId)"); my @wobjectTypes = qw(Article Poll Survey WSClient DataForm Layout EventsCalendar Navigation HttpProxy IndexedSearch MessageBoard Product SQLReport SyndicatedContent Shortcut); my @allWobjectTypes = (@wobjectTypes,@otherWobjects); diff --git a/lib/WebGUI/Asset.pm b/lib/WebGUI/Asset.pm index e661ce4b9..f576d8268 100644 --- a/lib/WebGUI/Asset.pm +++ b/lib/WebGUI/Asset.pm @@ -1408,8 +1408,8 @@ Optional specified lineage. sub getRank { my $self = shift; my $lineage = shift || $self->get("lineage"); - my ($rank) = $lineage =~ m/(.{6})$/; - my $rank = $rank - 0; # gets rid of preceeding 0s. + my $rank = $lineage =~ m/(.{6})$/; + $rank = $rank - 0; # gets rid of preceeding 0s. return $rank; } diff --git a/lib/WebGUI/Asset/Wobject.pm b/lib/WebGUI/Asset/Wobject.pm index 60cdb4098..10b88a813 100644 --- a/lib/WebGUI/Asset/Wobject.pm +++ b/lib/WebGUI/Asset/Wobject.pm @@ -501,7 +501,7 @@ sub setCollateral { my $useAssetId = shift; my $setName = shift || "assetId"; my $setValue = shift || $self->get($setName); - my ($key, $sql, $seq, $dbkeys, $dbvalues, $counter); + my ($key, $seq, $dbkeys, $dbvalues); my $counter = 0; my $sql; if ($properties->{$keyName} eq "new" || $properties->{$keyName} eq "") { diff --git a/lib/WebGUI/Help/Collaboration.pm b/lib/WebGUI/Help/Collaboration.pm new file mode 100644 index 000000000..5925fa0e1 --- /dev/null +++ b/lib/WebGUI/Help/Collaboration.pm @@ -0,0 +1,7 @@ +package WebGUI::Help::Collaboration; + +our $HELP = { + +}; + +1; diff --git a/lib/WebGUI/Help/USS.pm b/lib/WebGUI/Help/USS.pm deleted file mode 100644 index e75896b14..000000000 --- a/lib/WebGUI/Help/USS.pm +++ /dev/null @@ -1,74 +0,0 @@ -package WebGUI::Help::USS; - -our $HELP = { - 'user submission system add/edit' => { - title => '61', - body => '71', - related => [ - { - tag => 'forum discussion properties', - namespace => 'WebGUI' - }, - { - tag => 'submission form template', - namespace => 'USS' - }, - { - tag => 'submission template', - namespace => 'USS' - }, - { - tag => 'user submission system template', - namespace => 'USS' - }, - { - tag => 'wobjects using', - namespace => 'WebGUI' - } - ] - }, - 'submission form template' => { - title => '93', - body => '94', - related => [ - { - tag => 'user submission system add/edit', - namespace => 'USS' - } - ] - }, - 'user submission system template' => { - title => '74', - body => '75', - related => [ - { - tag => 'pagination template variables', - namespace => 'WebGUI' - }, - { - tag => 'user submission system add/edit', - namespace => 'USS' - }, - { - tag => 'wobject template', - namespace => 'WebGUI' - } - ] - }, - 'submission template' => { - title => '76', - body => '77', - related => [ - { - tag => 'user submission system add/edit', - namespace => 'USS' - }, - { - tag => 'wobject template', - namespace => 'WebGUI' - } - ] - }, -}; - -1; diff --git a/lib/WebGUI/Help/WebGUI.pm b/lib/WebGUI/Help/WebGUI.pm index 49ac70e12..2450b8258 100644 --- a/lib/WebGUI/Help/WebGUI.pm +++ b/lib/WebGUI/Help/WebGUI.pm @@ -711,156 +711,6 @@ our $HELP = { } ] }, - 'forum discussion properties' => { - title => '1054', - body => '1055', - related => [ - { - tag => 'forum notification template', - namespace => 'WebGUI' - }, - { - tag => 'forum post form template', - namespace => 'WebGUI' - }, - { - tag => 'forum post template', - namespace => 'WebGUI' - }, - { - tag => 'forum search template', - namespace => 'WebGUI' - }, - { - tag => 'forum template', - namespace => 'WebGUI' - }, - { - tag => 'forum thread template', - namespace => 'WebGUI' - } - ] - }, - 'forum template' => { - title => '1056', - body => '1057', - related => [ - { - tag => 'forum discussion properties', - namespace => 'WebGUI' - }, - { - tag => 'template language', - namespace => 'WebGUI' - }, - { - tag => 'templates manage', - namespace => 'WebGUI' - } - ] - }, - 'forum post template' => { - title => '1058', - body => '1059', - related => [ - { - tag => 'forum discussion properties', - namespace => 'WebGUI' - }, - { - tag => 'template language', - namespace => 'WebGUI' - }, - { - tag => 'templates manage', - namespace => 'WebGUI' - } - ] - }, - 'forum thread template' => { - title => '1060', - body => '1061', - related => [ - { - tag => 'forum discussion properties', - namespace => 'WebGUI' - }, - { - tag => 'forum post template', - namespace => 'WebGUI' - }, - { - tag => 'template language', - namespace => 'WebGUI' - }, - { - tag => 'templates manage', - namespace => 'WebGUI' - } - ] - }, - 'forum notification template' => { - title => '1062', - body => '1063', - related => [ - { - tag => 'forum discussion properties', - namespace => 'WebGUI' - }, - { - tag => 'forum post template', - namespace => 'WebGUI' - }, - { - tag => 'template language', - namespace => 'WebGUI' - }, - { - tag => 'templates manage', - namespace => 'WebGUI' - } - ] - }, - 'forum post form template' => { - title => '1065', - body => '1066', - related => [ - { - tag => 'forum discussion properties', - namespace => 'WebGUI' - }, - { - tag => 'forum post template', - namespace => 'WebGUI' - }, - { - tag => 'template language', - namespace => 'WebGUI' - }, - { - tag => 'templates manage', - namespace => 'WebGUI' - } - ] - }, - 'forum search template' => { - title => '1067', - body => '1068', - related => [ - { - tag => 'forum discussion properties', - namespace => 'WebGUI' - }, - { - tag => 'template language', - namespace => 'WebGUI' - }, - { - tag => 'templates manage', - namespace => 'WebGUI' - } - ] - }, 'pagination template variables' => { title => '1085', body => '1086', @@ -876,28 +726,6 @@ our $HELP = { body => 'Page, Export body', related => [ ], - }, - 'forum post preview template' => { - title => 'Forum, Post Preview Template Title', - body => 'Forum, Post Preview Template Body', - related => [ - { - tag => 'forum post template', - namespace => 'WebGUI' - }, - { - tag => 'forum discussion properties', - namespace => 'WebGUI' - }, - { - tag => 'template language', - namespace => 'WebGUI' - }, - { - tag => 'templates manage', - namespace => 'WebGUI' - } - ], } }; diff --git a/lib/WebGUI/Wobject.pm b/lib/WebGUI/Wobject.pm deleted file mode 100644 index b88585d47..000000000 --- a/lib/WebGUI/Wobject.pm +++ /dev/null @@ -1,1599 +0,0 @@ -package WebGUI::Wobject; - -=head1 LEGAL - - ------------------------------------------------------------------- - WebGUI is Copyright 2001-2005 Plain Black Corporation. - ------------------------------------------------------------------- - Please read the legal notices (docs/legal.txt) and the license - (docs/license.txt) that came with this distribution before using - this software. - ------------------------------------------------------------------- - http://www.plainblack.com info@plainblack.com - ------------------------------------------------------------------- - -=cut - -use CGI::Util qw(rearrange); -use DBI; -use strict qw(subs vars); -use Tie::IxHash; -use WebGUI::AdminConsole; -use WebGUI::DateTime; -use WebGUI::FormProcessor; -use WebGUI::Grouping; -use WebGUI::HTML; -use WebGUI::HTMLForm; -use WebGUI::Icon; -use WebGUI::Id; -use WebGUI::International; -use WebGUI::Macro; -use WebGUI::Node; -use WebGUI::Page; -use WebGUI::Privilege; -use WebGUI::Session; -use WebGUI::SQL; -use WebGUI::TabForm; -use WebGUI::Template; -use WebGUI::URL; -use WebGUI::Utility; -use WebGUI::MetaData; -use WebGUI::Wobject::WobjectProxy; - -=head1 NAME - -Package WebGUI::Wobject - -=head1 DESCRIPTION - -An abstract class for all other wobjects to extend. - -=head1 SYNOPSIS - - use WebGUI::Wobject; - our @ISA = qw(WebGUI::Wobject); - -See the subclasses in lib/WebGUI/Wobjects for details. - -=head1 METHODS - -These methods are available from this class: - -=cut - -#------------------------------------------------------------------- -sub _reorderWobjects { - my ($sth, $i, $wid); - $sth = WebGUI::SQL->read("select wobjectId from wobject where pageId=".quote($_[0])." order by templatePosition,sequenceNumber"); - while (($wid) = $sth->array) { - $i++; - WebGUI::SQL->write("update wobject set sequenceNumber='$i' where wobjectId=".quote($wid)); - } - $sth->finish; -} - - -#------------------------------------------------------------------- -sub _getNextSequenceNumber { - my ($sequenceNumber); - ($sequenceNumber) = WebGUI::SQL->quickArray("select max(sequenceNumber) from wobject where pageId=".quote($_[0])); - return ($sequenceNumber+1); -} - -#------------------------------------------------------------------- - -sub adminConsole { - my $self = shift; - my $content = shift; - my $title = shift; - my $helpId = shift; - my $namespace = shift || $self->namespace; - $title = WebGUI::International::get($title,$namespace) if ($title); - my $ac = WebGUI::AdminConsole->new("assets"); - $ac->setHelp($helpId,$namespace); - $ac->render($content,$title); -} - -#------------------------------------------------------------------- - -=head2 canEdit ( ) - -Returns a boolean (0|1) value signifying that the user has the required privileges. - -=cut - -sub canEdit { - my $self = shift; - return WebGUI::Page::canEdit() if ($session{page}{wobjectPrivileges} != 1 || $self->get("wobjectId") eq "new"); - if ($session{user}{userId} eq $self->get("ownerId")) { - return 1; - } else { - return WebGUI::Grouping::isInGroup($self->get("groupIdEdit")); - } -} - -#------------------------------------------------------------------- - -=head2 canView ( ) - -Returns a boolean (0|1) value signifying that the user has the required privileges. Returns true for users that have the rights to edit this wobject. - -=cut - -sub canView { - my $self = shift; - return WebGUI::Page::canView() unless ($session{page}{wobjectPrivileges} == 1); - if ($session{user}{userId} eq $self->get("ownerId")) { - return 1; - } elsif ($self->get("startDate") < WebGUI::DateTime::time() && $self->get("endDate") > WebGUI::DateTime::time() && WebGUI::Grouping::isInGroup($self->get("groupIdView"))) { - return 1; - } else { - return $self->canEdit; - } -} - - -#------------------------------------------------------------------- - -=head2 confirm ( message, yesURL, [ , noURL, vitalComparison ] ) - -=head3 message - -A string containing the message to prompt the user for this action. - -=head3 yesURL - -A URL to the web method to execute if the user confirms the action. - -=head3 noURL - -A URL to the web method to execute if the user denies the action. Defaults back to the current page. - -=head3 vitalComparison - -A comparison expression to be used when checking whether the action should be allowed to continue. Typically this is used when the action is a delete of some sort. - -=cut - -sub confirm { - return WebGUI::Privilege::vitalComponent() if ($_[4]); - my $noURL = $_[3] || WebGUI::URL::page(); - my $output = '

'.WebGUI::International::get(42).'

'; - $output .= $_[1].'

'; - $output .= '

'.WebGUI::International::get(44).''; - $output .= '   '.WebGUI::International::get(45).'
'; - return $output; -} - - -#------------------------------------------------------------------- - -=head2 deleteCollateral ( tableName, keyName, keyValue ) - -Deletes a row of collateral data. - -=head3 tableName - -The name of the table you wish to delete the data from. - -=head3 keyName - -The name of the column that is the primary key in the table. - -=head3 keyValue - -An integer containing the key value. - -=cut - -sub deleteCollateral { - WebGUI::SQL->write("delete from $_[1] where $_[2]=".quote($_[3])); - WebGUI::ErrorHandler::audit("deleted ".$_[2]." ".$_[3]); -} - - -#------------------------------------------------------------------- - -=head2 description ( ) - -Returns this instance's description if it exists. - -=cut - -sub description { - if ($_[0]->get("description")) { - return $_[0]->get("description").'

'; - } -} - -#------------------------------------------------------------------- - -=head2 displayTitle ( ) - -Returns this instance's title if displayTitle is set to yes. - -=cut - -sub displayTitle { - if ($_[0]->get("displayTitle")) { - return "

".$_[0]->get("title")."

"; - } else { - return ""; - } -} - -#------------------------------------------------------------------- - -=head2 duplicate ( [ pageId ] ) - -Duplicates this wobject with a new wobject Id. Returns the new wobject Id. - -B This method is meant to be extended by all sub-classes. - -=head3 pageId - -If specified the wobject will be duplicated to this pageId, otherwise it will be duplicated to the clipboard. - -=cut - -sub duplicate { - my %properties; - tie %properties, 'Tie::CPHash'; - %properties = %{$_[0]->get}; - $properties{pageId} = $_[1] || '2'; - $properties{sequenceNumber} = _getNextSequenceNumber($properties{pageId}); - my $page = WebGUI::SQL->quickHashRef("select groupIdView,ownerId,groupIdEdit from page where pageId=".quote($properties{pageId})); - $properties{ownerId} = $page->{ownerId}; - if ($properties{pageId} eq '2') { - $properties{bufferUserId} = $session{user}{userId}; - $properties{bufferDate} = time(); - $properties{bufferPrevId} = {}; - } - my $orginalWid = $properties{wobjectId}; - delete $properties{wobjectId}; - my $cmd = "WebGUI::Wobject::".$properties{namespace}; - my $w = eval{$cmd->new({namespace=>$properties{namespace},wobjectId=>"new"})}; - if ($@) { - WebGUI::ErrorHandler::warn("Couldn't duplicate wobject ".$properties{namespace}." because: ".$@); - } - $w->set(\%properties); - WebGUI::MetaData::MetaDataDuplicate($orginalWid, $w->get("wobjectId")); - return $w->get("wobjectId"); -} - -#------------------------------------------------------------------- - -=head2 fileProperty ( name, labelId ) - -Returns a file property form row which can be used in any Wobject properties page. - -B This method is meant for use with www_deleteFile. - -=head3 name - -The name of the property that stores the filename. - -=head3 labelId - -The internationalId of the form label for this file. - -=cut - -sub fileProperty { - my ($self, $f, $labelId, $name); - $self = shift; - $name = shift; - $labelId = shift; - $f = WebGUI::HTMLForm->new; - if ($self->get($name) ne "") { - $f->readOnly(''. - WebGUI::International::get(391).'', - WebGUI::International::get($labelId,$self->get("namespace"))); - } else { - $f->file($name,WebGUI::International::get($labelId,$self->get("namespace"))); - } - return $f->printRowsOnly; -} - -#------------------------------------------------------------------- - -=head2 get ( [ propertyName ] ) - -Returns a hash reference containing all of the properties of this wobject instance. - -=head3 propertyName - -If an individual propertyName is specified, then only that property value is returned as a scalar. - -=cut - -sub get { - if ($_[1] ne "") { - return $_[0]->{_property}{$_[1]}; - } else { - return $_[0]->{_property}; - } -} - - -#------------------------------------------------------------------- - -=head2 getCollateral ( tableName, keyName, keyValue ) - -Returns a hash reference containing a row of collateral data. - -=head3 tableName - -The name of the table you wish to retrieve the data from. - -=head3 keyName - -The name of the column that is the primary key in the table. - -=head3 keyValue - -An integer containing the key value. If key value is equal to "new" or null, then an empty hashRef containing only keyName=>"new" will be returned to avoid strict errors. - -=cut - -sub getCollateral { - my ($class, $tableName, $keyName, $keyValue) = @_; - if ($keyValue eq "new" || $keyValue eq "") { - return {$keyName=>"new"}; - } else { - return WebGUI::SQL->quickHashRef("select * from $tableName where $keyName=".quote($keyValue),WebGUI::SQL->getSlave); - } -} - - -#------------------------------------------------------------------- - -=head2 getDefaultValue ( propertyName ) - -Returns the default value for a wobject property. - -=head3 propertyName - -The name of the property to retrieve the default value for. - -=cut - -sub getDefaultValue { - if (exists $_[0]->{_extendedProperties}{$_[1]}{defaultValue}) { - return $_[0]->{_extendedProperties}{$_[1]}{defaultValue}; - } elsif (exists $_[0]->{_wobjectProperties}{$_[1]}{defaultValue}) { - return $_[0]->{_wobjectProperties}{$_[1]}{defaultValue}; - } else { - return undef; - } -} - - -#------------------------------------------------------------------- - -=head2 getIndexerParams ( ) - -Override this method and return a hash reference that includes the properties necessary to index the content of the wobject. - -=cut - -sub getIndexerParams { - return {}; -} - -#------------------------------------------------------------------- - -=head2 getValue ( propertyName ) - -Returns a value for a wobject property however possible. It first looks in form variables for the property, then looks to the value stored in the wobject instance, and if all else fails it returns the default value for the property. - -=head3 propertyName - -The name of the property to retrieve the value for. - -=cut - -sub getValue { - my $currentValue = $_[0]->get($_[1]); - if (exists $session{form}{$_[1]}) { - return $session{form}{$_[1]}; - } elsif (defined $currentValue) { - return $_[0]->get($_[1]); - } else { - return $_[0]->getDefaultValue($_[1]); - } -} - - - -#------------------------------------------------------------------- - -=head2 i18n ( id [, namespace ]) { - -Returns an internationalized message. - -=head3 id - -The identifier for the internationalized message. - -=head3 namespace - -The namespace for the internationalized message. Defaults to the namespace of the wobject. - -=cut - -sub i18n { - my $self = shift; - my $id = shift; - my $namespace = shift || $self->get("namespace"); - return WebGUI::International::get($id,$namespace); -} - -#------------------------------------------------------------------- - -=head2 inDateRange ( ) - -Returns a boolean value of whether the wobject should be displayed based upon it's start and end dates. - -=cut - -sub inDateRange { - if ($_[0]->get("startDate") < time() && $_[0]->get("endDate") > time()) { - return 1; - } else { - return 0; - } -} - -#------------------------------------------------------------------- - -=head2 logView ( ) - -Logs the view of the wobject to the passive profiling mechanism. -=cut - -sub logView { - my $self = shift; - WebGUI::PassiveProfiling::add($self->get("wobjectId")); - return; -} - -#------------------------------------------------------------------- - -=head2 moveCollateralDown ( tableName, idName, id [ , setName, setValue ] ) - -Moves a collateral data item down one position. This assumes that the collateral data table has a column called "wobjectId" that identifies the wobject, and a column called "sequenceNumber" that determines the position of the data item. - -=head3 tableName - -A string indicating the table that contains the collateral data. - -=head3 idName - -A string indicating the name of the column that uniquely identifies this collateral data item. - -=head3 id - -An integer that uniquely identifies this collateral data item. - -=head3 setName - -By default this method assumes that the collateral will have a wobject id in the table. However, since there is not always a wobject id to separate one data set from another, you may specify another field to do that. - -=head3 setValue - -The value of the column defined by "setName" to select a data set from. - -=cut - -### NOTE: There is a redundant use of wobjectId in some of these statements on purpose to support -### two different types of collateral data. - -sub moveCollateralDown { - my ($id, $seq, $setName, $setValue); - $setName = $_[4] || "wobjectId"; - $setValue = $_[5]; - unless (defined $setValue) { - $setValue = $_[0]->get($setName); - } - ($seq) = WebGUI::SQL->quickArray("select sequenceNumber from $_[1] where $_[2]=".quote($_[3])." and $setName=".quote($setValue)); - ($id) = WebGUI::SQL->quickArray("select $_[2] from $_[1] where $setName=".quote($setValue)." and sequenceNumber=$seq+1"); - if ($id ne "") { - WebGUI::SQL->write("update $_[1] set sequenceNumber=sequenceNumber+1 where $_[2]=".quote($_[3])." and $setName=" .quote($setValue)); - WebGUI::SQL->write("update $_[1] set sequenceNumber=sequenceNumber-1 where $_[2]=".quote($id)." and $setName=" .quote($setValue)); - } -} - -#------------------------------------------------------------------- - -=head2 moveCollateralUp ( tableName, idName, id [ , setName, setValue ] ) - -Moves a collateral data item up one position. This assumes that the collateral data table has a column called "wobjectId" that identifies the wobject, and a column called "sequenceNumber" that determines the position of the data item. - -=head3 tableName - -A string indicating the table that contains the collateral data. - -=head3 idName - -A string indicating the name of the column that uniquely identifies this collateral data item. - -=head3 id - -An integer that uniquely identifies this collateral data item. - -=head3 setName - -By default this method assumes that the collateral will have a wobject id in the table. However, since there is not always a wobject id to separate one data set from another, you may specify another field to do that. - -=head3 setValue - -The value of the column defined by "setName" to select a data set from. - -=cut - -### NOTE: There is a redundant use of wobjectId in some of these statements on purpose to support -### two different types of collateral data. - -sub moveCollateralUp { - my ($id, $seq, $setValue, $setName); - $setName = $_[4] || "wobjectId"; - $setValue = $_[5]; - unless (defined $setValue) { - $setValue = $_[0]->get($setName); - } - ($seq) = WebGUI::SQL->quickArray("select sequenceNumber from $_[1] where $_[2]=".quote($_[3])." and $setName=".quote($setValue)); - ($id) = WebGUI::SQL->quickArray("select $_[2] from $_[1] where $setName=".quote($setValue) - ." and sequenceNumber=$seq-1"); - if ($id ne "") { - WebGUI::SQL->write("update $_[1] set sequenceNumber=sequenceNumber-1 where $_[2]=".quote($_[3])." and $setName=" - .quote($setValue)); - WebGUI::SQL->write("update $_[1] set sequenceNumber=sequenceNumber+1 where $_[2]=".quote($id)." and $setName=" - .quote($setValue)); - } -} - -#------------------------------------------------------------------- - -=head2 name ( ) - -This method should be overridden by all wobjects and should return an internationalized human friendly name for the wobject. This method only exists in the super class for reverse compatibility and will try to look up the name based on the old name definition. - -=cut - -sub name { - my $namespace = $_[0]->get("namespace"); - if ($namespace eq "") { - WebGUI::ErrorHandler::warn("No namespace available in this wobject instance."); - return "! Unknown Wobject !"; - } else { - my $cmd = "\$WebGUI::Wobject::".$namespace."::name"; - my $name = eval($cmd); - if ($name eq "") { - WebGUI::ErrorHandler::warn($namespace." does not appear to have any sort of name definition at all."); - return $namespace; - } - return $name; - } -} - - -#------------------------------------------------------------------- - -=head2 namespace ( ) - -Returns the namespace of this wobject. This is a shortcut for $self->get("namespace"); - -=cut - -sub namespace { - my $self = shift; - return $self->get("namespace"); -} - - -#------------------------------------------------------------------- - -=head2 new ( -properties, -extendedProperties [, -useDiscussion , -useTemplate , -useMetaData ] ) - -Constructor. - -B This method should never need to be overridden or extended. - -=head3 -properties - -A hash reference containing at minimum "wobjectId" and "namespace". wobjectId may be set to "new" if you're creating a new instance. This hash reference should be the one created by WebGUI.pm and passed to the wobject subclass. - -B It may seem a little weird that the initial data for the wobject instance is coming from WebGUI.pm, but this was done to lessen database traffic thus increasing the speed of all wobjects. - -=head3 -extendedProperties - -A hash reference containing the properties that extend the wobject class. They should match the properties that are added to this wobject's namespace table in the database. So if this wobject has a namespace of "MyWobject" and a table definition that looks like this: - - create MyWobject ( - wobjectId int not null primary key, - something varchar(25), - isCool int not null default 0, - foo int not null default 1, - bar text - ); - -Then the extended property list would be: - { - something=>{ - fieldType=>"text" - }, - isCool=>{ - fieldType=>"yesNo", - defaultValue=>1 - }, - counter=>{ - fieldType=>"integer", - defaultValue=>1, - autoIncrement=>1 - }, - someId=>{ - autoId=>1 - }, - foo=>{ - fieldType=>"integer", - defaultValue=>1 - }, - bar=>{ - fieldType=>"textarea" - } - } - -B This is used to define the wobject and should only be passed in by a wobject subclass. - -=head3 -useDiscussion - -Defaults to "0". If set to "1" this will add a discussion properties tab to this wobject to enable content managers to set the properties of a discussion attached to this wobject. - -B This is used to define the wobject and should only be passed in by a wobject subclass. - -=head3 -useTemplate - -Defaults to "0". If set to "1" this will add a template field to the wobject to enable content managers to select a template to layout this wobject. - -=head3 -useMetaData - -Defaults to "0". If set to "1" this will add a Metadata properties tab to this wobject to enable content managers to set Metadata values. - -B This is used to define the wobject and should only be passed in by a wobject subclass. - -=cut - -sub new { - my ($self, @p) = @_; - my ($properties, $extendedProperties, $useTemplate, $useDiscussion, $useMetaData); - if (ref $_[1] eq "HASH") { - $properties = $_[1]; # reverse compatibility prior to 5.2 - } else { - ($properties, $extendedProperties, $useDiscussion, $useTemplate, $useMetaData) = - rearrange([qw(properties extendedProperties useDiscussion useTemplate useMetaData)], @p); - } - $useDiscussion = 0 unless ($useDiscussion); - $useTemplate = 0 unless ($useTemplate); - $useMetaData = 0 unless ($useMetaData && $session{setting}{metaDataEnabled}); - my $wobjectProperties = { - userDefined1=>{ - fieldType=>"text" - }, - userDefined2=>{ - fieldType=>"text" - }, - userDefined3=>{ - fieldType=>"text" - }, - userDefined4=>{ - fieldType=>"text" - }, - userDefined5=>{ - fieldType=>"text" - }, - bufferUserId=>{ - fieldType=>"hidden" - }, - bufferDate=>{ - fieldType=>"hidden" - }, - bufferPrevId=>{ - fieldType=>"hidden" - }, - forumId=>{ - fieldType=>"hidden" - }, - allowDiscussion=>{ - fieldType=>"yesNo", - defaultValue=>0 - }, - title=>{ - fieldType=>"text", - defaultValue=>$_[0]->get("namespace") - }, - templateId=>{ - fieldType=>"template", - defaultValue=>1 - }, - displayTitle=>{ - fieldType=>"yesNo", - defaultValue=>1 - }, - description=>{ - fieldType=>"textarea", - fieldType=>"HTMLArea" - }, - pageId=>{ - fieldType=>"hidden", - defaultValue=>$session{page}{pageId} - }, - templatePosition=>{ - fieldType=>"selectList", - defaultValue=>1 - }, - startDate=>{ - defaultValue=>$session{page}{startDate}, - fieldType=>"dateTime" - }, - endDate=>{ - defaultValue=>$session{page}{endDate}, - fieldType=>"dateTime" - }, - ownerId=>{ - defaultValue=>$session{page}{ownerId}, - fieldType=>"group" - }, - groupIdView=>{ - defaultValue=>$session{page}{groupIdView}, - fieldType=>"group" - }, - groupIdEdit=>{ - defaultValue=>$session{page}{groupIdEdit}, - fieldType=>"group" - }, - sequenceNumber=>{ - fieldType=>"hidden" - } - }; - my %fullProperties; - my $extra; - unless ($properties->{wobjectId} eq "new") { - $extra = WebGUI::SQL->quickHashRef("select * from ".$properties->{namespace}." where wobjectId=".quote($properties->{wobjectId}),WebGUI::SQL->getSlave); - } - tie %fullProperties, 'Tie::CPHash'; - %fullProperties = (%{$properties},%{$extra}); - bless({ - _property=>\%fullProperties, - _useTemplate=>$useTemplate, - _useDiscussion=>$useDiscussion, - _useMetaData=>$useMetaData, - _wobjectProperties=>$wobjectProperties, - _extendedProperties=>$extendedProperties - }, - $self); -} - -#------------------------------------------------------------------- - -=head2 processMacros ( output ) - - Decides whether or not macros should be processed and returns the - appropriate output. - -=head3 output - - An HTML blob to be processed for macros. - -=cut - -sub processMacros { - return WebGUI::Macro::process($_[1]); -} - -#------------------------------------------------------------------- - -=head2 processTemplate ( templateId, vars [ , namespace ] ) - -Returns the content generated from this template. - -B Only for use in wobjects that support templates. - -=head3 templateId - -An id referring to a particular template in the templates table. - -=head3 hashRef - -A hash reference containing variables and loops to pass to the template engine. - -=head3 namespace - -A namespace to use for the template. Defaults to the wobject's namespace. - -=cut - -sub processTemplate { - my $self = shift; - my $templateId = shift; - my $var = shift; - my $namespace = shift || $self->get("namespace"); - if ($self->{_useMetaData}) { - my $meta = WebGUI::MetaData::getMetaDataFields($self->get("wobjectId")); - foreach my $field (keys %$meta) { - $var->{$meta->{$field}{fieldName}} = $meta->{$field}{value}; - } - } - my %vars = ( - %{$self->{_property}}, - %{$var} - ); - if (defined $self->get("_WobjectProxy")) { - $vars{isShortcut} = 1; - my ($originalPageURL) = WebGUI::SQL->quickArray("select urlizedTitle from page where pageId=".quote($self->get("pageId")),WebGUI::SQL->getSlave); - $vars{originalURL} = WebGUI::URL::gateway($originalPageURL."#".$self->get("wobjectId")); - } - return WebGUI::Template::process($templateId,$namespace, \%vars); -} - -#------------------------------------------------------------------- - -=head2 purge ( ) - -Removes this wobject from the database and all it's attachments from the filesystem. - -B This method is meant to be extended by all sub-classes. - -=cut - -sub purge { - if ($_[0]->get("forumId")) { - my ($inUseElsewhere) = WebGUI::SQL->quickArray("select count(*) from wobject where forumId=".quote($_[0]->get("forumId"))); - unless ($inUseElsewhere > 1) { - my $forum = WebGUI::Forum->new($_[0]->get("forumId")); - $forum->purge; - } - } - WebGUI::SQL->write("delete from ".$_[0]->get("namespace")." where wobjectId=".quote($_[0]->get("wobjectId"))); - WebGUI::SQL->write("delete from wobject where wobjectId=".quote($_[0]->get("wobjectId"))); - WebGUI::MetaData::metaDataDelete($_[0]->get("wobjectId")); - my $node = WebGUI::Node->new($_[0]->get("wobjectId")); - $node->delete; -} - - -#------------------------------------------------------------------- - -=head2 reorderCollateral ( tableName, keyName [ , setName, setValue ] ) - -Resequences collateral data. Typically useful after deleting a collateral item to remove the gap created by the deletion. - -=head3 tableName - -The name of the table to resequence. - -=head3 keyName - -The key column name used to determine which data needs sorting within the table. - -=head3 setName - -Defaults to "wobjectId". This is used to define which data set to reorder. - -=head3 setValue - -Used to define which data set to reorder. Defaults to the wobjectId for this instance. Defaults to the value of "setName" in the wobject properties. - -=cut - -sub reorderCollateral { - my ($sth, $i, $id, $setName, $setValue); - $i = 1; - $setName = $_[3] || "wobjectId"; - $setValue = $_[4] || $_[0]->get($setName); - $sth = WebGUI::SQL->read("select $_[2] from $_[1] where $setName=".quote($setValue)." order by sequenceNumber"); - while (($id) = $sth->array) { - WebGUI::SQL->write("update $_[1] set sequenceNumber=$i where $setName=".quote($setValue)." and $_[2]=".quote($id)); - $i++; - } - $sth->finish; -} - - - -#------------------------------------------------------------------- - -=head2 set ( [ hashRef ] ) - -Stores the values specified in hashRef to the database. - -=head3 hashRef - -A hash reference of the properties to set for this wobject instance. - -=cut - -sub set { - my ($key, $sql, @update, $i); - my $self = shift; - my $properties = shift; - my $extendedProperties = shift; # shift for backward compatibility. - unless (defined $extendedProperties) { - my @temp; - foreach (keys %{$self->{_extendedProperties}}) { - push(@temp,$_); - } - $extendedProperties = \@temp; - } - my @temp; - foreach (keys %{$self->{_wobjectProperties}}) { - push(@temp,$_); - } - my $wobjectProperties = \@temp; - if ($self->{_property}{wobjectId} eq "new") { - $self->{_property}{wobjectId} = WebGUI::Id::generate(); - $self->{_property}{pageId} = ${$_[1]}{pageId} || $session{page}{pageId}; - $self->{_property}{sequenceNumber} = _getNextSequenceNumber($self->{_property}{pageId}); - $self->{_property}{addedBy} = $session{user}{userId}; - $self->{_property}{dateAdded} = time(); - WebGUI::SQL->write("insert into wobject - (wobjectId, namespace, dateAdded, addedBy, sequenceNumber, pageId) - values ( - ".quote($self->{_property}{wobjectId}).", - ".quote($self->{_property}{namespace}).", - ".$self->{_property}{dateAdded}.", - ".quote($self->{_property}{addedBy}).", - ".$self->{_property}{sequenceNumber}.", - ".quote($self->{_property}{pageId})." - )"); - WebGUI::SQL->write("insert into ".$self->{_property}{namespace}." (wobjectId) - values (".quote($self->{_property}{wobjectId}).")"); - foreach my $key (keys %{$self->{_extendedProperties}}) { - if ($self->{_extendedProperties}{$key}{autoIncrement}) { - $properties->{$key} = getNextId($key); - } - if ($self->{_extendedProperties}{$key}{autoId}) { - $properties->{$key} = WebGUI::Id::generate(); - } - } - } - $self->{_property}{lastEdited} = time(); - $self->{_property}{editedBy} = $session{user}{userId}; - $sql = "update wobject set"; - foreach $key (keys %{$properties}) { - $self->{_property}{$key} = ${$properties}{$key}; - if (isIn($key, @{$wobjectProperties})) { - $sql .= " ".$key."=".quote(${$properties}{$key}).","; - } - if (isIn($key, @{$extendedProperties})) { - $update[$i] .= " ".$key."=".quote($properties->{$key}); - $i++; - } - } - $sql .= " lastEdited=".$self->{_property}{lastEdited}.", - editedBy=".quote($self->{_property}{editedBy})." - where wobjectId=".quote($self->{_property}{wobjectId}); - WebGUI::SQL->write($sql); - if (@update) { - WebGUI::SQL->write("update ".$self->{_property}{namespace}." set ".join(",",@update)." - where wobjectId=".quote($self->{_property}{wobjectId})); - } - WebGUI::ErrorHandler::audit("edited Wobject ".$self->{_property}{wobjectId}); -} - - -#----------------------------------------------------------------- - -=head2 setCollateral ( tableName, keyName, properties [ , useSequenceNumber, useWobjectId, setName, setValue ] ) - -Performs and insert/update of collateral data for any wobject's collateral data. Returns the primary key value for that row of data. - -=head3 tableName - -The name of the table to insert the data. - -=head3 keyName - -The column name of the primary key in the table specified above. This must also be an incrementerId in the incrementer table. - -=head3 properties - -A hash reference containing the name/value pairs to be inserted into the database where the name is the column name. Note that the primary key should be specified in this list, and if it's value is "new" or null a new row will be created. - -=head3 useSequenceNumber - -If set to "1", a new sequenceNumber will be generated and inserted into the row. Note that this means you must have a sequenceNumber column in the table. Also note that this requires the presence of the wobjectId column. Defaults to "1". - -=head3 useWobjectId - -If set to "1", the current wobjectId will be inserted into the table upon creation of a new row. Note that this means the table better have a wobjectId column. Defaults to "1". - -=head3 setName - -If this collateral data set is not grouped by wobjectId, but by another column then specify that column here. The useSequenceNumber parameter will then use this column name instead of wobjectId to generate the sequenceNumber. - -=head3 setValue - -If you've specified a setName you may also set a value for that set. Defaults to the value for this id from the wobject properties. - -=cut - -sub setCollateral { - my ($key, $sql, $seq, $dbkeys, $dbvalues, $counter); - my ($class, $table, $keyName, $properties, $useSequence, $useWobjectId, $setName, $setValue) = @_; - $counter = 0; - $setName = $setName || "wobjectId"; - $setValue = $setValue || $_[0]->get($setName); - if ($properties->{$keyName} eq "new" || $properties->{$keyName} eq "") { - $properties->{$keyName} = WebGUI::Id::generate(); - $sql = "insert into $table ("; - $dbkeys = ""; - $dbvalues = ""; - unless ($useSequence eq "0") { - unless (exists $properties->{sequenceNumber}) { - ($seq) = WebGUI::SQL->quickArray("select max(sequenceNumber) from $table - where $setName=".quote($setValue)); - $properties->{sequenceNumber} = $seq+1; - } - } - unless ($useWobjectId eq "0") { - $properties->{wobjectId} = $_[0]->get("wobjectId"); - } - foreach $key (keys %{$properties}) { - if ($counter++ > 0) { - $dbkeys .= ','; - $dbvalues .= ','; - } - $dbkeys .= $key; - $dbvalues .= quote($properties->{$key}); - } - $sql .= $dbkeys.') values ('.$dbvalues.')'; - WebGUI::ErrorHandler::audit("added ".$table." ".$properties->{$keyName}); - } else { - $sql = "update $table set "; - foreach $key (keys %{$properties}) { - unless ($key eq "sequenceNumber") { - $sql .= ',' if ($counter++ > 0); - $sql .= $key."=".quote($properties->{$key}); - } - } - $sql .= " where $keyName=".quote($properties->{$keyName}); - WebGUI::ErrorHandler::audit("edited ".$table." ".$properties->{$keyName}); - } - WebGUI::SQL->write($sql); - $_[0]->{_property}{lastEdited} = time(); - $_[0]->{_property}{editedBy} = $session{user}{userId}; - WebGUI::SQL->write("update wobject set lastEdited=".$_[0]->{_property}{lastEdited} - .", editedBy=".quote($_[0]->{_property}{editedBy})." where wobjectId=".quote($_[0]->wid)); - $_[0]->reorderCollateral($table,$keyName,$setName,$setValue) if ($properties->{sequenceNumber} < 0); - return $properties->{$keyName}; -} - - -#------------------------------------------------------------------- - -=head2 uiLevel - -Returns the UI Level of a wobject. Defaults to "0" for all wobjects. Override to set the UI Level higher for a given wobject. - -=cut - -sub uiLevel { - return 0; -} - -#------------------------------------------------------------------- - -=head2 wid ( ) - -Returns the wobject id of this wobject. This is a shortcut for $self->get("wobjectId"); - -=cut - -sub wid { - my $self = shift; - return $self->get("wobjectId"); -} - -#------------------------------------------------------------------- - -=head2 www_copy ( ) - -Copies this instance to the clipboard. - -B Should never need to be overridden or extended. - -=cut - -sub www_copy { - my $self = shift; - return WebGUI::Privilege::insufficient() unless ($self->canEdit); - $self->duplicate; - return ""; -} - -#------------------------------------------------------------------- - -=head2 www_createShortcut ( ) - -Creates a shortcut (using the wobject proxy) of this wobject on the clipboard. - -B Should never need to be overridden or extended. - -=cut - -sub www_createShortcut { - my $self = shift; - return WebGUI::Privilege::insufficient() unless ($self->canEdit); - my $w = WebGUI::Wobject::WobjectProxy->new({wobjectId=>"new",namespace=>"WobjectProxy"}); - $w->set({ - pageId=>'2', - templatePosition=>1, - title=>$self->getValue("title"), - proxiedNamespace=>$self->get("namespace"), - proxiedWobjectId=>$self->get("wobjectId"), - bufferUserId=>$session{user}{userId}, - bufferDate=>WebGUI::DateTime::time(), - bufferPrevId=>$session{page}{pageId} - }); - return ""; -} - -#------------------------------------------------------------------- - -=head2 www_cut ( ) - -Moves this instance to the clipboard. - -=cut - -sub www_cut { - my $self = shift; - return WebGUI::Privilege::insufficient() unless ($self->canEdit); - $self->set({ - pageId=>'2', - templatePosition=>1, - bufferUserId=>$session{user}{userId}, - bufferDate=>WebGUI::DateTime::time(), - bufferPrevId=>$session{page}{pageId} - }); - _reorderWobjects($session{page}{pageId}); - return ""; -} - -#------------------------------------------------------------------- - -=head2 www_deleteConfirm ( ) - -Moves this instance to the trash. - -=cut - -sub www_deleteConfirm { - my $self = shift; - if ($self->canEdit) { - $self->set({pageId=>'3', templatePosition=>1, - bufferUserId=>$session{user}{userId}, - bufferDate=>WebGUI::DateTime::time(), - bufferPrevId=>$session{page}{pageId}}); - WebGUI::ErrorHandler::audit("moved Wobject ".$self->{_property}{wobjectId}." to the trash."); - _reorderWobjects($self->get("pageId")); - return ""; - } else { - return WebGUI::Privilege::insufficient(); - } -} - -#------------------------------------------------------------------- - -=head2 www_deleteFile ( ) - -Displays a confirmation message relating to the deletion of a file. - -=cut - -sub www_deleteFile { - my $self = shift; - return WebGUI::Privilege::insufficient() unless ($self->canEdit); - return $self->confirm(WebGUI::International::get(728), - WebGUI::URL::page('func=deleteFileConfirm&wid='.$self->get("wobjectId").'&file='.$session{form}{file}), - WebGUI::URL::page('func=edit&wid='.$self->get("wobjectId")) - ); -} - -#------------------------------------------------------------------- - -=head2 www_deleteFileConfirm ( ) - -Deletes a file from this instance. - -=cut - -sub www_deleteFileConfirm { - my $self = shift; - return WebGUI::Privilege::insufficient() unless ($self->canEdit); - $self->set({$session{form}{file}=>''}); - return $self->www_edit(); -} - -#------------------------------------------------------------------- - -=head2 www_edit ( [ -properties, -layout, -privileges, -helpId, -heading, -headingId ] ) - -Displays the common properties of any/all wobjects. - -=head3 -properties, -layout, -privileges - -WebGUI::HTMLForm objects that extend these tabs. - -=head3 -helpId - -An id in this namespace in the WebGUI help system for this edit page. If specified a help link will be created on the edit page. - -=head3 -heading - -A text string to put in the heading of this page. - -=head3 -headingId - -An id this namespace of the WebGUI international system. This message will be retrieved and displayed in the heading of this edit page. - -=cut - -sub www_edit { - my $self = shift; - return WebGUI::Privilege::insufficient() unless ($self->canEdit); - my (@p) = @_; - my ($properties, $layout, $privileges, $heading, $helpId, $headingId) = - rearrange([qw(properties layout privileges heading helpId headingId)], @p); - my ($f, $startDate, $displayTitle, $templatePosition, $endDate); - if ($self->get("wobjectId") eq "new") { - $displayTitle = 1; - } else { - $displayTitle = $self->get("displayTitle"); - } - my $title = $self->get("title") || $self->name; - $templatePosition = $self->get("templatePosition") || 1; - $startDate = $self->get("startDate") || $session{page}{startDate}; - $endDate = $self->get("endDate") || $session{page}{endDate}; - my %tabs; - tie %tabs, 'Tie::IxHash'; - %tabs = ( - properties=>{ - label=>WebGUI::International::get(893) - }, - layout=>{ - label=>WebGUI::International::get(105), - uiLevel=>5 - }, - privileges=>{ - label=>WebGUI::International::get(107), - uiLevel=>6 - } - ); - if ($self->{_useDiscussion}) { - $tabs{discussion} = { - label=>WebGUI::International::get(892), - uiLevel=>5 - }; - } - if($self->{_useMetaData}) { - $tabs{metadata} = { - label=>WebGUI::International::get('Metadata','MetaData'), - uiLevel=>5 - }; - } - $f = WebGUI::TabForm->new(\%tabs); - $f->hidden({name=>"wid",value=>$self->get("wobjectId")}); - $f->hidden({name=>"namespace",value=>$self->get("namespace")}) if ($self->get("wobjectId") eq "new"); - $f->hidden({name=>"func",value=>"editSave"}); - $f->getTab("properties")->readOnly( - -value=>$self->get("wobjectId"), - -label=>WebGUI::International::get(499), - -uiLevel=>3 - ); - $f->getTab("properties")->text("title",WebGUI::International::get(99),$title); - $f->getTab("layout")->yesNo( - -name=>"displayTitle", - -label=>WebGUI::International::get(174), - -value=>$displayTitle, - -uiLevel=>5 - ); - if ($self->{_useTemplate}) { - $f->getTab("layout")->template( - -value=>$self->getValue("templateId"), - -namespace=>$self->get("namespace"), - -afterEdit=>'func=edit&wid='.$self->get("wobjectId")."&namespace=".$self->get("namespace") - ); - } - $f->getTab("layout")->selectList( - -name=>"templatePosition", - -label=>WebGUI::International::get(363), - -value=>[$templatePosition], - -uiLevel=>5, - -options=>WebGUI::Page::getTemplatePositions($session{page}{templateId}), - -subtext=>WebGUI::Page::drawTemplate($session{page}{templateId}) - ); - $f->getTab("privileges")->dateTime( - -name=>"startDate", - -label=>WebGUI::International::get(497), - -value=>$startDate, - -uiLevel=>6 - ); - $f->getTab("privileges")->dateTime( - -name=>"endDate", - -label=>WebGUI::International::get(498), - -value=>$endDate, - -uiLevel=>6 - ); - my $subtext; - if (WebGUI::Grouping::isInGroup(3)) { - $subtext = '   '.WebGUI::International::get(7).''; - } else { - $subtext = ""; - } - if ($session{page}{wobjectPrivileges}) { - my $clause; - if (WebGUI::Grouping::isInGroup(3)) { - my $contentManagers = WebGUI::Grouping::getUsersInGroup(4,1); - push (@$contentManagers, $session{user}{userId}); - $clause = "userId in (".quoteAndJoin($contentManagers).")"; - } else { - $clause = "userId=".quote($self->getValue("ownerId")); - } - my $users = WebGUI::SQL->buildHashRef("select userId,username from users where $clause order by username"); - $f->getTab("privileges")->selectList( - -name=>"ownerId", - -options=>$users, - -label=>WebGUI::International::get(108), - -value=>[$self->getValue("ownerId")], - -subtext=>$subtext, - -uiLevel=>6 - ); - if (WebGUI::Grouping::isInGroup(3)) { - $subtext = '   '.WebGUI::International::get(5).''; - } else { - $subtext = ""; - } - $f->getTab("privileges")->group( - -name=>"groupIdView", - -label=>WebGUI::International::get(872), - -value=>[$self->getValue("groupIdView")], - -subtext=>$subtext, - -uiLevel=>6 - ); - $f->getTab("privileges")->group( - -name=>"groupIdEdit", - -label=>WebGUI::International::get(871), - -value=>[$self->getValue("groupIdEdit")], - -subtext=>$subtext, - -excludeGroups=>[1,7], - -uiLevel=>6 - ); - } else { - $f->hidden({name=>"ownerId",value=>$self->getValue("ownerId")}); - $f->hidden({name=>"groupIdView",value=>$self->getValue("groupIdView")}); - $f->hidden({name=>"groupIdEdit",value=>$self->getValue("groupIdEdit")}); - } - $f->getTab("properties")->HTMLArea( - -name=>"description", - -label=>WebGUI::International::get(85), - -value=>$self->get("description") - ); - $f->getTab("properties")->raw($properties); - $f->getTab("layout")->raw($layout); - $f->getTab("privileges")->raw($privileges); - if ($self->{_useDiscussion}) { - $f->getTab("discussion")->yesNo( - -name=>"allowDiscussion", - -label=>WebGUI::International::get(894), - -value=>$self->get("allowDiscussion"), - -uiLevel=>5 - ); - $f->getTab("discussion")->raw(WebGUI::Forum::UI::forumProperties($self->get("forumId"))); - } - if ($self->{_useMetaData}) { - my $meta = WebGUI::MetaData::getMetaDataFields($self->get("wobjectId")); - foreach my $field (keys %$meta) { - my $fieldType = $meta->{$field}{fieldType} || "text"; - my $options; - # Add a "Select..." option on top of a select list to prevent from - # saving the value on top of the list when no choice is made. - if($fieldType eq "selectList") { - $options = {"", WebGUI::International::get("Select...","MetaData")}; - } - $f->getTab("metadata")->dynamicField($fieldType, - -name=>"metadata_".$meta->{$field}{fieldId}, - -label=>$meta->{$field}{fieldName}, - -uiLevel=>5, - -value=>$meta->{$field}{value}, - -extras=>qq/title="$meta->{$field}{description}"/, - -possibleValues=>$meta->{$field}{possibleValues}, - -options=>$options - ); - } - # Add a quick link to add field - $f->getTab("metadata")->readOnly( - -value=>'

'. - WebGUI::International::get('Add new field','MetaData'). - '

' - ); - } - return $self->adminConsole($f->print,$headingId,$helpId); -} - -#------------------------------------------------------------------- - -=head2 www_editSave ( [ hashRef ] ) - -Saves the default properties of any/all wobjects. - -B This method should only need to be extended if you need to do some special validation. - -=head3 hashRef - -A hash reference of extra properties to set. - -=cut - -sub www_editSave { - my $self = shift; - my $extras = shift; - return WebGUI::Privilege::insufficient() unless ($self->canEdit); - my %set; - foreach my $key (keys %{$self->{_wobjectProperties}}) { - my $temp = WebGUI::FormProcessor::process( - $key, - $self->{_wobjectProperties}{$key}{fieldType}, - $self->{_wobjectProperties}{$key}{defaultValue} - ); - $set{$key} = $temp if (defined $temp); - } - $set{title} = $session{form}{title} || $self->name; - foreach my $key (keys %{$self->{_extendedProperties}}) { - my $temp = WebGUI::FormProcessor::process( - $key, - $self->{_extendedProperties}{$key}{fieldType}, - $self->{_extendedProperties}{$key}{defaultValue} - ); - $set{$key} = $temp if (defined $temp); - } - %set = (%set, %{$extras}); - $set{forumId} = WebGUI::Forum::UI::forumPropertiesSave() if ($self->{_useDiscussion}); - $self->set(\%set); - WebGUI::MetaData::metaDataSave($self->get("wobjectId")) if ($self->{_useMetaData}); - return ""; -} - -#------------------------------------------------------------------- - -=head2 www_moveBottom ( ) - -Moves this instance to the bottom of the page. - -=cut - -sub www_moveBottom { - my $self = shift; - if ($self->canEdit) { - $self->set({sequenceNumber=>99999}); - _reorderWobjects($self->get("pageId")); - return ""; - } else { - return WebGUI::Privilege::insufficient(); - } -} - -#------------------------------------------------------------------- - -=head2 www_moveDown ( ) - -Moves this instance down one spot on the page. - -=cut - -sub www_moveDown { - my ($wid, $thisSeq); - my $self = shift; - if ($self->canEdit) { - ($thisSeq) = WebGUI::SQL->quickArray("select sequenceNumber from wobject where wobjectId=".quote($self->get("wobjectId"))); - ($wid) = WebGUI::SQL->quickArray("select wobjectId from wobject where pageId=".quote($self->get("pageId")) - ." and sequenceNumber=".($thisSeq+1)); - if ($wid ne "") { - WebGUI::SQL->write("update wobject set sequenceNumber=sequenceNumber+1 where wobjectId=".quote($self->get("wobjectId"))); - WebGUI::SQL->write("update wobject set sequenceNumber=sequenceNumber-1 where wobjectId=".quote($wid)); - _reorderWobjects($self->get("pageId")); - } - return ""; - } else { - return WebGUI::Privilege::insufficient(); - } -} - -#------------------------------------------------------------------- - -=head2 www_moveTop ( ) - -Moves this instance to the top of the page. - -=cut - -sub www_moveTop { - my $self = shift; - if ($self->canEdit) { - $self->set({sequenceNumber=>0}); - _reorderWobjects($self->get("pageId")); - return ""; - } else { - return WebGUI::Privilege::insufficient(); - } -} - -#------------------------------------------------------------------- - -=head2 www_moveUp ( ) - -Moves this instance up one spot on the page. - -=cut - -sub www_moveUp { - my $self = shift; - my ($wid, $thisSeq); - if ($self->canEdit) { - ($thisSeq) = WebGUI::SQL->quickArray("select sequenceNumber from wobject where wobjectId=".quote($self->get("wobjectId"))); - ($wid) = WebGUI::SQL->quickArray("select wobjectId from wobject where pageId=".quote($self->get("pageId")) - ." and sequenceNumber=".($thisSeq-1)); - if ($wid ne "") { - WebGUI::SQL->write("update wobject set sequenceNumber=sequenceNumber-1 where wobjectId=".quote($self->get("wobjectId"))); - WebGUI::SQL->write("update wobject set sequenceNumber=sequenceNumber+1 where wobjectId=".quote($wid)); - _reorderWobjects($self->get("pageId")); - } - return ""; - } else { - return WebGUI::Privilege::insufficient(); - } -} - -#------------------------------------------------------------------- - -=head2 www_paste ( ) - -Moves this instance from the clipboard to the current page. - -=cut - -sub www_paste { - my $self = shift; - my ($output, $nextSeq); - if ($self->canEdit) { - ($nextSeq) = WebGUI::SQL->quickArray("select max(sequenceNumber) from wobject where pageId=".quote($session{page}{pageId})); - $nextSeq += 1; - WebGUI::SQL->write("UPDATE wobject SET " - ."pageId=".quote($session{page}{pageId}).", " - ."templatePosition=1, " - ."sequenceNumber=". $nextSeq .", " - ."bufferUserId=NULL, bufferDate=NULL, bufferPrevId=NULL " - ."WHERE wobjectId=".quote($self->get("wobjectId"))); - return ""; - } else { - return WebGUI::Privilege::insufficient(); - } -} - -#------------------------------------------------------------------- - -=head2 www_view ( ) - -The default display mechanism for any wobject. This web method MUST be overridden. - -=cut - -sub www_view { - my $self = shift; - return WebGUI::Privilege::insufficient unless ($self->canView); - return $self->displayTitle.$self->description; -} - -1; - diff --git a/lib/WebGUI/i18n/English/Collaboration.pm b/lib/WebGUI/i18n/English/Collaboration.pm new file mode 100644 index 000000000..dfab63e42 --- /dev/null +++ b/lib/WebGUI/i18n/English/Collaboration.pm @@ -0,0 +1,7 @@ +package WebGUI::i18n::English::Collaboration; + +our $I18N = { + +}; + +1; diff --git a/lib/WebGUI/i18n/English/USS.pm b/lib/WebGUI/i18n/English/USS.pm deleted file mode 100644 index 2e5ed5000..000000000 --- a/lib/WebGUI/i18n/English/USS.pm +++ /dev/null @@ -1,905 +0,0 @@ -package WebGUI::i18n::English::USS; - -our $I18N = { - '33' => { - message => q|Attachment|, - lastUpdated => 1031514049 - }, - - '32' => { - message => q|Image|, - lastUpdated => 1031514049 - }, - - '21' => { - message => q|Submitted By|, - lastUpdated => 1031514049 - }, - - '90' => { - message => q|Edit Link|, - lastUpdated => 1031514049 - }, - - '71' => { - message => q|User Submission Systems (USS) are a great way to add a sense of community to any site as well as get free content from your users. The User Submission System name is misleading to some people, because they immediately think of users as visitors. However, users are also staff, or business partners, or even yourself. With the USS you can select who can add new content, and even who can moderate that content. -

-User Submission systems are so versatile that they allow you to create all kinds of applications, just by editing a few templates. Example applications are Photo Galleries, FAQs, Link Lists, Guest Books, Classifieds, and more. - - -

-Submission Template
-Choose a layout for the individual submissions. -

- -Submission Form Template
-Choose a layout of the form users see when submitting content. -

- - -Submissions Per Page
-How many submissions should be listed per page in the submissions index? -

- - -Filter Content
-Select the level of content filtering you wish to perform on all submitted content. -

- -Sort By
-The field to sort the submission list by. -

- -Sort Order
-The direction to sort the submission list by. -

- - - - -Who can approve?
-What group is allowed to approve and deny content? -

- -Who can contribute?
-What group is allowed to contribute content? -

- - -Default Status
-Should submissions be set to Approved, Pending, or Denied by default? -

-Note: If you set the default status to Pending, then be prepared to monitor your message log for new submissions. -

- -Karma Per Submission
-How much karma should be given to a user when they contribute to this user submission system? -

- - -Allow discussion?
-Checking this box will enable responses to your article much like Articles on Slashdot.org. -

- - -|, - lastUpdated => 1070199700 - }, - - '80' => { - message => q|Sort Order|, - lastUpdated => 1066636329 - }, - - '17' => { - message => q|Are you certain you wish to delete this submission?|, - lastUpdated => 1031514049 - }, - - '2' => { - message => q|Who can contribute?|, - lastUpdated => 1031514049 - }, - - '1' => { - message => q|Who can approve?|, - lastUpdated => 1031514049 - }, - - '88' => { - message => q|Sequence|, - lastUpdated => 1070027660 - }, - - '18' => { - message => q|Edit User Submission System|, - lastUpdated => 1031514049 - }, - - '30' => { - message => q|Karma Per Submission|, - lastUpdated => 1031514049 - }, - - '16' => { - message => q|Untitled|, - lastUpdated => 1031514049 - }, - - '82' => { - message => q|Descending|, - lastUpdated => 1066636432 - }, - - '74' => { - message => q|User Submission System Template|, - lastUpdated => 1038865585 - }, - - '27' => { - message => q|Edit|, - lastUpdated => 1031514049 - }, - - '84' => { - message => q|Edit Question|, - lastUpdated => 1031514049 - }, - - '28' => { - message => q|Return To Submissions List|, - lastUpdated => 1031514049 - }, - - '75' => { - message => q|This is the listing of template variables available in user submission system templates. -

- -readmore.label
-A translated label that indicates that the user should click to read more. -

- -responses.label
-A translated label that indicates that the user should click to view the responses to this submission. -

- -canPost
-A condition that indicates whether a user can add a new submission. -

- -post.url
-The URL to add a new submission. -

- -post.label
-A translated label for the post link. -

- -addquestion.label
-A translated label that prompts the user to add a question to the USS. -

- -addlink.label
-A translated label that prompts the user to add a link to the USS. -

- -search.label
-A translated label for the search link. -

- -search.url
-The URL to toggle on/off WebGUI's power search form. -

- -search.form
-WebGUI's power search form. -

- -rss.url
-The URL to generate an RSS feed from the content in the USS. -

- -canModerate
-A condition indicating whether the current user has the rights to moderate posts in this USS. -

- -title.label
-A translated label for the title column. -

- -thumbnail.label
-A translated label for the thumbnail column. -

- -date.label
-A translated label for the date column. -

- -date.updated.label
-The translated label indicating what date this submission was last edited. -

- -by.label
-A translated label stating who the submission was submitted by. -

- -submission.edit.label
-A translated text label that prompts the user to edit a particular submission. -

- -submissions_loop
-A loop containing each submission. -

- -submission.inDateRange -A boolean value indicating whether or not the submission is within the specified date range. -

- -submission.id
-A unique identifier for this submission. -

- -submission.url
-The URL to view this submission. -

- -submission.content
-The abbreviated text content of this submission. -

- -submission.content.full
-The full text content of this submission. -

- - -submission.responses
-The number of responses to this submission. -

- -submission.title
-The title for this submission. -

- -submission.userDefined1 - submission.userDefined5
-A series of user defined fields to add custom functionality to the USS. -

- -submission.userId
-The user id of the user that posted this submission. -

- -submission.username
-The username of the person that posted this submission. -

- -submission.status
-The status of this submission (approved, pending, denied). -

- -submission.thumbnail
-The thumbnail of the image uploaded with this submission (if any). -

- -submission.image
-The URL of the image attached to this submission. -

- - -submission.date
-The that this submission was posted. -

- -submission.date.updated
-A human readable date that displays the date and time this submission was last edited. -

- -submission.currentUser
-A condition indicating whether the current user is the same as the user that posted this submission. -

- -submission.userProfile
-The URL to the profile of the user that posted this submission. -

- -submission.edit.url
-The URL to edit this submission. -

- - -submission.secondColumn
-A condition indicating whether or not this submission would belong in the second column, in a multi-column layout. -

- -submission.thirdColumn
-A condition indicating whether or not this submission would belong in the third column, in a multi-column layout. -

- -submission.fourthColumn
-A condition indicating whether or not this submission would belong in the fourth column, in a multi-column layout. -

- -submission.fifthColumn
-A condition indicating whether or not this submission would belong in the fifth column, in a multi-column layout. -

- -submission.controls
-The administrative toolbar for each submission. -

- -

-

- -|, - lastUpdated => 1082367203 - }, - - '57' => { - message => q|Responses|, - lastUpdated => 1031514049 - }, - - '83' => { - message => q|Add a new question.|, - lastUpdated => 1031514049 - }, - - '61' => { - message => q|User Submission System, Add/Edit|, - lastUpdated => 1047859664 - }, - - '20' => { - message => q|Post New Submission|, - lastUpdated => 1031514049 - }, - - '14' => { - message => q|Status|, - lastUpdated => 1031514049 - }, - - '59' => { - message => q|Next Submission|, - lastUpdated => 1031514049 - }, - - '92' => { - message => q|Open in new window?|, - lastUpdated => 1031514049 - }, - - '89' => { - message => q|Add a new link.|, - lastUpdated => 1031514049 - }, - - '31' => { - message => q|Content|, - lastUpdated => 1031514049 - }, - - '35' => { - message => q|Title|, - lastUpdated => 1031514049 - }, - - '53' => { - message => q|Layout|, - lastUpdated => 1031514049 - }, - - '91' => { - message => q|URL|, - lastUpdated => 1031514049 - }, - - '78' => { - message => q|Date Updated|, - lastUpdated => 1066636183 - }, - - '79' => { - message => q|Sort By|, - lastUpdated => 1066636255 - }, - - '48' => { - message => q|Allow discussion?|, - lastUpdated => 1031514049 - }, - - '87' => { - message => q|Submission Form Template|, - lastUpdated => 1070027660 - }, - - '93' => { - message => q|Submission Form Template|, - lastUpdated => 1070199365 - }, - - '77' => { - message => q|The following are the template variables used in a submission template. Submission templates are used to display the individual submissions in a user submission system. -

- -title
-The title of this submission. -

- -content
-The full text content of this submission. -

- -user.label
-The translated label indicating what user posted this submission. -

- -user.profile
-The URL to the profile of the user that posted this submission. -

- -user.username
-The username of the user that posted this submission. -

- -user.id
-The unique identifier for the user that posted this submission. -

- -date.label
-The translated label indicating what date this submission was posted. -

- -date.epoch
-The number of seconds since January 1, 1970 that this submission was posted. -

- -date.human
-A human readable date that displays the date and time this submission was posted. -

- -date.updated.label
-The translated label indicating what date this submission was last edited. -

- -date.updated.epoch
-The number of seconds since January 1, 1970 that this submission was last edited. -

- -date.updated.human
-A human readable date that displays the date and time this submission was last edited. -

- -status.label
-A translated label indicating the status of this submission. -

- -status.status
-The actual status of this submission (pending, approved, denied). -

- -views.label
-A translated label indicating how many times this submission has been viewed. -

- -views.count
-The number of times this submission has been viewed. -

- -canPost
-An condition indicating whether or not this user can post a new submission. -

- -post.url
-The URL to post a new submission. -

- -post.label
-A translated label for the post link. -

- -previous.more
-An condition indicating whether there are any posts prior to this one available for viewing. -

- -previous.url
-A URL to the post that came before this one. -

- -previous.label
-A translated label for the previous link. -

- -next.more
-A condition indicating whether there are any posts after this one available for viewing. -

- -next.url
-The URL to the post that came after this one. -

- -next.label
-A translated label for the next link. -

- -canEdit
-A condition indicating whether the current user cane edit or delete this post. -

- -edit.url
-The URL to edit this post. -

- -edit.label
-A translated label for the edit link. -

- -delete.url
-The URL to delete this post. -

- -delete.label
-A translated label for the delete link. -

- -canChangeStatus
-A condition indicating whether the current user has the privileges to change the status of this post. -

- -approve.url
-The URL to approve this post. -

- -approve.label
-A translated label for the approve link. -

- -deny.url
-The URL to deny this post. -

- -deny.label
-A translated label for the deny link. -

- -leave.url
-The URL to leave this post in it's current state. -

- -leave.label
-A translated label for the leave link. -

- -canReply
-A condition indicating whether the current user can reply to this post. -

- -reply.url
-The URL to reply to this post. -

- -reply.label
-A translated label for the reply link. -

- -search.url
-The URL to toggle on the WebGUI power search form. -

- -search.label
-A translated label for the search link. -

- -back.url
-The URL to return the user to the main listing. -

- -back.label
-A translated label for the back link. -

- -replies
-A complete listing of all replies to this post. -

- -userDefined1.value - userDefined5.value
-A series of user defined values that can be used to extend the functionality of the USS. -

- -image.url
-The URL to the attached image. -

- -image.thumbnail
-The URL to the attached image's thumbnail. -

- -attachment.box
-A standard WebGUI attachment box which displays the icon for the file, and the filename, along with an attachment icon and all are linked to the file. -

- -attachment.url
-The URL to the attached file. -

- -attachment.icon
-The icon that represents the attached file's type. -

- -attachment.name
-The filename of the attached file. -

- - -|, - lastUpdated => 1070197000 - }, - - '46' => { - message => q|Read more...|, - lastUpdated => 1031514049 - }, - - '13' => { - message => q|Date Submitted|, - lastUpdated => 1031514049 - }, - - '29' => { - message => q|User Submission System|, - lastUpdated => 1031514049 - }, - - '6' => { - message => q|Submissions Per Page|, - lastUpdated => 1031514049 - }, - - '39' => { - message => q|Post a Reply|, - lastUpdated => 1031514049 - }, - - '85' => { - message => q|Question|, - lastUpdated => 1031514049 - }, - - '3' => { - message => q|You have a new user submission to approve.|, - lastUpdated => 1031514049 - }, - - '94' => { - message => q|The following template variables are available to you when building your submission form templates. -

- -submission.isNew
-A condition indicating whether this is a new submission being contributed. -

- -link.header.label
-A header telling the user they are editing a link. -

- -question.header.label
-A header telling the user they are editing a question. -

- -submission.header.label
-A header telling the user they are editing a submission. -

- -user.isVisitor
-A condition indicating whether the current user is a visitor. -

- -visitorName.label
-A label for the visitorName.form variable. -

- -visitorName.form
-A text box that allows a visitor (non-logged in user) to enter their own name instead of submitting completely anonymously. -

- -form.header
-All the information necessary to route the form contents back to WebGUI. -

- -url.label
-A generic label for a URL field. -

- -newWindow.label
-A generic label for a field asking the user whether they would like links to pop up new windows. -

- -userDefined1.form - userDefined5.form
-A series of generic text fields that can be used to extend the functionality of the USS. -

- -userDefined1.form.yesNo - userDefined5.form.yesNo
-Yes / No versions of the user defined fields. -

- -userDefined1.form.textarea - userDefined5.form.textarea
-Textarea versions of the user defined fields. -

- -userDefined1.value - userDefined5.value
-The raw values of the user defined fields. -

- -question.label
-A label prompting the user to enter a question. -

- -title.label
-A label prompting the user to enter a title. -

- -title.form
-A text field for titles or headers for each submission. -

- -title.form.textarea
-A textarea version of the title.form field. -

- -title.value
-The raw value of the title field. -

- -body.label
-A label for the body.form variable. -

- -answer.label
-Another label for the body.form variable. -

- -description.label
-Another label for the body.form variable. -

- -body.form
-An HTML Area field allowing the user to enter descriptive content of this submission. -

- -body.value
-The raw content of the body.form field. -

- -body.form.textarea
-A textarea version of body.form. -

- -image.label
-A label for the image.form variable. -

- -image.form
-A field allowing the user to pick an image from his/her hard drive. -

- -attachment.label
-A label for the attachment.form variable. -

- -attachment.form
-A field allowing the user to pick a file from his/her hard drive to attach to this submission. -

- -contentType.label
-A label for the contentType.form variable. -

- -contentType.form
-A field allowing the user to select the type of content contained in the form.body field. -

- -startDate.label
-A label for the startDate.form variable. -

- -startDate.form
-A field allowing the user to select the first date the submission should be visible on the USS list. -

- -endDate.label
-A label for the endDate.form variable. -

- -endDate.form
-A field allowing the user to select the last date the submission should be visible on the USS list. -

- -form.submit
-A submit button. -

- -form.footer
-The bottom of the form. -

-|, - lastUpdated => 1070199365 - }, - - '51' => { - message => q|Display thumbnails?|, - lastUpdated => 1031514049 - }, - - '41' => { - message => q|Date|, - lastUpdated => 1031514049 - }, - - '58' => { - message => q|Previous Submission|, - lastUpdated => 1031514049 - }, - - '12' => { - message => q|(Uncheck if you're writing an HTML submission.)|, - lastUpdated => 1031514049 - }, - - '47' => { - message => q|Post a Response|, - lastUpdated => 1031514049 - }, - - '15' => { - message => q|Edit/Delete|, - lastUpdated => 1031514049 - }, - - '81' => { - message => q|Ascending|, - lastUpdated => 1066636389 - }, - - '52' => { - message => q|Thumbnail|, - lastUpdated => 1031514049 - }, - - '4' => { - message => q|Your submission has been approved.|, - lastUpdated => 1031514049 - }, - - '73' => { - message => q|Submission Template|, - lastUpdated => 1036277524 - }, - - '37' => { - message => q|Delete|, - lastUpdated => 1031514049 - }, - - '76' => { - message => q|Submission Template|, - lastUpdated => 1038867009 - }, - - '86' => { - message => q|Answer|, - lastUpdated => 1031514049 - }, - - '19' => { - message => q|Edit Submission|, - lastUpdated => 1031514049 - }, - - '5' => { - message => q|Your submission has been denied.|, - lastUpdated => 1031514049 - }, - -}; - -1; diff --git a/lib/WebGUI/i18n/English/WebGUI.pm b/lib/WebGUI/i18n/English/WebGUI.pm index fd9a51348..826cad791 100644 --- a/lib/WebGUI/i18n/English/WebGUI.pm +++ b/lib/WebGUI/i18n/English/WebGUI.pm @@ -46,11 +46,6 @@ our $I18N = { lastUpdated => 1044705246 }, - '1065' => { - message => q|Forum Post Form Template|, - lastUpdated => 1066581759 - }, - '358' => { message => q|Left Column|, lastUpdated => 1031514049 @@ -76,31 +71,11 @@ our $I18N = { lastUpdated => 1031514049 }, - '580' => { - message => q|Your message has been denied.|, - lastUpdated => 1031514049 - }, - - '1031' => { - message => q|Forum Template|, - lastUpdated => 1066034528 - }, - - '1020' => { - message => q|Rating|, - lastUpdated => 1065280882 - }, - '84' => { message => q|Group Name|, lastUpdated => 1031514049 }, - '512' => { - message => q|Go to next thread|, - lastUpdated => 1065280309 - }, - '437' => { message => q|Statistics|, lastUpdated => 1031514049, @@ -583,176 +558,6 @@ The URL of the web site for this theme's designer. If you are in the business of lastUpdated => 1031514049 }, - '1068' => { - message => q|The following variables are available in the search template. -

- -callback.url
-The url that links back to the calling object such as an Article or User Submission System. -

- -callback.label
-The default label for callback.url. -

- -form.begin
-The search form header. -

- -search.label
-The default label for the search page. -

- -all.label
-The default label for all.form. -

- -all.form
-The form element for searching based on all words. -

- -exactphrase.label
-The default label for exactphrase.form. -

- -exactphrase.form
-The form element for searching based on an exact phrase. -

- -without.label
-The default label for without.form. -

- -without.form
-The form element for searching based on words that cannot be found in the text. -

- -atleastone.label
-The default label for atleastone.form. -

- -atleastone.form
-The form element for searching where at least one of the words must exist in the text. -

- -results.label
-The default label for results.form. -

- -results.form
-The form element for selecting how many results per page should be returned. -

- -form.search
-The search button. -

- -form.end
-The form footer. -

- -thread.list.url
-A url that goes back to the thread list (aka forum). -

- -thread.list.label
-The default label for thread.list.url. -

- -post.subject.label
-The default label for the subject column. -

- -post.date.label
-The default label for the date column. -

- -post.user.label
-The default label for the author column. -

- -post_loop
-A loop containing all of the search results. -

- -

- -post.subject
-The post subject. -

- -post.url
-The url to view the post. -

- -post.epoch
-The epoch date of the post. -

- -post.date
-The human readable date of the post. -

- -post.time
-The human readable time of the post. -

- -post.user.id
-The userId of the poster. -

- -post.user.name
-The username of the poster. -

- -post.user.alias
-The current alias of the poster. -

- -post.user.profile
-The url of the poster's profile. -

- -

- -

- -firstpage
-A link to the first page in a multi-page listing. -

- -lastpage
-A link to the last page in a multi-page listing. -

- -nextpage
-A link to the next page in a multi-page listing. -

- -pagelist
-A series of links to every page in a multi-page listing. -

- -previouspage
-A link to the previous page in a multi-page listing. -

- -multiplepages
-A conditional indicating whether there are multiple pages or not. -

- -numberOfPages
-The number of pages in a multiple page listing. -

- -pageNumber
-The number of the current page in a multi-page listing. -

- -|, - lastUpdated => 1099614588 - }, - '950' => { message => q|Empty clipboard.|, lastUpdated => 1052850265 @@ -763,11 +568,6 @@ The number of the current page in a multi-page listing. lastUpdated => 1031514049 }, - '1025' => { - message => q|Add edit stamp to posts?|, - lastUpdated => 1031514049 - }, - '509' => { message => q|Discussion Layout|, lastUpdated => 1031514049 @@ -817,210 +617,6 @@ Be aware that any database links you create here will be available to all conten lastUpdated => 1031514049 }, - '1061' => { - message => q|These are the template variables for the thread template. -

- -callback.url
-The url to the calling object such as an article or a user submission. -

- -callback.label
-The default label for callback.url -

- -user.canpost
-A conditional indicating whether the current user can post a new message. -

- -user.isVisitor
-A conditional indicating whether the current user is a visitor. -

- -user.isModerator
-A conditional indicating whether the current user is a moderator. -

- -user.isSubscribed
-A conditional indicating whether the current user is subscribed to this thread. -

- -thread.layout.nested.label
-The default label for thread.layout.nested.url. -

- -thread.layout.nested.url
-A url that will change the layout of the thread to nested. -

- -thread.layout.flat.url
-A url that will change the layout of the thread to flat. -

- -thread.layout.flat.label
-The default label for thread.layout.flat.url. -

- -thread.layout.threaded.label
-The default label for thread.layout.threaded.url. -

- -thread.layout.threaded.url
-A url that will change the layout of the thread to threaded. -

- -thread.layout.isThreaded
-A conditional indicating whether the thread layout is threaded. -

- -thread.layout.isNested
-A conditional indicating whether the thread layout is nested. -

- -thread.layout.isFlat
-A conditional indicating whether the thread layout is flat. -

- -thread.subscribe.url
-A url that will subscribe the current user to this thread. -

- -thread.subscribe.label
-The default label for thread.subscribe.url. -

- -thread.unsubscribe.url
-A url that will unsubscribe the current user from this thread. -

- -thread.unsubscribe.label
-The default label for thread.unsubscribe.url. -

- -thread.isSticky
-A conditional indicating whether the thread is sticky. -

- -thread.stick.url
-A url that will make this thread sticky. -

- -thread.stick.label
-The default label for thread.stick.url. -

- -thread.unstick.url
-A url that will make a sticky thread unstick. -

- -thread.unstick.label
-The default label for thread.unstick.url. -

- -thread.isLocked
-A conditional indicating whether this thread is locked. -

- -thread.lock.url
-A url that will lock this thread. -

- -thread.lock.label
-The default label for thread.lock.url. -

- -thread.unlock.url
-A url that will unlock this thread. -

- -thread.unlock.label
-The default label for thread.unlock.url. -

- -post_loop
-A loop containing all the posts in this thread. -

- -

- -post.indent_loop
-A loop to be used for indenting. -

-

-depth
-An integer indicating the depth. Not really useful, just hear to fill out the loop. -
-

- -post.indent.depth
-An integer indicating how many levels deep this post is. -

- -post.isCurrent
-A conditional indicating whether this post is the one selected for viewing by the user. -

- -NOTE: All of the variables from the post template are also available here. - -

- -

- -thread.subject.label
-The default label for subjects. -

- -thread.date.label
-The default label for dates. -

- -thread.user.label
-The default label for authors. -

- -thread.new.url
-A url to create a new url. -

- -thread.new.label
-The default label for thread.new.url. -

- -thread.previous.url
-A url that will display the previous thread. -

- -thread.previous.label
-The default label for thread.previous.url. -

- -thread.next.url
-A url that will display the next thread. -

- -thread.next.label
-The default label for thread.next.url. -

- -thread.list.url -A url to take the user back to the thread list (aka the forum). -

- -thread.list.label
-The default label for thread.list.url. -

- -forum.title
-The title of this forum as passed by the calling object. -

- -forum.description
-The description of this forum as passed by the calling object. -

- -|, - lastUpdated => 1099613369 - }, '485' => { message => q|Boolean (Checkbox)|, @@ -1178,11 +774,6 @@ How should this user be notified when they get a new WebGUI message? lastUpdated => 1031514049 }, - '1040' => { - message => q|Lock|, - lastUpdated => 1066073923 - }, - '999' => { message => q|Database Link, Delete|, lastUpdated => 1056151382 @@ -1198,11 +789,6 @@ How should this user be notified when they get a new WebGUI message? lastUpdated => 1031514049 }, - '1012' => { - message => q|Lock this thread?|, - lastUpdated => 1060433963 - }, - '430' => { message => q|Last Page View|, lastUpdated => 1031514049 @@ -1218,11 +804,6 @@ How should this user be notified when they get a new WebGUI message? lastUpdated => 1031514049 }, - '1032' => { - message => q|Thread Template|, - lastUpdated => 1066034586 - }, - '901' => { message => q|Add a new theme.|, lastUpdated => 1050190107 @@ -1273,11 +854,6 @@ How should this user be notified when they get a new WebGUI message? lastUpdated => 1031514049 }, - '1056' => { - message => q|Forum Template|, - lastUpdated => 1066576831 - }, - '535' => { message => q|Group To Alert On New User|, lastUpdated => 1031514049 @@ -1288,11 +864,6 @@ How should this user be notified when they get a new WebGUI message? lastUpdated => 1031514049 }, - '1022' => { - message => q|Subscribe to discussion|, - lastUpdated => 1065875027 - }, - '77' => { message => q|That account name is already in use by another member of this site. Please try a different username. The following are some suggestions:|, lastUpdated => 1031514049 @@ -1308,11 +879,6 @@ How should this user be notified when they get a new WebGUI message? lastUpdated => 1031514049 }, - '541' => { - message => q|Karma Per Post|, - lastUpdated => 1031514049 - }, - '39' => { message => q|You do not have sufficient privileges to access this page.|, lastUpdated => 1031514049 @@ -1396,11 +962,6 @@ As with any delete operation, you are prompted to be sure you wish to proceed wi lastUpdated => 1033836678 }, - '875' => { - message => q|A new message has been posted to one of your subscriptions.|, - lastUpdated => 1065874019 - }, - '1' => { message => q|Add content...|, lastUpdated => 1031514049 @@ -1511,16 +1072,6 @@ As with any delete operation, you are prompted to be sure you wish to proceed wi lastUpdated => 1031514049 }, - '874' => { - message => q|Unsubscribe from thread|, - lastUpdated => 1065876868 - }, - - '1062' => { - message => q|Forum Notification Template|, - lastUpdated => 1066580520 - }, - '975' => { message => q|Users can remove themselves?|, lastUpdated => 1053778962 @@ -1536,11 +1087,6 @@ As with any delete operation, you are prompted to be sure you wish to proceed wi lastUpdated => 1031514049 }, - '1033' => { - message => q|Post Template|, - lastUpdated => 1066034603 - }, - '445' => { message => q|Preferences|, lastUpdated => 1031514049 @@ -1795,11 +1341,6 @@ The user id of the currently logged in user. lastUpdated => 1031514049 }, - '1019' => { - message => q|Back to thread list|, - lastUpdated => 1065280160 - }, - '700' => { message => q|Day(s)|, lastUpdated => 1031514049 @@ -1847,11 +1388,6 @@ The user id of the currently logged in user. lastUpdated => 1056151382 }, - '515' => { - message => q|Add edit stamp to posts?|, - lastUpdated => 1031514049 - }, - '138' => { message => q|Yes|, lastUpdated => 1031514049 @@ -1984,11 +1520,6 @@ If you leave this on the default setting you'll be redirected to the new page af lastUpdated => 1031879593 }, - '1067' => { - message => q|Forum Search Template|, - lastUpdated => 1066582842 - }, - '432' => { message => q|Expires|, lastUpdated => 1031514049 @@ -2039,20 +1570,6 @@ That particular example will help you get good ranking on search engines. lastUpdated => 1050232236 }, - '1063' => { - message => q|These are the variables available in the forum notification template. - -

-notify.subscription.message
-A message stating that the user is receiving the message because they subscribed to the forum or thread. -

- -NOTE: The notification template also includes all the variables from the post template. -

-|, - lastUpdated => 1066580520 - }, - '17' => { message => q|March|, lastUpdated => 1031514049 @@ -2128,11 +1645,6 @@ A message stating that the user is receiving the message because they subscribed lastUpdated => 1031514049 }, - '1034' => { - message => q|Post Form Template|, - lastUpdated => 1066034620 - }, - '426' => { message => q|Login History|, lastUpdated => 1031514049, @@ -2488,11 +2000,6 @@ The Connect DN is the cn (or common name) of a given user in your LDAP da lastUpdated => 1044138790 }, - '513' => { - message => q|Go to previous thread|, - lastUpdated => 1065280287 - }, - 'groups default body' => { message => q|There are several groups built into WebGUI:

@@ -2686,11 +2193,6 @@ One package that many people create is a Page/Article package. It is often the c lastUpdated => 1031514049 }, - '1038' => { - message => q|Unstick|, - lastUpdated => 1066065454 - }, - '53' => { message => q|Make Page Printable|, lastUpdated => 1031514049 @@ -2702,7 +2204,7 @@ One package that many people create is a Page/Article package. It is often the c }, '626' => { - message => q|Wobjects (formerly known as Widgets) are the true power of WebGUI. Wobjects are tiny pluggable applications built to run under WebGUI. Articles, message boards and polls are examples of wobjects. + message => q|Wobjects are the true power of WebGUI. Wobjects are tiny pluggable applications built to run under WebGUI. Articles, message boards and polls are examples of wobjects.

To add a wobject to a page, first go to that page, then select Add Content... from the upper left corner of your screen. Each wobject has it's own help so be sure to read the help if you're not sure how to use it. @@ -2847,11 +2349,6 @@ Loops come with special condition variables of their own. They are __FIRST__, __ lastUpdated => 1031514049 }, - '1064' => { - message => q|Post a Message|, - lastUpdated => 1066580782 - }, - '951' => { message => q|Are you certain that you wish to empty the clipboard to the trash?|, lastUpdated => 1052850265 @@ -3000,16 +2497,6 @@ You also cannot import a theme from a version of WebGUI that is newer than the o lastUpdated => 1066641432 }, - '1013' => { - message => q|Make sticky?|, - lastUpdated => 1060434033 - }, - - '233' => { - message => q|(eom)|, - lastUpdated => 1031514049 - }, - '57' => { message => q|This is only necessary if you wish to use features that require Email.|, lastUpdated => 1031514049 @@ -3188,11 +2675,6 @@ The translated label for the link to the home page or the text that you supply t lastUpdated => 1031514049 }, - '1028' => { - message => q|Moderate posts?|, - lastUpdated => 1065966284 - }, - '812' => { message => q|Your message has been sent.|, lastUpdated => 1037580328 @@ -3203,203 +2685,6 @@ The translated label for the link to the home page or the text that you supply t lastUpdated => 1036971944 }, - '1059' => { - message => q|The following are the template variables available in the post template. -

- -callback.url
-The url back to the calling object such as an article or user submission. -

- -callback.label
-The default label for callback.url. -

- -post.subject
-The subject of this post. -

- -post.subject.label
-The default label for post.subject -

- -post.message
-The message of this post. -

- -user.canPost
-A conditional indicating whether the current user can post a new message. -

- -post.date.value
-A human readable date for this post. -

- -post.date.epoch
-The epoch date for this post. -

- -post.time.value
-The human readable time for this post. -

- -post.date.label
-The default label for post.date.value. -

- -post.rating.value
-The average rating of this post. -

- -post.rating.label
-The default label for post.date.value. -

- -post.views.value
-The number of views for this post. -

- -post.views.label
-The default label for post.views.value. -

- -post.status.value
-the status of this post. -

- -post.status.label
-The default label for post.status.value. -

- -post.isLocked
-A conditional indicating whether the thread this post is in is locked. -

- -post.isModerator
-A conditional indicating whether the current user is a moderator. -

- -post.canEdit
-A conditional indicating whether the current user can edit this post. -

- -post.user.isVisitor
-A conditional indicating whether the poster was a visitor. -

- -post.user.id
-The userId of the poster. -

- -post.user.name
-The poster's username. -

- -post.user.alias
-The poster's current alias. -

- -post.user.profile
-The url to the poster's profile. -

- -post.url
-The url to display this post. -

- -post.id
-The unique id of this post. -

- -post.rate.label
-The default label for post.rate.url.1. -

- -post.rate.url.1
-The url to give this post a rating of 1. -

- -post.rate.url.2
-The url to give this post a rating of 2. -

- - -post.rate.url.3
-The url to give this post a rating of 3. -

- - -post.rate.url.4
-The url to give this post a rating of 4. -

- - -post.rate.url.5
-The url to give this post a rating of 5. -

- -post.hasRated
-A conditional indicating whether the current user has already rated this post. -

- -post.reply.label
-The default label for post.reply.url. -

- -post.reply.url
-The url to reply to this post. -

- -post.reply.withquote.url
-The url to reply to this post and quote this post in doing so. -

- -post.edit.label
-The default label for post.edit.url. -

- -post.edit.url
-The url to edit this post. -

- -post.delete.url
-The url to delete this post. -

- -post.delete.label
-The default label for post.delete.url. -

- -post.approve.label
-The default label for post.approve.url. -

- -post.approve.url
-The url to approve this post. -

- -post.deny.url
-The url to deny this post. -

- -post.deny.label
-The default label for post.deny.url. -

- -post.full
-The full post rendered using the post template. This would never be used in the post template directly, but is often used in other templates that embed the post template's variables. -

- -forum.title
-The title of this forum as passed by the calling object. -

- -forum.description
-The description of this forum as passed by the calling object. -

-|, - lastUpdated => 1099613407 - }, '327' => { message => q|Home Country|, @@ -3554,11 +2839,6 @@ Large sites using external group data will be making many calls to the external lastUpdated => 1053278089 }, - '894' => { - message => q|Allow discussion?|, - lastUpdated => 1031514049 - }, - '24' => { message => q|October|, lastUpdated => 1031514049 @@ -3709,21 +2989,11 @@ The toolbar for manipulating the properties of the page. lastUpdated => 1031514049 }, - '1037' => { - message => q|Make sticky|, - lastUpdated => 1066065402 - }, - '47' => { message => q|Home|, lastUpdated => 1031514049 }, - '1054' => { - message => q|Forum (Discussion) Properties|, - lastUpdated => 1066583000 - }, - '681' => { message => q|Packages, Creating|, lastUpdated => 1038889481 @@ -3772,307 +3042,6 @@ You can find out more about karma in - - -thread.isSticky
-A conditional indicating whether the thread is sticky and hence will appear at the top of the forum listing. -

- -thread.isLocked
-A conditional indicating whether the thread is locked from new posts. -

- -thread.root.subject
-The subject of the root post in this thread. -

- -thread.root.url
-The url to view the root post. -

- -thread.root.epoch
-An epoch date of the root post. -

- -thread.root.date
-A human readable date for the root post. -

- -thread.root.time
-A human readable time for the root post. -

- -thread.root.user.id
-The root poster's user id. -

- -thread.root.user.name
-The username of the root poster. -

- -thread.root.user.alias
-The alias of the root poster. -

- -thread.root.user.profile
-The url of the root poster's profile. -

- -thread.root.user.isVisitor
-A conditional indicating whether the root poster was a visitor. -

- -thread.root.status
-The status of the root post. -

- -thread.last.subject
-The subject of the last post made to this thread. -

- -thread.last.url
-The url to the last post. -

- -thread.last.epoch
-The post time of the last post represented as an epoch. -

- -thread.last.date
-The human readable date of the last post. -

- -thread.last.time
-The human readable time of the last post. -

- -thread.last.user.profile
-The url of the last posters profile. -

- -thread.last.user.id
-The userId of the last poster. -

- -thread.last.user.name
-The username of the last poster. -

- -thread.last.user.isVisitor
-A conditional indicating whether the last poster was a visitor. -

- -thread.last.status
-The status of the last post. -

- -forum.title
-The title of this forum as passed by the calling object. -

- -forum.description
-The description of this forum as passed by the calling object. -

- - - - -|, - lastUpdated => 1101775435 - }, '538' => { message => q|Karma Threshold|, @@ -4389,11 +3358,6 @@ A list of links to the 10 nearest in the paginator relative to the current page. lastUpdated => 1031514049 }, - '564' => { - message => q|Who can post?|, - lastUpdated => 1031514049 - }, - '905' => { message => q|Theme Designer|, lastUpdated => 1050191749 @@ -4537,11 +3501,6 @@ The local path of the directory where attachments are to be stored. (Perhaps /va lastUpdated => 1067951807 }, - '1036' => { - message => q|Threads|, - lastUpdated => 1066038155 - }, - '896' => { message => q|Cache Timeout (Visitors)|, lastUpdated => 1056292980 @@ -4754,11 +3713,6 @@ As with any delete operation, you are prompted to be sure you wish to proceed wi lastUpdated => 1031514049 }, - '892' => { - message => q|Discussion|, - lastUpdated => 1046637952 - }, - '942' => { message => q|Radio List|, lastUpdated => 1051464141 @@ -4799,11 +3753,6 @@ As with any delete operation, you are prompted to be sure you wish to proceed wi lastUpdated => 1031514049 }, - '1018' => { - message => q|Start a new thread|, - lastUpdated => 1065279960 - }, - '44' => { message => q|Yes, I'm sure.|, lastUpdated => 1031514049 @@ -4839,11 +3788,6 @@ As with any delete operation, you are prompted to be sure you wish to proceed wi lastUpdated => 1031514049 }, - '231' => { - message => q|Posting New Message...|, - lastUpdated => 1031514049 - }, - '551' => { message => q|Notice|, lastUpdated => 1031514049 @@ -4874,11 +3818,6 @@ As with any delete operation, you are prompted to be sure you wish to proceed wi lastUpdated => 1031514049 }, - '1058' => { - message => q|Forum Post Template|, - lastUpdated => 1066576785 - }, - '987' => { message => q|Delete Database Link|, lastUpdated => 1056151382 @@ -4924,11 +3863,6 @@ As with any delete operation, you are prompted to be sure you wish to proceed wi lastUpdated => 1031514049 }, - '1023' => { - message => q|Unsubscribe from discussion|, - lastUpdated => 1065875186 - }, - '321' => { message => q|Cell Phone|, lastUpdated => 1031514049 @@ -4976,11 +3910,6 @@ Macros always begin with a caret (^) and follow with at least one other char lastUpdated => 1073152790 }, - '1041' => { - message => q|Unlock|, - lastUpdated => 1066073967 - }, - '729' => { message => q|0 Beginner|, lastUpdated => 1033836631 @@ -4996,11 +3925,6 @@ Macros always begin with a caret (^) and follow with at least one other char lastUpdated => 1031514049 }, - '401' => { - message => q|Are you certain you wish to delete this message and all messages under it in this thread?|, - lastUpdated => 1031514049 - }, - '808' => { message => q|Email this group.|, lastUpdated => 1037579487 @@ -5137,119 +4061,6 @@ You can search users based on username and email address. You can do partial sea lastUpdated => 1046637549 }, - '1066' => { - message => q|These are the template variables available to the post form template. -

- -newpost.header
-The default label for the heading of this form. -

- -newpost.isNewThread
-A conditional indicating whether this post is a new thread. -

- -newpost.isReply
-A conditional indicating whether this post is a reply. -

- -NOTE: If the post is a reply, then the template variables from the post template are included and populated with the data from the original message. -

- -newpost.isEdit
-A conditional indicating whether this post is an edit of an existing post. -

- -user.isVisitor
-A conditional indicating whether the current user is a visitor. -

- -newpost.isNewMessage
-A conditional basically opposite of newpost.isEdit. -

- -form.begin
-The form header. -

- -sticky.label
-The default label for sticky.form. -

- -sticky.form
-A form element for making the thread sticky. -

- -subscribe.label
-The default label for subscribe.form. -

- -subscribe.form
-A form element for subscribing to the thread. -

- -lock.label
-The default label for lock.form. -

- -lock.form
-A form element for locking the thread. -

- -contenttype.label
-The default label for contentType.form. -

- -contentType.form
-A form element for selecting what type of content is being posted. -

- -user.isModerator
-A conditional indicating whether the current user is a moderator. -

- -allowReplacements
-A conditional indicating whether this forum uses content filters. -

- - -message.label
-The default label for message.form. -

- -message.form
-The form element for the user to enter their message. -

- -visitorName.label
-The default label for visitorName.form. -

- -visitorName.form
-A form element that allows the user to enter a display name if they are a visitor. -

- -form.submit
-The submit button for the form. -

- -subject.label
-The default label for subject.form. -

- -subject.form
-A form element that allows users to enter a subject for their message. -

- - -form.end
-The form footer. -

- -|, - lastUpdated => 1101775486, - }, - '702' => { message => q|Month(s)|, lastUpdated => 1031514049 @@ -5292,11 +4103,6 @@ Create your template by using template commands and variables, macros, and HTML. lastUpdated => 1031514049 }, - '873' => { - message => q|Subscribe to thread|, - lastUpdated => 1065876827 - }, - '636' => { message => q|To create a package follow these simple steps: @@ -5324,11 +4130,6 @@ Privileges and styles assigned to pages in the package will not be copied when t lastUpdated => 1038889481 }, - '577' => { - message => q|Post Reply|, - lastUpdated => 1031514049 - }, - '561' => { message => q|Denied|, lastUpdated => 1031514049 @@ -5510,109 +4311,6 @@ Privileges and styles assigned to pages in the package will not be copied when t lastUpdated => 1078570360 }, - '1055' => { - message => q|WebGUI has a very powerful built-in discussion system called Forums. Forums are - contained by the Message Board wobject, and may also be added to other wobjects - such as Articles or USS's. -

-Forums (aka Discussions) have many settable properties. The following is a comprehensive list: -

- -Forum Template
-A template that controls the layout of the forum view. -

- -Thread Template
-A template that controls the layout of the thread view. -

- -Post Template
-A template that controls the layout of the post view. -

- -Search Template
-A template that controls the layout of the search engine interface and search results. -

- -Post Form Template
-A template that controls the form that users see when posting a new message. -

- -Post Preview Template
-A template that controls the layout of the preview of a message posting. -

- -Use Post Preview
-If set to yes a preview of the posted message will be shown before adding it to the forum. -

- -Notification Template
-A template that controls the layout of subscription notification messages sent to users. -

- -Archive After
-If a thread hasn't had a new message after this interval has expired then it will be flagged as "archived" and will only be accessible via the search engine. -

- -Edit Timeout
-The interval of time that the user has to edit their message after their initial post. -

-NOTE: Don't set this limit too high. One of the great things about discussions is that they are an accurate record of who said what. If you allow editing for a long time, then a user has a chance to go back and change his/her mind a long time after the original statement was made. -

- -Add edit stamp to posts?
-If set to yes then a string will be added to the bottom of a post each time its edited. -

- -Allow rich edit?
-If set to yes then users will be able to use a rich editor when writing their posts. -

- -Use content filters?
-If set to yes then content filters will be applied to the post. Content filters can be managed from the settings. -

- -Filter Post
-Select what types of content you will filter from a user's post. -

- -Threads Per Page
-The number of threads to display on a single page in a forum. -

- -Posts Per Page
-The number of posts (within a thread) to display on a single page. -

- -Who can view?
-A group that is allowed to view messages. -

- -Karma Per Post
-How much karma should be given to a user when they post a message? Note, karma -must be enabled in the Admin Console -> Settings -> User form for property to -be present. -

- -Who can post?
-A group that is allowed to post new messages. -

- -Moderate posts?
-If set to yes then posts will be set to pending by default and will not be displayed until a moderator approves the message. -

- -Who can moderate?
-A group that is allowed to moderate messages. -

- -Move Forum (Message Board only)
-You can move an existing forum to another Message Board. If set to 'No Change' the forum will stay at the current board. This option is only available when editing an existing Forum. -

-|, - lastUpdated => 1101775516, - }, - '88' => { message => q|Users In Group|, lastUpdated => 1031514049 @@ -5711,16 +4409,6 @@ What group should be alerted when a new user registers? lastUpdated => 1066641473 }, - '1024' => { - message => q|Filter Post|, - lastUpdated => 1046607477 - }, - - '1060' => { - message => q|Forum Thread Template|, - lastUpdated => 1066578513 - }, - '703' => { message => q|Year(s)|, lastUpdated => 1031514049 @@ -5873,11 +4561,6 @@ A randomly generated number. This is often used on images (such as banner ads) t lastUpdated => 1031514049 }, - '1042' => { - message => q|Posts Per Page|, - lastUpdated => 1066394411 - }, - '356' => { message => q|Template|, lastUpdated => 1031514049 @@ -5967,26 +4650,7 @@ config file.

lastUpdated => 1102031745, context => q|Help body for Page Export operation| }, - 'Forum, Threads Per Page' => { - message => q|Threads Per Page|, - lastUpdated =>1092652208, - context => q|Field label for Edit Forum| - }, - 'Forum, Preview Heading' => { - message => q|Message Preview|, - lastUpdated =>1092745088, - context => q|Label for Forum Preview heading| - }, - 'Forum, Post Preview Template' => { - message => q|Post Preview Template|, - lastUpdated =>1092748557, - context => q|Label for Forum Settings| - }, - 'Forum, use preview' => { - message => q|Use Post Preview?|, - lastUpdated =>1092748557, - context => q|Label for Forum Settings| - }, + 'tinymce' => { message => q|TinyMCE (IE, mozilla)|, lastUpdated =>1092748557, @@ -5997,21 +4661,7 @@ config file.

lastUpdated =>1092748557, context => q|asset property| }, - 'Forum, Post Preview Template Title' => { - message => q|Forum Post Preview Template|, - lastUpdated =>1092930637, - context => q|help title forum post preview template| - }, - 'Forum, Post Preview Template Body' => { - message => q| -

This template uses the same template variables as the Forum Post Template.

- - -|, - lastUpdated =>1099614353, - context => q|help body forum post preview template| - }, 'cancel' => { message => q|cancel|, lastUpdated =>1092930637, diff --git a/sbin/preload.perl b/sbin/preload.perl index dce186c95..6149ccc94 100644 --- a/sbin/preload.perl +++ b/sbin/preload.perl @@ -95,7 +95,6 @@ use WebGUI::SQL (); use WebGUI::Storage (); use WebGUI::Style (); use WebGUI::TabForm (); -use WebGUI::Template (); use WebGUI::URL (); use WebGUI::User (); use WebGUI::Utility (); @@ -104,7 +103,6 @@ use WebGUI::Utility (); #use WebGUI::Help::Article (); #use WebGUI::Help::Asset (); #use WebGUI::Help::AuthLDAP (); -#use WebGUI::Help::AuthSMB (); #use WebGUI::Help::AuthWebGUI (); #use WebGUI::Help::DataForm (); #use WebGUI::Help::EventsCalendar (); @@ -116,34 +114,21 @@ use WebGUI::Utility (); #use WebGUI::Help::SQLReport (); #use WebGUI::Help::Survey (); #use WebGUI::Help::SyndicatedContent (); -#use WebGUI::Help::USS (); +#use WebGUI::Help::Collaboration (); #use WebGUI::Help::WebGUI (); -#use WebGUI::Help::WobjectProxy (); +#use WebGUI::Help::Shortcut (); #use WebGUI::Help::WSClient (); # i18n use WebGUI::i18n::English (); use WebGUI::i18n::English::Article (); +use WebGUI::i18n::English::Collaboration (); use WebGUI::i18n::English::Asset (); #use WebGUI::i18n::English::AuthLDAP (); -#use WebGUI::i18n::English::AuthSMB (); use WebGUI::i18n::English::AuthWebGUI (); -use WebGUI::i18n::English::DataForm (); -use WebGUI::i18n::English::EventsCalendar (); -use WebGUI::i18n::English::HttpProxy (); -use WebGUI::i18n::English::IndexedSearch (); -use WebGUI::i18n::English::MessageBoard (); use WebGUI::i18n::English::Navigation (); -use WebGUI::i18n::English::Poll (); -use WebGUI::i18n::English::Product (); -use WebGUI::i18n::English::SQLReport (); -use WebGUI::i18n::English::Survey (); -use WebGUI::i18n::English::SyndicatedContent (); -use WebGUI::i18n::English::USS (); use WebGUI::i18n::English::WebGUI (); use WebGUI::i18n::English::WebGUIProfile (); -use WebGUI::i18n::English::WobjectProxy (); -use WebGUI::i18n::English::WSClient (); # you can significantly reduce your memory usage by preloading the plugins used on your sites, only the most commonly used ones are preloaded by default @@ -156,7 +141,7 @@ use WebGUI::Asset::Wobject (); use WebGUI::Asset::Wobject::Article (); use WebGUI::Asset::Wobject::Layout (); use WebGUI::Asset::Wobject::Navigation (); -#use WebGUI::Asset::Wobject::USS (); +use WebGUI::Asset::Wobject::Collaboration (); # auth methods use WebGUI::Auth::WebGUI (); @@ -164,9 +149,6 @@ use WebGUI::Auth::WebGUI (); #use Net::LDAP (); # used by ldap authentication use WebGUI::Auth::LDAP (); -#use Authen::Smb (); #uncomment when using this type of authentication. -#use WebGUI::Auth::SMB (); - # macros use WebGUI::Macro::AdminBar (); use WebGUI::Macro::AssetProxy ();