diff --git a/docs/upgrades/upgrade_6.1.1-6.2.0.sql b/docs/upgrades/upgrade_6.1.1-6.2.0.sql index 16f64d33d..b1751acad 100644 --- a/docs/upgrades/upgrade_6.1.1-6.2.0.sql +++ b/docs/upgrades/upgrade_6.1.1-6.2.0.sql @@ -1,6 +1,6 @@ insert into webguiVersion values ('6.2.0','upgrade',unix_timestamp()); -DROP TABLE IF EXISTS metaData_fields; -CREATE TABLE metaData_fields ( +DROP TABLE IF EXISTS metaData_properties; +CREATE TABLE metaData_properties ( fieldId int(11) NOT NULL default '0', fieldName varchar(100) NOT NULL , description mediumtext NOT NULL , @@ -11,8 +11,8 @@ CREATE TABLE metaData_fields ( UNIQUE KEY field_unique (fieldName) ) TYPE=MyISAM; -DROP TABLE IF EXISTS metaData_data; -CREATE TABLE metaData_data ( +DROP TABLE IF EXISTS metaData_values; +CREATE TABLE metaData_values ( fieldId int(11) NOT NULL default '0', wobjectId int(11) NOT NULL default '0', value varchar(100) default NULL, diff --git a/etc/WebGUI.conf.original b/etc/WebGUI.conf.original index 063b311ff..ae37551e9 100644 --- a/etc/WebGUI.conf.original +++ b/etc/WebGUI.conf.original @@ -14,6 +14,8 @@ uploadsPath = /data/WebGUI/www/uploads templateCacheType=file +passiveProfileInterval = 86400 # in seconds + emailRecoveryLoggingEnabled = 1 passwordChangeLoggingEnabled = 1 diff --git a/lib/WebGUI/Help/WebGUI.pm b/lib/WebGUI/Help/WebGUI.pm index 732d805c5..0b09b582a 100644 --- a/lib/WebGUI/Help/WebGUI.pm +++ b/lib/WebGUI/Help/WebGUI.pm @@ -185,6 +185,10 @@ our $HELP = { tag => 'message board add/edit', namespace => 'MessageBoard' }, + { + tag => 'metadata manage', + namespace => 'WebGUI' + }, { tag => 'poll add/edit', namespace => 'Poll' @@ -1109,6 +1113,39 @@ our $HELP = { } ] }, + 'metadata manage'=> { + title => 'Metadata, Manage', + body => 'metadata manage body', + related => [ + { + tag => 'user macros', + namespace => 'WebGUI' + }, + { + tag => 'wobject add/edit', + namespace => 'WebGUI', + }, + ], + }, + 'metadata edit property' => { + title => 'Metadata, Edit property', + body => 'metadata edit property body', + related => [ + { + tag => 'metadata manage', + namespace => 'WebGUI' + }, + { + tag => 'user macros', + namespace => 'WebGUI' + }, + { + tag => 'wobject add/edit', + namespace => 'WebGUI', + }, + ], + }, + }; 1; diff --git a/lib/WebGUI/Help/WobjectProxy.pm b/lib/WebGUI/Help/WobjectProxy.pm index e6efc3f7d..95081f1cc 100644 --- a/lib/WebGUI/Help/WobjectProxy.pm +++ b/lib/WebGUI/Help/WobjectProxy.pm @@ -8,7 +8,12 @@ our $HELP = { { tag => 'wobjects using', namespace => 'WebGUI' - } + }, + { + tag => 'metadata manage', + namespace => 'WebGUI' + }, + ] }, }; diff --git a/lib/WebGUI/Macro/AOIHits.pm b/lib/WebGUI/Macro/AOIHits.pm index 402546787..11226b598 100644 --- a/lib/WebGUI/Macro/AOIHits.pm +++ b/lib/WebGUI/Macro/AOIHits.pm @@ -21,7 +21,7 @@ sub process { @param = WebGUI::Macro::getParams($_[0]); my $key = $param[0]; my $value = $param[1]; - my $sql = "select count from passiveProfileAOI a, metaData_fields f + my $sql = "select count from passiveProfileAOI a, metaData_properties f where a.fieldId=f.fieldId and userId=".quote($session{user}{userId})." and fieldName=".quote($key)." diff --git a/lib/WebGUI/Macro/AOIRank.pm b/lib/WebGUI/Macro/AOIRank.pm index e91308ea9..ab6005f3c 100644 --- a/lib/WebGUI/Macro/AOIRank.pm +++ b/lib/WebGUI/Macro/AOIRank.pm @@ -22,7 +22,7 @@ sub process { my $key = $param[0]; my $rank = $param[1] || 1; # 1 is highest rank $rank--; # Rank is zero based - my $sql = "select value from passiveProfileAOI a, metaData_fields f + my $sql = "select value from passiveProfileAOI a, metaData_properties f where a.fieldId=f.fieldId and userId=".quote($session{user}{userId})." and fieldName=".quote($key)." order by a.count desc"; diff --git a/lib/WebGUI/MetaData.pm b/lib/WebGUI/MetaData.pm index 8fe41468c..682e1dd50 100644 --- a/lib/WebGUI/MetaData.pm +++ b/lib/WebGUI/MetaData.pm @@ -33,8 +33,16 @@ This package provides an interface to the MetaData system. =head1 SYNOPSIS use WebGUI::MetaData; + + $wid = getWobjectByCriteria($hashRef); + $hashRef = WebGUI::MetaData::getField( $fieldId ); + $hashRef = WebGUI::MetaData::getMetaDataFields(); + $wid = getWobjectByCriteria($hashRef); $arrayRef = WebGUI::MetaData::getFieldTypes; - $hashRef = WebGUI::MetaData::getMetaDataFields; + WebGUI::MetaData::metaDataSave( $wobjectId ) + WebGUI::MetaData::metaDataDelete( $wobjectId ) + WebGUI::MetaData::MetaDataDuplicate( $fromWobjectId , $toWobjectId ) + WebGUI::MetaData::deleteField( $fieldId ); =head1 METHODS @@ -75,8 +83,8 @@ The fieldId to be deleted. sub deleteField { my $fieldId = shift; return unless ($fieldId =~ /^\d+$/); - WebGUI::SQL->write("delete from metaData_fields where fieldId = ".quote($fieldId)); - WebGUI::SQL->write("delete from metaData_data where fieldId = ".quote($fieldId)); + WebGUI::SQL->write("delete from metaData_properties where fieldId = ".quote($fieldId)); + WebGUI::SQL->write("delete from metaData_values where fieldId = ".quote($fieldId)); } #------------------------------------------------------------------- @@ -147,8 +155,8 @@ sub getMetaDataFields { f.fieldType, f.possibleValues, d.value - from metaData_fields f - left join metaData_data d on f.fieldId=d.fieldId and d.wobjectId=".quote($wobjectId); + from metaData_properties f + left join metaData_values d on f.fieldId=d.fieldId and d.wobjectId=".quote($wobjectId); $sql .= " where f.fieldId = ".quote($fieldId) if ($fieldId); $sql .= " order by f.fieldName"; my $sth = WebGUI::SQL->read($sql); @@ -182,19 +190,19 @@ sub metaDataSave { foreach my $form (keys %{$session{form}}) { if ($form =~ /^metadata_(\d+)$/) { my $fieldId = $1; - my ($exists) = WebGUI::SQL->quickArray("select count(*) from metaData_data + my ($exists) = WebGUI::SQL->quickArray("select count(*) from metaData_values where wobjectId = ".quote($wobjectId)." and fieldId = ".quote($fieldId)); if(! $exists && $session{form}{$form} ne "") { - WebGUI::SQL->write("insert into metaData_data (fieldId, wobjectId) + WebGUI::SQL->write("insert into metaData_values (fieldId, wobjectId) values (".quote($fieldId).",".quote($wobjectId).")"); } if($session{form}{$form} eq "") { # Keep it clean - WebGUI::SQL->write("delete from metaData_data where wobjectId = ". + WebGUI::SQL->write("delete from metaData_values where wobjectId = ". quote($wobjectId)." and fieldId = ".quote($fieldId)); } else { - WebGUI::SQL->write("update metaData_data set value = ".quote($session{form}{$form})." + WebGUI::SQL->write("update metaData_values set value = ".quote($session{form}{$form})." where wobjectId = ".quote($wobjectId)." and fieldId = ". quote($fieldId)); } @@ -220,7 +228,7 @@ The Id from the wobject you want to delete metadata for. sub metaDataDelete { my $wobjectId = shift; - return WebGUI::SQL->write("delete from metaData_data where wobjectId = ".quote($wobjectId)); + return WebGUI::SQL->write("delete from metaData_values where wobjectId = ".quote($wobjectId)); } #------------------------------------------------------------------- @@ -246,9 +254,9 @@ The new wobject Id sub MetaDataDuplicate { my $fromWobjectId = shift; my $toWobjectId = shift; - my $sth = WebGUI::SQL->read("select * from metaData_data where wobjectId = ".quote($fromWobjectId)); + my $sth = WebGUI::SQL->read("select * from metaData_values where wobjectId = ".quote($fromWobjectId)); while( my $h = $sth->hashRef) { - WebGUI::SQL->write("insert into metaData_data (fieldId, wobjectId, value) values (". + WebGUI::SQL->write("insert into metaData_values (fieldId, wobjectId, value) values (". quote($h->{fieldId}).",".quote($toWobjectId).",".quote($h->{value}).")"); } $sth->finish; @@ -341,7 +349,7 @@ sub getWobjectByCriteria { $constraint =~ s/\Q$expression/$replacement/; } my $sql = " select w.wobjectId - from metaData_data d, metaData_fields f, wobject w + from metaData_values d, metaData_properties f, wobject w where f.fieldId = d.fieldId and w.wobjectId = d.wobjectId and w.namespace = ".quote($namespace); diff --git a/lib/WebGUI/Operation/MetaData.pm b/lib/WebGUI/Operation/MetaData.pm index 8743428a5..b2e36c0c7 100644 --- a/lib/WebGUI/Operation/MetaData.pm +++ b/lib/WebGUI/Operation/MetaData.pm @@ -56,8 +56,7 @@ sub www_editMetaDataField { return WebGUI::Privilege::vitalComponent() if ($session{form}{fid} < 1000 && $session{form}{fid} > 0); my ($output, $fieldName, $defaultValue, $description, $fieldInfo); - # TODO: add help / internationlize - $output = helpIcon(22); + $output = helpIcon('metadata edit property'); $output .= '

'.WebGUI::International::get('Edit Metadata','MetaData').'

'; if($session{form}{fid} && $session{form}{fid} ne "new") { @@ -66,7 +65,6 @@ sub www_editMetaDataField { my $fid = $session{form}{fid} || "new"; - #TODO: internatioa my $f = WebGUI::HTMLForm->new; $f->hidden("op", "editMetaDataFieldSave"); $f->hidden("fid", $fid); @@ -95,7 +93,7 @@ sub www_editMetaDataFieldSave { return WebGUI::Privilege::adminOnly() unless (WebGUI::Grouping::isInGroup(3)); return WebGUI::Privilege::vitalComponent() if ($session{form}{fid} < 1000 && $session{form}{fid} > 0); # Check for duplicate field names - my $sql = "select count(*) from metaData_fields where fieldName = ". + my $sql = "select count(*) from metaData_properties where fieldName = ". quote($session{form}{fieldName}); if ($session{form}{fid} ne "new") { $sql .= " and fieldId <> ".quote($session{form}{fid}); @@ -106,9 +104,13 @@ sub www_editMetaDataFieldSave { $error =~ s/\%field\%/$session{form}{fieldName}/; return $error . www_editMetaDataField(); } + if($session{form}{fieldName} eq "") { + return WebGUI::International::get("errorEmptyField", "MetaData") + . www_editMetaDataField(); + } if($session{form}{fid} eq 'new') { $session{form}{fid} = getNextId("metaData_fieldId"); - WebGUI::SQL->write("insert into metaData_fields (fieldId, fieldName, defaultValue, description, fieldType, possibleValues) values (". + WebGUI::SQL->write("insert into metaData_properties (fieldId, fieldName, defaultValue, description, fieldType, possibleValues) values (". quote($session{form}{fid}).",". quote($session{form}{fieldName}).",". quote($session{form}{defaultValue}).",". @@ -116,7 +118,7 @@ sub www_editMetaDataFieldSave { quote($session{form}{fieldType}).",". quote($session{form}{possibleValues}).")"); } else { - WebGUI::SQL->write("update metaData_fields set fieldName = ".quote($session{form}{fieldName}).", ". + WebGUI::SQL->write("update metaData_properties set fieldName = ".quote($session{form}{fieldName}).", ". "defaultValue = ".quote($session{form}{defaultValue}).", ". "description = ".quote($session{form}{description}).", ". "fieldType = ".quote($session{form}{fieldType}).", ". @@ -160,7 +162,7 @@ sub www_manageMetaData { return WebGUI::Privilege::adminOnly() unless (WebGUI::Grouping::isInGroup(3)); my $output; # TODO: add help - $output = helpIcon(22); + $output = helpIcon('metadata manage'); $output .= '

'.WebGUI::International::get('Manage Metadata','MetaData').'

'; my $f = new WebGUI::HTMLForm; $f->hidden("op","saveSettings"); diff --git a/lib/WebGUI/PassiveProfiling.pm b/lib/WebGUI/PassiveProfiling.pm index 5d7925801..6aff7ef5b 100644 --- a/lib/WebGUI/PassiveProfiling.pm +++ b/lib/WebGUI/PassiveProfiling.pm @@ -119,7 +119,7 @@ sub summarizeAOI { d.fieldId, d.wobjectId, d.value - from metaData_data d , metaData_fields f + from metaData_values d , metaData_properties f where f.fieldId = d.fieldId and d.wobjectId = ".$data->{wobjectId}; diff --git a/lib/WebGUI/Wobject.pm b/lib/WebGUI/Wobject.pm index 72c630843..2236ac9b2 100644 --- a/lib/WebGUI/Wobject.pm +++ b/lib/WebGUI/Wobject.pm @@ -1470,6 +1470,12 @@ sub www_edit { 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}, @@ -1477,9 +1483,15 @@ sub www_edit { -value=>$meta->{$field}{value}, -extras=>qq/title="$meta->{$field}{description}"/, -possibleValues=>$meta->{$field}{possibleValues}, - -options=>{"", WebGUI::International::get("Select...","MetaData")} + -options=>$options ); } + # Add a quick link to add field + $f->getTab("metadata")->readOnly( + -value=>'

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

' + ); } my $output; $output = helpIcon($helpId,$self->get("namespace")) if ($helpId); diff --git a/lib/WebGUI/Wobject/WobjectProxy.pm b/lib/WebGUI/Wobject/WobjectProxy.pm index d634d184f..053dda5e8 100644 --- a/lib/WebGUI/Wobject/WobjectProxy.pm +++ b/lib/WebGUI/Wobject/WobjectProxy.pm @@ -124,11 +124,12 @@ sub www_edit { -label=>WebGUI::International::get(1,$_[0]->get("namespace")), -value=>''.$data[1].' ('.$_[0]->get("proxiedWobjectId").')' ); - $properties->yesNo( - -name=>"proxyByCriteria", - -value=>$_[0]->getValue("proxyByCriteria"), - -label=>WebGUI::International::get("Proxy by alternate criteria?",$_[0]->get("namespace")), - -extras=>q|Onchange=" + if($session{setting}{metaDataEnabled}) { + $properties->yesNo( + -name=>"proxyByCriteria", + -value=>$_[0]->getValue("proxyByCriteria"), + -label=>WebGUI::International::get("Proxy by alternate criteria?",$_[0]->get("namespace")), + -extras=>q|Onchange=" if (this.form.proxyByCriteria[0].checked) { this.form.resolveMultiples.disabled=false; this.form.proxyCriteria.disabled=false; @@ -137,26 +138,25 @@ sub www_edit { this.form.proxyCriteria.disabled=true; }"| ); - my $extras; - if ($_[0]->getValue("proxyByCriteria") == 0) { - $extras = 'disabled=true'; - } - $properties->selectList( - -name=>"resolveMultiples", - -value=>[ $_[0]->getValue("resolveMultiples") ], - -label=>WebGUI::International::get("Resolve Multiples?",$_[0]->get("namespace")), - -options=>{ + if ($_[0]->getValue("proxyByCriteria") == 0) { + $_[0]->{_disabled} = 'disabled=true'; + } + $properties->selectList( + -name=>"resolveMultiples", + -value=>[ $_[0]->getValue("resolveMultiples") ], + -label=>WebGUI::International::get("Resolve Multiples?",$_[0]->get("namespace")), + -options=>{ mostRecent=>WebGUI::International::get("Most Recent",$_[0]->get("namespace")), random=>WebGUI::International::get("Random",$_[0]->get("namespace")), }, - -extras=>$extras + -extras=>$_[0]->{_disabled} ); - $properties->readOnly( - -value=>$_[0]->_drawQueryBuilder(), - -label=>WebGUI::International::get("Criteria",$_[0]->get("namespace")), - - ); + $properties->readOnly( + -value=>$_[0]->_drawQueryBuilder(), + -label=>WebGUI::International::get("Criteria",$_[0]->get("namespace")), + ); + } return $_[0]->SUPER::www_edit( -properties=>$properties->printRowsOnly, -layout=>$layout->printRowsOnly, @@ -197,6 +197,7 @@ sub _drawQueryBuilder { my $proxyCriteriaField = WebGUI::Form::textarea({ name=>"proxyCriteria", value=>$_[0]->getValue("proxyCriteria"), + extras=>'style="width: 100%" '.$_[0]->{_disabled} }); my $conjunctionField = WebGUI::Form::selectList({ name=>"conjunction", @@ -216,7 +217,7 @@ sub _drawQueryBuilder { $output .= qq| - + diff --git a/lib/WebGUI/i18n/English/MetaData.pm b/lib/WebGUI/i18n/English/MetaData.pm index 76096939a..56bb6c4f8 100644 --- a/lib/WebGUI/i18n/English/MetaData.pm +++ b/lib/WebGUI/i18n/English/MetaData.pm @@ -6,16 +6,20 @@ our $I18N = { lastUpdated => 1089039511, context => 'Label for tab' }, + 'errorEmptyField' => { + message => q|

Error: Field name may not be empty.

|, + lastUpdated => 1089039511, + }, 'duplicateField' => { message => q|

Error: Fieldname "%field%" is already in use.

|, lastUpdated => 1089039511, }, 'Delete Metadata field' => { - message => q|Delete Metadata field|, + message => q|Delete Metadata property|, lastUpdated => 1089039511, }, 'deleteConfirm' => { - message => q|Are you certain you want to delete this Metadata field ?|, + message => q|Are you certain you want to delete this Metadata property ?|, lastUpdated => 1089039511, }, 'Manage Metadata' => { @@ -27,15 +31,15 @@ our $I18N = { lastUpdated => 1089039511, }, 'Add new field' => { - message => q|Add new field|, + message => q|Add new metadata property|, lastUpdated => 1089039511, }, 'Manage Metadata fields' => { - message => q|Manage Metadata fields|, + message => q|Manage metadata properties|, lastUpdated => 1089039511, }, 'Edit Metadata' => { - message => q|Edit Metadata|, + message => q|Edit Metadata property|, lastUpdated => 1089039511, }, 'Field Id' => { diff --git a/lib/WebGUI/i18n/English/WebGUI.pm b/lib/WebGUI/i18n/English/WebGUI.pm index 5e5b3fe63..26cd9067d 100644 --- a/lib/WebGUI/i18n/English/WebGUI.pm +++ b/lib/WebGUI/i18n/English/WebGUI.pm @@ -3008,6 +3008,7 @@ The style-sheet id is the word "wobjectId" plus the Wobject Id for that wobject

Title The title of the wobject. This is typically displayed at the top of each wobject.

Note: You should always specify a title even if you are going to turn it off (with the next property). This is because the title shows up in the trash and clipboard and you'll want to be able to distinguish which wobject is which.

Display title?
Do you wish to display the title you specified? On some sites, displaying the title is not necessary. +

Metadata
Under the Metadata tab you can set the metadata properties for this content. Metadata must be enabled in the Manage Settings menu.

Process macros?
Do you wish to process macros in the content of this wobject? Sometimes you'll want to do this, but more often than not you'll want to say "no" to this question. By disabling the processing of macros on the wobjects that don't use them, you'll speed up your web server slightly.

Template Position
Template positions range from 0 (zero) to any number. How many are available depends upon the Template associated with this page. The default template has only one template position, others may have more. By selecting a template position, you're specifying where this wobject should be placed within the template.

Start Date
On what date should this wobject become visible? Before this date, the wobject will only be displayed to Content Managers. @@ -4537,6 +4538,14 @@ Displays a small text message to a user who is in admin mode. Example: ^Admi Places a link on the page which is only visible to content managers and adminstrators. The link toggles on/off admin mode. You can optionally specify other messages to display like this: ^AdminToggle("Edit On","Edit Off"); This macro optionally takes a third parameter that allows you to specify an alternate template name in the Macro/AdminToggle namespace.

+^AOIHits();
+Displays the number of views for a metadata property/value pair. Example: ^AOIHits(contenttype,sport); would display 99 if this user has looked at content that was tagged "contenttype = sport" 99 times. +

+ +^AOIRank();
+Diplays the highest ranked metadata property for this user. Example ^AOIRank(contenttype); would display "sport" if this user has looked mostly to content tagged "contenttype = sport". Optionally the rank can also be displayed. Example ^AOIRank(contenttype, 2); would return the second highest ranked contenttype. +

+ ^CanEditText();
Display a message to a user that can edit the current page.

@@ -7025,7 +7034,103 @@ Following a guide like the above will help you get good ranking on search engine message => q|Decimal|, lastUpdated => 1089039511, context => q|A label that tells the user that this field uses a floating point number, aka a Decimal number, aka a Real number.| - } + }, + 'Metadata, Edit property' => { + message => q|Metadata, Edit property|, + lastUpdated => 1089039511, + context => q|Metadata edit property help title| + }, + 'metadata edit property body' => { + message => q| +You may add as many Metadata properties as you like.
+
+Field Name
+The name of this metadata propertie.It must be unique.
+It is advisable to use only letters (a-z), numbers (0-9) or underscores (_) for +the field names. +

Description
+
An optional description for this metadata property. This text is displayed +as mouseover text in the wobject properties tab.

+

Data Type
+
Choose the type of form element for this field.
+
+Possible Values
+
This field is used for the list types (Radio List and Select List). Enter +the values you wish to appear, one per line.

+|, + lastUpdated => 1089039511, + context => q|Metadata edit property help| + }, + 'Metadata, Manage' => { + message => q|Metadata, Manage|, + lastUpdated => 1089039511, + context => q|Metadata help title| + }, + 'metadata manage body' => { + message => q| +

The metadata system in WebGUI allows you to identify content. Metadata is +information about the content, and is defined in terms of property-value pairs.

+

Examples of metadata:

+ +

In the example source: newspaper is source the property +and newspaper the value.

+

Metadata properties are defined globally, while Metadata values are set for +each wobject under the tab "Metadata" in the wobject properties.

+

Before you can use metadata, you'll have to switch the "Enable Metadata +?" setting to Yes.

+

Usage of metadata:

+ + +|, + lastUpdated => 1089039511, + context => q|Metadata help| + }, + + + + }; diff --git a/lib/WebGUI/i18n/English/WobjectProxy.pm b/lib/WebGUI/i18n/English/WobjectProxy.pm index e49f8813b..c83af82bb 100644 --- a/lib/WebGUI/i18n/English/WobjectProxy.pm +++ b/lib/WebGUI/i18n/English/WobjectProxy.pm @@ -27,31 +27,45 @@ our $I18N = { }, '6' => { - message => q|With the Wobject Proxy (aka Shortcut) you can mirror a wobject from another page to any other page. This is useful if you want to reuse the same content in multiple sections of your site. -

- -NOTE: The wobject proxy is not available through the Add Content menu, but instead through the shortcut icon on each wobject's toolbar. -

- -Wobject To Proxy
-Provides a link to the orignal wobject being proxied. -

- -Override title?
-Set to "yes" to use the title of the wobject proxy instead of the original title of the wobject. -

- -Override description?
-Set to "yes" to use the description of the wobject proxy instead of the original description of the wobject. -

- -Override display title?
-Set to "yes" to use the display title setting of the wobject proxy instead of the original display title setting of the wobject. -

- -Override template?
-Set to "yes" to use the template of the wobject proxy instead of the original template of the wobject. -

+ message => q|With the Wobject Proxy (aka Shortcut) you can mirror a wobject from another page to any other page. This is useful if you want to reuse the same content in multiple sections of your site. +

+ +NOTE: The wobject proxy is not available through the Add Content menu, but instead through the shortcut icon on each wobject's toolbar. +

+ +Wobject To Proxy
+Provides a link to the orignal wobject being proxied. +

+ +Override title?
+Set to "yes" to use the title of the wobject proxy instead of the original title of the wobject. +

+ +Override description?
+Set to "yes" to use the description of the wobject proxy instead of the original description of the wobject. +

+ +Override display title?
+Set to "yes" to use the display title setting of the wobject proxy instead of the original display title setting of the wobject. +

+ +Override template?
+Set to "yes" to use the template of the wobject proxy instead of the original template of the wobject. +

+ +Proxy by alternate criteria?
+Set to "yes" to enable selecting a wobject based upon custom criteria. Metadata must be enabled for this option to function properly. +

+ +Resolve Multiples?
+Sets the order to use when multiple wobjects are selected. Random means that if multiple wobjects match the proxy criteria then the wobject proxy will select a random wobject to proxy.
+Most Recent will select the most recent wobject that match the proxy criteria. +

+ +Criteria
+A statement to determinate what to proxy, in the form of "color = blue and weight != heavy". Multiple expressions may be joined with "and" and "or".
+A property or value must be quoted if it contains spaces. Feel free to use the criteria builder to build your statements. +

|, lastUpdated => 1057091098 }, diff --git a/www/extras/wobject/WobjectProxy/querybuilder.js b/www/extras/wobject/WobjectProxy/querybuilder.js index 1e0dd7c40..27dd1a2d5 100644 --- a/www/extras/wobject/WobjectProxy/querybuilder.js +++ b/www/extras/wobject/WobjectProxy/querybuilder.js @@ -11,7 +11,7 @@ function addCriteria ( fieldname, opform, valform ) { if(/\s+/.test(fieldname)) { fieldname = '"' + fieldname + '"'; } - if(/^\D+$/.test(value)) { + if(/^\D*$/.test(value)) { value = '"' + value + '"'; } var statement = fieldname + " " + operator + " " + value;

$proxyCriteriaField$proxyCriteriaField