From aae95ff4078e979c008633dbdc9cc6f1d1c7f17c Mon Sep 17 00:00:00 2001 From: JT Smith Date: Wed, 3 Nov 2004 00:14:59 +0000 Subject: [PATCH] more admin console stuff --- docs/changelog/6.x.x.txt | 2 + docs/upgrades/upgrade_6.2.8-6.3.0.sql | 6 +- lib/WebGUI/AdminConsole.pm | 12 +- lib/WebGUI/Help/WebGUI.pm | 88 +--- lib/WebGUI/Operation.pm | 9 +- lib/WebGUI/Operation/MetaData.pm | 3 - lib/WebGUI/Operation/Navigation.pm | 53 ++- lib/WebGUI/Operation/ProfileSettings.pm | 57 +-- lib/WebGUI/Operation/Replacements.pm | 25 +- lib/WebGUI/Operation/Settings.pm | 387 +++++++++------- lib/WebGUI/Style.pm | 5 +- lib/WebGUI/Template.pm | 1 + lib/WebGUI/i18n/English/Navigation.pm | 16 +- lib/WebGUI/i18n/English/WebGUI.pm | 557 ++++++++++------------- lib/WebGUI/i18n/English/WebGUIProfile.pm | 6 + www/extras/tabs/tabs.css | 2 +- 16 files changed, 565 insertions(+), 664 deletions(-) diff --git a/docs/changelog/6.x.x.txt b/docs/changelog/6.x.x.txt index 4bf7a19a7..cc5f09a4e 100644 --- a/docs/changelog/6.x.x.txt +++ b/docs/changelog/6.x.x.txt @@ -1,5 +1,7 @@ 6.3.0 - Added a new, more user-friendly administrative console. + - Removed the admin style settings since their use has been replaced by the + admin console. - bugfix [ 1045114 ] Columns randomly ordered in SQLReport (Len Kranendonk , tnx brother for reporting) - Sped up Navigation.pm diff --git a/docs/upgrades/upgrade_6.2.8-6.3.0.sql b/docs/upgrades/upgrade_6.2.8-6.3.0.sql index f34be24ef..32d18079a 100644 --- a/docs/upgrades/upgrade_6.2.8-6.3.0.sql +++ b/docs/upgrades/upgrade_6.2.8-6.3.0.sql @@ -10,5 +10,9 @@ INSERT INTO userProfileField VALUES ('richEditor','WebGUI::International::get(49 update userProfileData set fieldData='tinyMCE' where fieldName='richEditor'; UPDATE template set template = '\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n
\r\nInsert/Edit Link\r\n\r\n
\r\n Link Settings\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
Link URL:
Link Target:\r\n
 
\r\n
\r\n \r\n\r\n
\r\n
\r\n\r\n\r\n
\r\n Available Page Tree\r\n
\r\n\r\n \')\">
\r\n
\r\n
\r\n
\r\n \r\n
\r\n\r\n' where namespace='richEditor/pagetree' && templateId = '1'; -INSERT INTO template VALUES ('1','Admin Console','\r\n\r\n\r\n <tmpl_if application.title><tmpl_var application.title><tmpl_else><tmpl_var console.title></tmpl_if>\r\n \r\n \r\n\r\n\r\n
\r\n \r\n \" target=\"_blank\">\"?\"\r\n \r\n
\r\n
\r\n \" border=\"0\" title=\"\" alt=\"\" />\r\n
\r\n
\r\n \" border=\"0\" title=\"\" alt=\"\" />\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n  \r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n  \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \">
\r\n
\r\n
\r\n
\r\n ^AdminToggle;
\r\n ^LoginToggle;
\r\n
\r\n
\r\n\r\n\r\n\r\n','AdminConsole',1,1); +INSERT INTO template VALUES ('adminConsole','Admin Console','\r\n\r\n\r\n WebGUI <tmpl_var session.webgui.version>-<tmpl_var session.webgui.status> Admin Console\r\n \r\n\r\n\r\n\r\n\r\n\r\n','style',1,0); +INSERT INTO template VALUES ('1','Admin Console','^StyleSheet(^Extras;/adminConsole/adminConsole.css);\r\n^JavaScript(^Extras;/adminConsole/adminConsole.js);\r\n\r\n
\r\n \r\n \" target=\"_blank\">\"?\"\r\n \r\n
\r\n
\r\n \" border=\"0\" title=\"\" alt=\"\" />\r\n
\r\n
\r\n \" border=\"0\" title=\"\" alt=\"\" />\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n  \r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n  \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \">
\r\n
\r\n
\r\n
\r\n ^AdminToggle;
\r\n ^LoginToggle;
\r\n
\r\n
\r\n\r\n','AdminConsole',1,1); +delete from settings where name='adminStyleId'; +delete from settings where name='useAdminStyle'; + diff --git a/lib/WebGUI/AdminConsole.pm b/lib/WebGUI/AdminConsole.pm index f666d70c8..804b896a1 100644 --- a/lib/WebGUI/AdminConsole.pm +++ b/lib/WebGUI/AdminConsole.pm @@ -110,7 +110,7 @@ sub getAdminFunction { namespace=>"WebGUI" }, icon=>"settings.gif", - op=>"manageSettings", + op=>"editSettings", group=>"3" }, "templates"=>{ @@ -167,12 +167,12 @@ sub getAdminFunction { op=>"listReplacements", group=>"4" }, - "userProfileSettings"=>{ + "userProfiling"=>{ title=>{ - id=>"user profile settings", - namespace=>"WebGUI" + id=>"user profiling", + namespace=>"WebGUIProfile" }, - icon=>"userProfileSettings.gif", + icon=>"userProfiling.gif", op=>"editProfileSettings", group=>"3" }, @@ -216,7 +216,6 @@ sub render { my %var; $var{"application.workarea"} = shift; $var{"application.title"} = shift || $self->{_function}{title}; - $session{page}{useEmptyStyle} = 1; $var{"backtosite.label"} = WebGUI::International::get("493"); $var{"toggle.on.label"} = WebGUI::International::get("toggle on", "AdminConsole"); $var{"toggle.off.label"} = WebGUI::International::get("toggle off","AdminConsole"); @@ -232,6 +231,7 @@ sub render { $var{"console.icon"} = $session{config}{extrasURL}."/adminConsole/adminConsole.gif"; $var{"help.url"} = $self->{_helpUrl}; $var{"application_loop"} = $self->getAdminFunction; + $session{page}{useAdminStyle} = 1; return WebGUI::Template::process($session{setting}{AdminConsoleTemplate}, "AdminConsole", \%var); } diff --git a/lib/WebGUI/Help/WebGUI.pm b/lib/WebGUI/Help/WebGUI.pm index 476e87353..23280bf04 100644 --- a/lib/WebGUI/Help/WebGUI.pm +++ b/lib/WebGUI/Help/WebGUI.pm @@ -63,20 +63,6 @@ our $HELP = { } ] }, - 'company information edit' => { - title => '656', - body => '611', - related => [ - { - tag => 'settings manage', - namespace => 'WebGUI' - }, - { - tag => 'style macros', - namespace => 'WebGUI' - }, - ] - }, 'trash empty' => { title => '696', body => '651', @@ -90,22 +76,7 @@ our $HELP = { 'profile settings edit' => { title => '672', body => '627', - related => [ - { - tag => 'settings manage', - namespace => 'WebGUI' - } - ] - }, - 'miscellaneous settings edit' => { - title => '674', - body => '629', - related => [ - { - tag => 'settings manage', - namespace => 'WebGUI' - } - ] + related => [] }, 'style template' => { title => '1073', @@ -255,16 +226,6 @@ our $HELP = { } ] }, - 'user settings edit' => { - title => '652', - body => '607', - related => [ - { - tag => 'settings manage', - namespace => 'WebGUI' - } - ] - }, 'group delete' => { title => '665', body => '620', @@ -285,35 +246,10 @@ our $HELP = { } ] }, - 'settings manage' => { - title => '662', - body => '617', - related => [ - { - tag => 'company information edit', - namespace => 'WebGUI' - }, - { - tag => 'content settings edit', - namespace => 'WebGUI' - }, - { - tag => 'messaging settings edit', - namespace => 'WebGUI' - }, - { - tag => 'miscellaneous settings edit', - namespace => 'WebGUI' - }, - { - tag => 'profile settings edit', - namespace => 'WebGUI' - }, - { - tag => 'user settings edit', - namespace => 'WebGUI' - } - ] + 'settings' => { + title => 'settings', + body => 'settings help', + related => [] }, 'groups manage' => { title => '660', @@ -409,20 +345,6 @@ our $HELP = { } ] }, - 'content settings edit' => { - title => '679', - body => '634', - related => [ - { - tag => 'settings manage', - namespace => 'WebGUI' - }, - { - tag => 'navigation macros', - namespace => 'WebGUI' - } - ] - }, 'templates manage' => { title => '683', body => '638', diff --git a/lib/WebGUI/Operation.pm b/lib/WebGUI/Operation.pm index 6a0f713ad..12c7e6c6c 100644 --- a/lib/WebGUI/Operation.pm +++ b/lib/WebGUI/Operation.pm @@ -150,6 +150,7 @@ sub getOperations { 'editNavigationSave' => 'WebGUI::Operation::Navigation', 'copyNavigation' => 'WebGUI::Operation::Navigation', 'deleteNavigation' => 'WebGUI::Operation::Navigation', + 'previewNavigation' => 'WebGUI::Operation::Navigation', 'deployPackage' => 'WebGUI::Operation::Package', 'viewPageTree' => 'WebGUI::Operation::Page', 'movePageUp' => 'WebGUI::Operation::Page', @@ -191,13 +192,7 @@ sub getOperations { 'setScratch' => 'WebGUI::Operation::Scratch', 'deleteScratch' => 'WebGUI::Operation::Scratch', 'saveSettings' => 'WebGUI::Operation::Settings', - 'editUserSettings' => 'WebGUI::Operation::Settings', - 'editCompanyInformation' => 'WebGUI::Operation::Settings', - 'editPrivilegeSettings' => 'WebGUI::Operation::Settings', - 'editMessagingSettings' => 'WebGUI::Operation::Settings', - 'editMiscSettings' => 'WebGUI::Operation::Settings', - 'editContentSettings' => 'WebGUI::Operation::Settings', - 'manageSettings' => 'WebGUI::Operation::Settings', + 'editSettings' => 'WebGUI::Operation::Settings', 'viewPageReport' => 'WebGUI::Operation::Statistics', 'viewStatistics' => 'WebGUI::Operation::Statistics', 'viewTrafficReport' => 'WebGUI::Operation::Statistics', diff --git a/lib/WebGUI/Operation/MetaData.pm b/lib/WebGUI/Operation/MetaData.pm index 56a6f76bc..ba3701450 100644 --- a/lib/WebGUI/Operation/MetaData.pm +++ b/lib/WebGUI/Operation/MetaData.pm @@ -151,9 +151,6 @@ sub www_manageMetaData { $output .= editIcon("op=editMetaDataField&fid=".$fieldId); $output .= "".$fields->{$fieldId}{fieldName}."
"; } - $output .= '

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

'; return _submenu($output,undef,"metadata manage"); } diff --git a/lib/WebGUI/Operation/Navigation.pm b/lib/WebGUI/Operation/Navigation.pm index c5f88a872..cdcd6f98c 100644 --- a/lib/WebGUI/Operation/Navigation.pm +++ b/lib/WebGUI/Operation/Navigation.pm @@ -13,6 +13,7 @@ package WebGUI::Operation::Navigation; use strict; use Tie::IxHash; use Tie::CPHash; +use WebGUI::AdminConsole; use WebGUI::DateTime; use WebGUI::ErrorHandler; use WebGUI::Grouping; @@ -22,7 +23,6 @@ use WebGUI::Id; use WebGUI::International; use WebGUI::Macro; use WebGUI::Navigation; -use WebGUI::Operation::Shared; use WebGUI::Paginator; use WebGUI::Privilege; use WebGUI::Session; @@ -34,21 +34,27 @@ use WebGUI::Cache; #------------------------------------------------------------------- sub _submenu { - my (%menu); - tie %menu, 'Tie::IxHash'; - $menu{WebGUI::URL::page('op=editNavigation')} = 'Add new Navigation.'; - if (($session{form}{op} eq "editNavigation" && $session{form}{navigationId} ne "new") || $session{form}{op} eq "deleteNavigationConfirm") { - $menu{WebGUI::URL::page('op=editNavigation&identifier='.$session{form}{identifier})} = - WebGUI::International::get(18, 'Navigation'); - $menu{WebGUI::URL::page('op=copyNavigation&navigationId='.$session{form}{navigationId})} = - WebGUI::International::get(19, 'Navigation'); - $menu{WebGUI::URL::page('op=deleteNavigation&navigationId='.$session{form}{navigationId})} = - WebGUI::International::get(20, 'Navigation'); + my $workarea = shift; + my $title = shift; + my $i18n = WebGUI::International->new("Navigation"); + $title = $i18n->get($title) if ($title); + my $help = shift; + my $ac = WebGUI::AdminConsole->new; + if ($help) { + $ac->setHelp($help); } - $menu{WebGUI::URL::page('op=listNavigation')} = WebGUI::International::get(21, 'Navigation'); - return menuWrapper($_[0],\%menu); + $ac->setAdminFunction("navigation"); + $ac->addSubmenuItem(WebGUI::URL::page('op=editNavigation'),$i18n->get("add new")); + if (($session{form}{op} eq "editNavigation" && $session{form}{navigationId} ne "new") || $session{form}{op} eq "deleteNavigationConfirm") { + $ac->addSubmenuItem(WebGUI::URL::page('op=editNavigation&identifier='.$session{form}{identifier}), $i18n->get("18")); + $ac->addSubmenuItem(WebGUI::URL::page('op=copyNavigation&navigationId='.$session{form}{navigationId}),$i18n->get("19")); + $ac->addSubmenuItem(WebGUI::URL::page('op=deleteNavigation&navigationId='.$session{form}{navigationId}),$i18n->get("20")); + } + $ac->addSubmenuItem(WebGUI::URL::page('op=listNavigation'), $i18n->get("21")); + return $ac->render($workarea, $title); } + #------------------------------------------------------------------- sub www_copyNavigation { return WebGUI::Privilege::insufficient() unless (WebGUI::Grouping::isInGroup(3)); @@ -71,14 +77,13 @@ sub www_deleteNavigation { if ($session{form}{navigationId} < 1000 && $session{form}{navigationId} > 0) { return WebGUI::Privilege::vitalComponent(); } - my $output .= '

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

'; - $output .= WebGUI::International::get(502).'

'; + my $output = WebGUI::International::get(502).'

'; $output .= '

'.WebGUI::International::get(44).''; $output .= '    '. WebGUI::International::get(45).'
'; - return _submenu($output); + return _submenu($output,"42"); } #------------------------------------------------------------------- @@ -97,10 +102,7 @@ sub www_deleteNavigationConfirm { #------------------------------------------------------------------- sub www_editNavigation { return WebGUI::Privilege::insufficient() unless (WebGUI::Grouping::isInGroup(3)); - my $identifier = shift || $session{form}{identifier}; - #return WebGUI::ErrorHandler::warn("editNavigation called without identifier") unless $identifier; - my $config = WebGUI::Navigation::getConfig($identifier); if ($config->{identifier}) { # Existing config @@ -117,7 +119,7 @@ sub www_editNavigation { $config->{showUnprivilegedPages} = 0; $config->{'reverse'} = 0; } - my $output = helpIcon("navigation add/edit").'

'.WebGUI::International::get(22, 'Navigation').'

'; + my $output; tie my (%tabs) , 'Tie::IxHash'; %tabs = ( properties=>{ @@ -239,7 +241,7 @@ sub www_editNavigation { " >'; $f->{_submit} = $previewButton." ".$saveButton; $output .= $f->print; - return _submenu($output); + return _submenu($output,'22',"navigation add/edit"); } #------------------------------------------------------------------- @@ -281,7 +283,7 @@ sub www_editNavigationSave { #------------------------------------------------------------------- sub www_listNavigation { return WebGUI::Privilege::insufficient() unless (WebGUI::Grouping::isInGroup(3)); - my $output .= helpIcon("navigation manage").'

'.WebGUI::International::get(34,'Navigation').'

'; + my $output; my $sth = WebGUI::SQL->read("select navigationId, identifier from Navigation order by identifier"); my $i = 0; my @row = (); @@ -301,13 +303,11 @@ sub www_listNavigation { $output .= $p->getPage($session{form}{pn}); $output .= ''; $output .= $p->getBarTraditional($session{form}{pn}); - return _submenu($output); + return _submenu($output,'34',"navigation manage"); } #------------------------------------------------------------------- sub www_previewNavigation { - #$session{page}{useEmptyStyle} = 1; - $session{page}{useAdminStyle} = 1; $session{var}{adminOn} = 0; return WebGUI::Privilege::insufficient() unless (WebGUI::Grouping::isInGroup(3)); my $nav = WebGUI::Navigation->new( depth=>$session{form}{depth}, @@ -321,7 +321,6 @@ sub www_previewNavigation { 'reverse'=>$session{form}{'reverse'}, ); my $output = qq( -

Navigation Preview

Configuration @@ -345,7 +344,7 @@ sub www_previewNavigation { # Because of the way the system is set up, the preview is cached. So let's remove it again... WebGUI::Cache->new($nav->{_identifier}."$session{page}{pageId}", "Navigation-".$session{config}{configFile})->delete; - return $output; + return _submenu($output,"preview"); } 1; diff --git a/lib/WebGUI/Operation/ProfileSettings.pm b/lib/WebGUI/Operation/ProfileSettings.pm index d0fd3e217..91468e688 100644 --- a/lib/WebGUI/Operation/ProfileSettings.pm +++ b/lib/WebGUI/Operation/ProfileSettings.pm @@ -12,13 +12,12 @@ package WebGUI::Operation::ProfileSettings; use strict; use Tie::CPHash; -use Tie::IxHash; +use WebGUI::AdminConsole; use WebGUI::Grouping; use WebGUI::HTMLForm; use WebGUI::Icon; use WebGUI::Id; use WebGUI::International; -use WebGUI::Operation::Shared; use WebGUI::Privilege; use WebGUI::Session; use WebGUI::SQL; @@ -47,35 +46,42 @@ sub _reorderFields { #------------------------------------------------------------------- sub _submenu { - my (%menu); - tie %menu, 'Tie::IxHash'; - $menu{WebGUI::URL::page("op=editProfileCategory")} = WebGUI::International::get(490,"WebGUIProfile"); - $menu{WebGUI::URL::page("op=editProfileField")} = WebGUI::International::get(491,"WebGUIProfile"); - if (($session{form}{op} eq "editProfileField" && $session{form}{fid} ne "new") || $session{form}{op} eq "deleteProfileField") { - $menu{WebGUI::URL::page('op=editProfileField&fid='.$session{form}{fid})} = WebGUI::International::get(787,"WebGUIProfile"); - $menu{WebGUI::URL::page('op=deleteProfileField&fid='.$session{form}{fid})} = WebGUI::International::get(788,"WebGUIProfile"); - } - if (($session{form}{op} eq "editProfileCategory" && $session{form}{cid} ne "new") || $session{form}{op} eq "deleteProfileCategory") { - $menu{WebGUI::URL::page('op=editProfileCategory&cid='.$session{form}{cid})} = WebGUI::International::get(789,"WebGUIProfile"); - $menu{WebGUI::URL::page('op=deleteProfileCategory&cid='.$session{form}{cid})} = WebGUI::International::get(790,"WebGUIProfile"); + my $workarea = shift; + my $title = shift; + my $help = shift; + my $namespace = shift; + $title = WebGUI::International::get($title,$namespace) if ($title); + my $ac = WebGUI::AdminConsole->new; + if ($help) { + $ac->setHelp($help); } - $menu{WebGUI::URL::page("op=editProfileSettings")} = WebGUI::International::get(492); - $menu{WebGUI::URL::page('op=manageSettings')} = WebGUI::International::get(4); - return menuWrapper($_[0],\%menu); + $ac->setAdminFunction("userProfiling"); + $ac->addSubmenuItem(WebGUI::URL::page("op=editProfileCategory&cid=new"), WebGUI::International::get(490,"WebGUIProfile")); + $ac->addSubmenuItem(WebGUI::URL::page("op=editProfileField&fid=new"), WebGUI::International::get(491,"WebGUIProfile")); + if ((($session{form}{op} eq "editProfileField" && $session{form}{fid} ne "new") || $session{form}{op} eq "deleteProfileField") && $session{form}{cid} eq "") { + $ac->addSubmenuItem(WebGUI::URL::page('op=editProfileField&fid='.$session{form}{fid}), WebGUI::International::get(787,"WebGUIProfile")); + $ac->addSubmenuItem(WebGUI::URL::page('op=deleteProfileField&fid='.$session{form}{fid}), WebGUI::International::get(788,"WebGUIProfile")); + } + if ((($session{form}{op} eq "editProfileCategory" && $session{form}{cid} ne "new") || $session{form}{op} eq "deleteProfileCategory") && $session{form}{fid} eq "") { + $ac->addSubmenuItem(WebGUI::URL::page('op=editProfileCategory&cid='.$session{form}{cid}), WebGUI::International::get(789,"WebGUIProfile")); + $ac->addSubmenuItem(WebGUI::URL::page('op=deleteProfileCategory&cid='.$session{form}{cid}), WebGUI::International::get(790,"WebGUIProfile")); + } + $ac->addSubmenuItem(WebGUI::URL::page("op=editProfileSettings"), WebGUI::International::get(492)); + return $ac->render($workarea, $title); } + #------------------------------------------------------------------- sub www_deleteProfileCategory { return WebGUI::Privilege::adminOnly() unless (WebGUI::Grouping::isInGroup(3)); my ($output); return WebGUI::Privilege::vitalComponent() if ($session{form}{cid} < 1000 && $session{form}{cid} > 0); - $output = '

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

'; - $output .= WebGUI::International::get(466,"WebGUIProfile").'

'; + $output = WebGUI::International::get(466,"WebGUIProfile").'

'; $output .= '

'; - return _submenu($output); + return _submenu($output,'42'); } #------------------------------------------------------------------- @@ -93,13 +99,12 @@ sub www_deleteProfileField { my ($output,$protected); ($protected) = WebGUI::SQL->quickArray("select protected from userProfileField where fieldname=".quote($session{form}{fid})); return WebGUI::Privilege::vitalComponent() if ($protected); - $output = '

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

'; $output .= WebGUI::International::get(467,"WebGUIProfile").'

'; $output .= '

'; - return _submenu($output); + return _submenu($output,'42'); } #------------------------------------------------------------------- @@ -118,7 +123,6 @@ sub www_editProfileCategory { return WebGUI::Privilege::adminOnly() unless (WebGUI::Grouping::isInGroup(3)); my ($output, $f, %data); tie %data, 'Tie::CPHash'; - $output = '

'.WebGUI::International::get(468,"WebGUIProfile").'

'; $f = WebGUI::HTMLForm->new; $f->hidden("op","editProfileCategorySave"); if ($session{form}{cid}) { @@ -141,7 +145,7 @@ sub www_editProfileCategory { ); $f->submit; $output .= $f->print; - return _submenu($output); + return _submenu($output,'468'); } #------------------------------------------------------------------- @@ -168,7 +172,6 @@ sub www_editProfileField { return WebGUI::Privilege::adminOnly() unless (WebGUI::Grouping::isInGroup(3)); my ($output, $f, %data, %hash, $key); tie %data, 'Tie::CPHash'; - $output = '

'.WebGUI::International::get(471,"WebGUIProfile").'

'; $f = WebGUI::HTMLForm->new; $f->hidden("op","editProfileFieldSave"); if ($session{form}{fid}) { @@ -215,7 +218,7 @@ sub www_editProfileField { ); $f->submit; $output .= $f->print; - return _submenu($output); + return _submenu($output,'471',undef,"WebGUIProfile"); } #------------------------------------------------------------------- @@ -263,8 +266,6 @@ sub www_editProfileSettings { my ($output, $a, %category, %field, $b); tie %category, 'Tie::CPHash'; tie %field, 'Tie::CPHash'; - $output = helpIcon("profile settings edit"); - $output .= '

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

'; $a = WebGUI::SQL->read("select * from userProfileCategory order by sequenceNumber"); while (%category = $a->hash) { $output .= deleteIcon('op=deleteProfileCategory&cid='.$category{profileCategoryId}); @@ -289,7 +290,7 @@ sub www_editProfileSettings { $b->finish; } $a->finish; - return _submenu($output); + return _submenu($output,undef,"profile settings edit"); } #------------------------------------------------------------------- diff --git a/lib/WebGUI/Operation/Replacements.pm b/lib/WebGUI/Operation/Replacements.pm index 984dd7938..3a99090da 100644 --- a/lib/WebGUI/Operation/Replacements.pm +++ b/lib/WebGUI/Operation/Replacements.pm @@ -11,23 +11,29 @@ package WebGUI::Operation::Replacements; #------------------------------------------------------------------- use strict; +use WebGUI::AdminConsole; use WebGUI::Grouping; use WebGUI::Icon; use WebGUI::HTMLForm; use WebGUI::International; -use WebGUI::Operation::Shared; use WebGUI::Privilege; use WebGUI::Session; use WebGUI::SQL; #------------------------------------------------------------------- sub _submenu { - my (%menu); - tie %menu, 'Tie::IxHash'; - $menu{WebGUI::URL::page("op=editReplacement&replacementId=new")} = WebGUI::International::get(1047); - $menu{WebGUI::URL::page("op=listReplacements")} = WebGUI::International::get(1048); - $menu{WebGUI::URL::page('op=manageSettings')} = WebGUI::International::get(4); - return menuWrapper($_[0],\%menu); + my $workarea = shift; + my $title = shift; + $title = WebGUI::International::get($title) if ($title); + my $help = shift; + my $ac = WebGUI::AdminConsole->new; + if ($help) { + $ac->setHelp($help); + } + $ac->setAdminFunction("contentFilters"); + $ac->addSubmenuItem(WebGUI::URL::page("op=editReplacement&replacementId=new"), WebGUI::International::get(1047)); + $ac->addSubmenuItem(WebGUI::URL::page("op=listReplacements"), WebGUI::International::get("content filters")); + return $ac->render($workarea, $title); } @@ -66,7 +72,7 @@ sub www_editReplacement { -value=>$data->{replaceWith} ); $f->submit; - return _submenu("

".WebGUI::International::get(1052)."

".$f->print); + return _submenu($f->print,"1052"); } #------------------------------------------------------------------- @@ -83,8 +89,7 @@ sub www_editReplacementSave { #------------------------------------------------------------------- sub www_listReplacements { return WebGUI::Privilege::adminOnly() unless (WebGUI::Grouping::isInGroup(3)); - my $output = "

".WebGUI::International::get(1053)."

"; - $output .= ''; + my $output = '
'; my $sth = WebGUI::SQL->read("select replacementId,searchFor from replacements order by searchFor"); while (my $data = $sth->hashRef) { $output .= ''); - $f->yesNo("anonymousRegistration",WebGUI::International::get(118),$session{setting}{anonymousRegistration}); - $f->text("runOnRegistration",WebGUI::International::get(559),$session{setting}{runOnRegistration}); - $f->yesNo("useKarma",WebGUI::International::get(539),$session{setting}{useKarma}); - $f->integer("karmaPerLogin",WebGUI::International::get(540),$session{setting}{karmaPerLogin}); - $f->interval("sessionTimeout",WebGUI::International::get(142),WebGUI::DateTime::secondsToInterval($session{setting}{sessionTimeout})); - $f->yesNo("selfDeactivation",WebGUI::International::get(885),$session{setting}{selfDeactivation}); - $f->yesNo("encryptLogin",WebGUI::International::get(1006),$session{setting}{encryptLogin}); - - my $options; - foreach (@{$session{config}{authMethods}}) { - $options->{$_} = $_; - } - $f->select( - -name=>"authMethod", - -options=>$options, - -label=>WebGUI::International::get(164), - -value=>[$session{setting}{authMethod}], - -extras=>"onChange=\"active=operateHidden(this.options[this.selectedIndex].value,active)\"" - ); + $tabform->getTab("auth")->raw(''); + my $options; + foreach (@{$session{config}{authMethods}}) { + $options->{$_} = $_; + } + $tabform->getTab("auth")->select( + -name=>"authMethod", + -options=>$options, + -label=>$i18n->get(164), + -value=>[$session{setting}{authMethod}], + -extras=>"onChange=\"active=operateHidden(this.options[this.selectedIndex].value,active)\"" + ); my $jscript = '"; - - $f->submit( -label=>" "); - $output .= $f->print; - $output .= $jscript; - return _submenu($output); -} - -#------------------------------------------------------------------- -sub www_manageSettings { - return WebGUI::Privilege::adminOnly() unless (WebGUI::Grouping::isInGroup(3)); - my ($output); - $output .= helpIcon("settings manage"); - $output .= '

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

'; - $output .= ''; - return _submenu($output); + $tabform->getTab("auth")->raw($jscript); + $tabform->submit(); + my $ac = WebGUI::AdminConsole->new; + $ac->setAdminFunction("settings"); + $ac->setHelp("settings"); + return $ac->render($tabform->print); } #------------------------------------------------------------------- @@ -230,10 +282,11 @@ sub www_saveSettings { next; } unless ($key eq "op") { + $session{setting}{$key} = $value; WebGUI::SQL->write("update settings set value=".quote($value)." where name='$key'"); } } - return www_manageSettings(); + return www_editSettings(); } 1; diff --git a/lib/WebGUI/Style.pm b/lib/WebGUI/Style.pm index 1fd261c06..bc0eaf357 100644 --- a/lib/WebGUI/Style.pm +++ b/lib/WebGUI/Style.pm @@ -128,8 +128,9 @@ sub process { my $templateId = shift || $session{page}{styleId}; if ($session{page}{makePrintable}) { $templateId = $session{page}{printableStyleId}; - } elsif ($session{page}{useAdminStyle} ne "" && $session{setting}{useAdminStyle}) { - $templateId = $session{setting}{adminStyleId}; + } elsif ($session{page}{useAdminStyle}) { + #$templateId = $session{setting}{adminStyleId}; + $templateId = "adminConsole"; } elsif ($session{scratch}{personalStyleId} ne "") { $templateId = $session{scratch}{personalStyleId}; } elsif ($session{page}{useEmptyStyle}) { diff --git a/lib/WebGUI/Template.pm b/lib/WebGUI/Template.pm index 7255acaa8..e121775ad 100644 --- a/lib/WebGUI/Template.pm +++ b/lib/WebGUI/Template.pm @@ -80,6 +80,7 @@ sub _execute { } $t->param(%{$vars}); $t->param("webgui.version"=>$WebGUI::VERSION); + $t->param("webgui.status"=>$WebGUI::STATUS); return $t->output; } else { WebGUI::ErrorHandler::warn("Error in template. ".$@); diff --git a/lib/WebGUI/i18n/English/Navigation.pm b/lib/WebGUI/i18n/English/Navigation.pm index ae3089fc7..1b4cd1c7f 100644 --- a/lib/WebGUI/i18n/English/Navigation.pm +++ b/lib/WebGUI/i18n/English/Navigation.pm @@ -1,6 +1,12 @@ package WebGUI::i18n::English::Navigation; our $I18N = { + 'add new' => { + message => q|Add new navigation.|, + lastUpdated => 1077777777, + context => q|A submenu item in admin console that allows the user to add a new nav config.| + }, + 'manage navigation' => { message => q|Manage Navigation|, lastUpdated => 1077081255, @@ -113,8 +119,8 @@ our $I18N = { }, '22' => { - message => q|Edit Navigation|, - lastUpdated => 1077080241 + message=> q|Edit Navigation|, + lastUpdated => 1077078969 }, '13' => { @@ -167,9 +173,9 @@ our $I18N = { lastUpdated => 1077078456 }, - '34' => { - message => q|Manage Navigation|, - lastUpdated => 1077081304 + 'preview' => { + message => q|Preview Navigation|, + lastUpdated => 1077078456 }, '19' => { diff --git a/lib/WebGUI/i18n/English/WebGUI.pm b/lib/WebGUI/i18n/English/WebGUI.pm index 9172771e1..e0f37a047 100644 --- a/lib/WebGUI/i18n/English/WebGUI.pm +++ b/lib/WebGUI/i18n/English/WebGUI.pm @@ -7,7 +7,7 @@ our $I18N = { }, '1049' => { - message => q|Replacement ID|, + message => q|Content Filter ID|, lastUpdated => 1066418840 }, @@ -243,38 +243,6 @@ The URL for your company specified in the settings by your Administrator. lastUpdated => 1094053549 }, - '634' => { - message => q|Default Home Page
Some really small sites don't have a home page, but instead like to use one of their internal pages like "About Us" or "Company Information" as their home page. For that reason, you can set the default page of your site to any page in the site. That page will be the one people go to if they type in just your URL http://www.mywebguisite.com, or if they click on the Home link generated by the ^H; navigation macro. - -

Not Found Page
If a page that a user requests is not found in the system, the user can either be redirected to the home page or to an error page where they can attempt to find what they were looking for. You decide which is better for your users. - -

URL Extension
Add an extension such as "html", "php", or "asp" to each new page URL as it is created.

NOTE: Do NOT include the dot "." in this. So the field should look like "html" not ".html". - -

Favicon
An icon that appears on Internet Explorer short cuts such as your "Favorites". More information about Favicon is available online. - -

Site Icon
An icon that appears in the URL bar of most modern browsers. It may also appear in the bookmarks of the browser. The image must be 16x16 pixels. - -

Maximum Attachment Size
The size (in kilobytes) of the maximum allowable attachment to be uploaded to your system. - -

Max Image Size
If images are uploaded to your system that are bigger than the max image size, then they will be resized to the max image size. The max image size is measured in pixels and will use the size of the longest side of the image to determine if the limit has been reached. - -

Thumbnail Size
When images are uploaded to your system, they will automatically have thumbnails generated at the size specified here (unless overridden on a case-by-case basis). Thumbnail size is measured in pixels. - -

Snippet Preview Length
How many characters of a snippet should be displayed in the collateral management system main listing. - -Text Area Rows, Text Area Columns and Text Box Size allow the size of -forms that WebGUI generates to be customized on a site-by-site basis. - -

Text Area Rows
This setting specifies how many rows of characters will be displayed in textareas on the site. - -

Text Area Columns
This setting specifies how many columns of characters will be displayed in textareas on the site. - -

Text Box Size
This setting specifies how many characters can be displayed at once in text boxes on the site. - -|, - lastUpdated => 1098855329 - }, - '1021' => { message => q|Rate Message|, lastUpdated => 1065356764 @@ -495,11 +463,6 @@ The URL of the web site for this theme's designer. If you are in the business of lastUpdated => 1056151382 }, - '662' => { - message => q|Settings, Manage|, - lastUpdated => 1031514049 - }, - '418' => { message => q|Filter Content|, lastUpdated => 1046604931 @@ -573,11 +536,6 @@ Select a file from your hard drive to upload. lastUpdated => 1038871497 }, - '124' => { - message => q|Edit Company Information|, - lastUpdated => 1031514049 - }, - '772' => { message => q|Edit File|, lastUpdated => 1036893140 @@ -960,11 +918,6 @@ The number of the current page in a multi-page listing. lastUpdated => 1031514049 }, - '1048' => { - message => q|Manage replacements.|, - lastUpdated => 1066418767 - }, - '1000' => { message => q|

Database Links enable a WebGUI administrator to add commonly used databases for use in SQL Reports. This frees the SQL Report author from having to know or enter a DSN, user, or password.
@@ -1698,11 +1651,6 @@ As with any delete operation, you are prompted to be sure you wish to proceed wi lastUpdated => 1031514049 }, - '308' => { - message => q|Edit Profile Settings|, - lastUpdated => 1031514049 - }, - '906' => { message => q|Designer URL|, lastUpdated => 1050191766 @@ -1723,110 +1671,6 @@ As with any delete operation, you are prompted to be sure you wish to proceed wi lastUpdated => 1031514049 }, - '607' => { - message => q|Anonymous Registration
-Do you wish visitors to your site to be able to register themselves? -

- -Run On Registration
-If there is a command line specified here, it will be executed each time a user registers anonymously. -

- -Enable Karma?
-Should karma be enabled? -

- -Karma Per Login
-The amount of karma a user should be given when they log in. This only takes affect if karma is enabled. -

- -Session Timeout
-The amount of time that a user session remains active (before needing to log in again). This timeout is reset each time a user views a page. Therefore if you set the timeout for 8 hours, a user would have to log in again if s/he hadn't visited the site for 8 hours. -

- -Allow users to deactivate their account?
-Do you wish to provide your users with a means to deactivate their account without your intervention? -

- -Authentication Method (default)
-What should the default authentication method be for new accounts that are created? The two available options are WebGUI and LDAP. WebGUI authentication means that the users will authenticate against the username and password stored in the WebGUI database. LDAP authentication means that users will authenticate against an external LDAP server. -

- -NOTE: Authentication settings can be customized on a per user basis. - - - -

-NOTE: Depending upon what authentication modules you have installed in your system you'll see any number of options after this point. The following are the options for the two defaultly installed authentication methods. -

- -Encrypt Login?
-Should the system use the https protocol for the login form? Note that setting this option to true will only encrypt the authentication itself, not anything else before or after the authentication. -

- -

WebGUI Authentication Options

- -Minimum Password Length
-Set the minimum length that passwords can be. If set to 0, there is no minimum length. -

- -Password Timeout
-Set how long before a user's password expires and has to change it. -

- -Expire passwords on user creation?
-Should a user's password be expired when he is created by an administrator forcing a change? -

- -Allow Users to Change Username?
-Should users be allowed to change their usernames? -

- -Allow Users to Change Password?
-Should users be allowed to change their passwords? -

- -Send welcome message?
-Do you wish WebGUI to automatically send users a welcome message when they register for your site? -

-NOTE: In addition to the message you specify below, the user's account information will be included in the message. -

- -Welcome Message
-Type the message that you'd like to be sent to users upon registration. -

- -Recover Password Message
-Type a message that will be sent to your users if they try to recover their WebGUI password. -

- - - -

LDAP Authentication Options

- -LDAP URL (default)
-The default url to your LDAP server. The LDAP URL takes the form of ldap://[server]:[port]/[base DN]. Example: ldap://ldap.mycompany.com:389/o=MyCompany. -

- - - - -LDAP Identity
-The LDAP Identity is the unique identifier in the LDAP server that the user will be identified against. Often this field is shortname, which takes the form of first initial + last name. Example: jdoe. Therefore if you specify the LDAP identity to be shortname then Jon Doe would enter jdoe during the registration process. -

- -LDAP Identity Name
-The label used to describe the LDAP Identity to the user. For instance, some companies use an LDAP server for their proxy server users to authenticate against. In the documentation or training already provided to their users, the LDAP identity is known as their Web Username. So you could enter that label here for consitency. -

- -LDAP Password Name
-Just as the LDAP Identity Name is a label, so is the LDAP Password Name. Use this label as you would LDAP Identity Name. -

- -|, - lastUpdated => 1098327046 - }, - '773' => { message => q|File|, lastUpdated => 1036893165 @@ -1897,11 +1741,6 @@ Just as the LDAP Identity Name is a label, so is the LDAP Password Name. Use thi lastUpdated => 1065876868 }, - '652' => { - message => q|User Settings, Edit|, - lastUpdated => 1076700672 - }, - '1062' => { message => q|Forum Notification Template|, lastUpdated => 1066580520 @@ -2132,11 +1971,6 @@ The user id of the currently logged in user. lastUpdated => 1031514049 }, - '525' => { - message => q|Edit Content Settings|, - lastUpdated => 1031514049 - }, - '27' => { message => q|Sunday|, lastUpdated => 1031514049 @@ -2551,45 +2385,6 @@ A message stating that the user is receiving the message because they subscribed lastUpdated => 1031514049 }, - '617' => { - message => q|Settings are items that allow you to adjust WebGUI to your particular needs. -

- - -Edit Company Information
-Information specific about the company or individual who controls this installation of WebGUI. -

- - -Edit Content Settings
-Settings related to content and content management. -

- - -Edit Messaging Settings
-Settings concerning email and other related messaging functions. -

- - -Edit Miscellaneous Settings
-Anything we couldn't find a place for. -

- - -Edit Profile Settings
-Define what user profiles look like and what the users have the ability to edit. -

- - -Edit User Settings
-Settings relating to users (beyond profile information), like authentication information, and registration options. -

- - -|, - lastUpdated => 1044139325 - }, - '352' => { message => q|Date Of Entry|, lastUpdated => 1031514049 @@ -2651,39 +2446,6 @@ will be modified to make it unique.|, lastUpdated => 1052850265 }, - '629' => { - message => q|Use shared clipboard?
-Enables a single, system-wide clipboard shared by all users. Default is user separated clipboards. -

- -Use shared trash?
-Enables a single, system-wide trash shared by all users. Default is user separated trash. -

- -If proxied, use real client IP address?
-If enabled and if the environment variable HTTP_X_FORWARDED_FOR is present, it's value will be used in place of REMOTE_ADDRESS as the client browser's IP address. This is required for IP based groups to function properly in reverse-proxied, load-balanced system architectures. In these environments, all requests would otherwise appear to come from the same host, namely the proxy server. If you are uncertain if you need this setting enabled, you should probably leave it turned off. -

- -Prevent Proxy Caching
-Some companies have proxy servers that cause problems with WebGUI. If you're experiencing problems with WebGUI, and you have a proxy server, you may want to set this setting to Yes. Beware that WebGUI's URLs will not be as user-friendly after this feature is turned on. -

- -Show debugging?
-Show debugging information in WebGUI's output. This is primarily useful for WebGUI developers, but can also be interesting for Administrators trying to troubleshoot a problem. -

- -Track page statistics?
-WebGUI can track some statistical information for your site. However, this will add a little extra strain on your processor and will make your database grow much more quickly. Enable this only if you do not have an external web statistics program. -

- - -Host To Use
-Select which host to use by default when generating URLs. Config Sitename will use the "sitename" variable from your config file. And Env HTTP Host will use the "HTTP_HOST" environment variable provided by the web server. -

-|, - lastUpdated => 1066641387 - }, - '498' => { message => q|End Date|, lastUpdated => 1031514049 @@ -2875,11 +2637,6 @@ The password you use to connect to the DSN. lastUpdated => 1031514049 }, - '1053' => { - message => q|Manage Replacements|, - lastUpdated => 1066419031 - }, - '462' => { message => q|Time Format|, lastUpdated => 1031514049 @@ -3748,21 +3505,6 @@ You also cannot import a theme from a version of WebGUI that is newer than the o lastUpdated => 1031514049 }, - '611' => { - message => q|Company Name
-The name of your company. It will appear on all emails and anywhere you use the Company Name style macro. -

- -Company Email Address
-A general email address at your company. This is the address that all automated messages will come from. It can also be used via Company Email Address style macro. -

- -Company URL
-The primary URL of your company. This will appear on all automated emails sent from the WebGUI system. It is also available via the Company URL style macro. -|, - lastUpdated => 1094408401 - }, - '988' => { message => q|Are you certain you wish to delete this database link? The following items are using this link and will no longer work if you delete it:|, lastUpdated => 1056151382 @@ -4151,11 +3893,6 @@ The description of this forum as passed by the calling object. lastUpdated => 1050437207 }, - '1080' => { - message => q|Use admin style?|, - lastUpdated => 1073161583 - }, - '320' => { message => q|Yahoo! Messenger Id|, lastUpdated => 1031514049 @@ -4171,11 +3908,6 @@ The description of this forum as passed by the calling object. lastUpdated => 1033836660 }, - '674' => { - message => q|Miscellaneous Settings, Edit|, - lastUpdated => 1038889454 - }, - '913' => { message => q|Template|, lastUpdated => 1050232279 @@ -4325,11 +4057,6 @@ Large sites using external group data will be making many calls to the external lastUpdated => 1043879848 }, - '140' => { - message => q|Edit Miscellaneous Settings|, - lastUpdated => 1031514049 - }, - '104' => { message => q|Page URL|, lastUpdated => 1031514049 @@ -4887,11 +4614,6 @@ The description of this forum as passed by the calling object. lastUpdated => 1038889471 }, - '679' => { - message => q|Content Settings, Edit|, - lastUpdated => 1038872365 - }, - '831' => { message => q|Collateral Macros|, lastUpdated => 1050441851 @@ -5061,8 +4783,8 @@ You can organize collateral into different folders, but names must be unique, ev }, '1027' => { - message => q|Allow replacements?|, - lastUpdated => 1065966244 + message => q|Use content filters?|, + lastUpdated => 1099434667 }, '103' => { @@ -5672,11 +5394,6 @@ The headings of columns on things like message boards and user contributions. lastUpdated => 1036905972 }, - '143' => { - message => q|Manage Settings|, - lastUpdated => 1031514049 - }, - '464' => { message => q|Text Area Columns|, lastUpdated => 1031514049 @@ -6096,11 +5813,6 @@ Macros always begin with a caret (^) and follow with at least one other char lastUpdated => 1031514049 }, - '656' => { - message => q|Company Information, Edit|, - lastUpdated => 1038872019 - }, - '1079' => { message => q|Printable Style|, lastUpdated => 1073152790 @@ -6222,7 +5934,7 @@ Macros always begin with a caret (^) and follow with at least one other char }, '1052' => { - message => q|Edit Replacement|, + message => q|Edit Content Filter|, lastUpdated => 1066418983 }, @@ -6359,7 +6071,7 @@ A condition indicating whether the current user is a moderator.

allowReplacements
-A condition indicating whether this forum tollerates replacements. +A condition indicating whether this forum uses content filters.

@@ -6494,11 +6206,6 @@ Privileges and styles assigned to pages in the package will not be copied when t lastUpdated => 1031514049 }, - '117' => { - message => q|Edit User Settings|, - lastUpdated => 1031514049 - }, - '852' => { message => q|Copy this template.|, lastUpdated => 1039926448 @@ -6585,11 +6292,6 @@ Privileges and styles assigned to pages in the package will not be copied when t lastUpdated => 1078462928 }, - '1081' => { - message => q|Admin Style|, - lastUpdated => 1073161679 - }, - '505' => { message => q|Add a new template.|, lastUpdated => 1031514049 @@ -6635,11 +6337,6 @@ Privileges and styles assigned to pages in the package will not be copied when t lastUpdated => 1038871918 }, - '133' => { - message => q|Edit Messaging Settings|, - lastUpdated => 1044138764 - }, - '149' => { message => q|Users|, lastUpdated => 1031514049 @@ -6747,7 +6444,7 @@ How big (in pixels) should the thumbnail for this image be? }, '1047' => { - message => q|Add a replacement.|, + message => q|Add a content filter.|, lastUpdated => 1066418669 }, @@ -6812,8 +6509,8 @@ If set to yes then a string will be added to the bottom of a post each time its If set to yes then users will be able to use a rich editor when writing their posts.

-Allow replacements?
-If set to yes then users will be able to use replacements in thier posts. Replacements can be managed from the settings. +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
@@ -7151,11 +6848,6 @@ A randomly generated number. This is often used on images (such as banner ads) t lastUpdated => 1031514049 }, - '4' => { - message => q|Manage settings.|, - lastUpdated => 1031514049 - }, - '528' => { message => q|Template Name|, lastUpdated => 1031514049 @@ -7320,12 +7012,6 @@ config file.

context => q|Title of the package manager for the admin console.| }, - 'settings' => { - message => q|Settings|, - lastUpdated =>1092930637, - context => q|Title of the settings manager for the admin console.| - }, - 'templates' => { message => q|Templates|, lastUpdated =>1092930637, @@ -7350,8 +7036,8 @@ config file.

context => q|Title of the content filters manager for the admin console.| }, - 'user profile settings' => { - message => q|User Profile Settings|, + 'user profiling' => { + message => q|User Profiling|, lastUpdated =>1092930637, context => q|Title of the user profile settings manager for the admin console.| }, @@ -7362,6 +7048,229 @@ config file.

context => q|Title of the page statistics viewer for the admin console.| }, + 'user' => { + message => q|User|, + lastUpdated =>1092930637, + context => q|Title of a tab in the global settings.| + }, + + 'content' => { + message => q|Content|, + lastUpdated =>1092930637, + context => q|Title of a tab in the global settings.| + }, + + 'ui' => { + message => q|UI|, + lastUpdated =>1092930637, + context => q|Title of a tab in the global settings.| + }, + + 'messaging' => { + message => q|Messaging|, + lastUpdated =>1092930637, + context => q|Title of a tab in the global settings.| + }, + + 'authentication' => { + message => q|Authentication|, + lastUpdated =>1092930637, + context => q|Title of a tab in the global settings.| + }, + + 'company' => { + message => q|Company|, + lastUpdated =>1092930637, + context => q|Title of a tab in the global settings.| + }, + + 'misc' => { + message => q|Miscellaneous|, + lastUpdated =>1092930637, + context => q|Title of a tab in the global settings.| + }, + + 'settings' => { + message => q|Settings|, + lastUpdated =>1092930637, + context => q|Title of the settings manager for the admin console.| + }, + + 'settings help' => { + message => q|Settings allow you to customize WebGUI's default values to satisfy your particular needs. +

+ Use shared clipboard?
+Enables a single, system-wide clipboard shared by all users. Default is user separated clipboards. +

+ +Use shared trash?
+Enables a single, system-wide trash shared by all users. Default is user separated trash. +

+ +If proxied, use real client IP address?
+If enabled and if the environment variable HTTP_X_FORWARDED_FOR is present, it's value will be used in place of REMOTE_ADDRESS as the client browser's IP address. This is required for IP based groups to function properly in reverse-proxied, load-balanced system architectures. In these environments, all requests would otherwise appear to come from the same host, namely the proxy server. If you are uncertain if you need this setting enabled, you should probably leave it turned off. +

+ +Prevent Proxy Caching
+Some companies have proxy servers that cause problems with WebGUI. If you're experiencing problems with WebGUI, and you have a proxy server, you may want to set this setting to Yes. Beware that WebGUI's URLs will not be as user-friendly after this feature is turned on. +

+ +Show debugging?
+Show debugging information in WebGUI's output. This is primarily useful for WebGUI developers, but can also be interesting for Administrators trying to troubleshoot a problem. +

+ +Track page statistics?
+WebGUI can track some statistical information for your site. However, this will add a little extra strain on your processor and will make your database grow much more quickly. Enable this only if you do not have an external web statistics program. +

+ + +Host To Use
+Select which host to use by default when generating URLs. Config Sitename will use the "sitename" variable from your config file. And Env HTTP Host will use the "HTTP_HOST" environment variable provided by the web server. +

+ + Company Name
+The name of your company. It will appear on all emails and anywhere you use the Company Name style macro. +

+ +Company Email Address
+A general email address at your company. This is the address that all automated messages will come from. It can also be used via Company Email Address style macro. +

+ +Company URL
+The primary URL of your company. This will appear on all automated emails sent from the WebGUI system. It is also available via the Company URL style macro. + + + Default Home Page
Some really small sites don't have a home page, but instead like to use one of their internal pages like "About Us" or "Company Information" as their home page. For that reason, you can set the default page of your site to any page in the site. That page will be the one people go to if they type in just your URL http://www.mywebguisite.com, or if they click on the Home link generated by the ^H; navigation macro. + +

Not Found Page
If a page that a user requests is not found in the system, the user can either be redirected to the home page or to an error page where they can attempt to find what they were looking for. You decide which is better for your users. + +

URL Extension
Add an extension such as "html", "php", or "asp" to each new page URL as it is created.

NOTE: Do NOT include the dot "." in this. So the field should look like "html" not ".html". + +

Favicon
An icon that appears on Internet Explorer short cuts such as your "Favorites". More information about Favicon is available online. + +

Site Icon
An icon that appears in the URL bar of most modern browsers. It may also appear in the bookmarks of the browser. The image must be 16x16 pixels. + +

Maximum Attachment Size
The size (in kilobytes) of the maximum allowable attachment to be uploaded to your system. + +

Max Image Size
If images are uploaded to your system that are bigger than the max image size, then they will be resized to the max image size. The max image size is measured in pixels and will use the size of the longest side of the image to determine if the limit has been reached. + +

Thumbnail Size
When images are uploaded to your system, they will automatically have thumbnails generated at the size specified here (unless overridden on a case-by-case basis). Thumbnail size is measured in pixels. + +

Snippet Preview Length
How many characters of a snippet should be displayed in the collateral management system main listing. + +Text Area Rows, Text Area Columns and Text Box Size allow the size of +forms that WebGUI generates to be customized on a site-by-site basis. + +

Text Area Rows
This setting specifies how many rows of characters will be displayed in textareas on the site. + +

Text Area Columns
This setting specifies how many columns of characters will be displayed in textareas on the site. + +

Text Box Size
This setting specifies how many characters can be displayed at once in text boxes on the site. + + + Anonymous Registration
+Do you wish visitors to your site to be able to register themselves? +

+ +Run On Registration
+If there is a command line specified here, it will be executed each time a user registers anonymously. +

+ +Enable Karma?
+Should karma be enabled? +

+ +Karma Per Login
+The amount of karma a user should be given when they log in. This only takes affect if karma is enabled. +

+ +Session Timeout
+The amount of time that a user session remains active (before needing to log in again). This timeout is reset each time a user views a page. Therefore if you set the timeout for 8 hours, a user would have to log in again if s/he hadn't visited the site for 8 hours. +

+ +Allow users to deactivate their account?
+Do you wish to provide your users with a means to deactivate their account without your intervention? +

+ +Authentication Method (default)
+What should the default authentication method be for new accounts that are created? The two available options are WebGUI and LDAP. WebGUI authentication means that the users will authenticate against the username and password stored in the WebGUI database. LDAP authentication means that users will authenticate against an external LDAP server. +

+ +NOTE: Authentication settings can be customized on a per user basis. + + + +

+NOTE: Depending upon what authentication modules you have installed in your system you'll see any number of options after this point. The following are the options for the two defaultly installed authentication methods. +

+ +Encrypt Login?
+Should the system use the https protocol for the login form? Note that setting this option to true will only encrypt the authentication itself, not anything else before or after the authentication. +

+ +

WebGUI Authentication Options

+ +Minimum Password Length
+Set the minimum length that passwords can be. If set to 0, there is no minimum length. +

+ +Password Timeout
+Set how long before a user's password expires and has to change it. +

+ +Expire passwords on user creation?
+Should a user's password be expired when he is created by an administrator forcing a change? +

+ +Allow Users to Change Username?
+Should users be allowed to change their usernames? +

+ +Allow Users to Change Password?
+Should users be allowed to change their passwords? +

+ +Send welcome message?
+Do you wish WebGUI to automatically send users a welcome message when they register for your site? +

+NOTE: In addition to the message you specify below, the user's account information will be included in the message. +

+ +Welcome Message
+Type the message that you'd like to be sent to users upon registration. +

+ +Recover Password Message
+Type a message that will be sent to your users if they try to recover their WebGUI password. +

+ + + +

LDAP Authentication Options

+ +LDAP URL (default)
+The default url to your LDAP server. The LDAP URL takes the form of ldap://[server]:[port]/[base DN]. Example: ldap://ldap.mycompany.com:389/o=MyCompany. +

+ + + + +LDAP Identity
+The LDAP Identity is the unique identifier in the LDAP server that the user will be identified against. Often this field is shortname, which takes the form of first initial + last name. Example: jdoe. Therefore if you specify the LDAP identity to be shortname then Jon Doe would enter jdoe during the registration process. +

+ +LDAP Identity Name
+The label used to describe the LDAP Identity to the user. For instance, some companies use an LDAP server for their proxy server users to authenticate against. In the documentation or training already provided to their users, the LDAP identity is known as their Web Username. So you could enter that label here for consitency. +

+ +LDAP Password Name
+Just as the LDAP Identity Name is a label, so is the LDAP Password Name. Use this label as you would LDAP Identity Name. +

+ +|, + lastUpdated => 1098327046 + }, + }; diff --git a/lib/WebGUI/i18n/English/WebGUIProfile.pm b/lib/WebGUI/i18n/English/WebGUIProfile.pm index 25eba4900..222e65e6b 100644 --- a/lib/WebGUI/i18n/English/WebGUIProfile.pm +++ b/lib/WebGUI/i18n/English/WebGUIProfile.pm @@ -71,6 +71,12 @@ our $I18N = { lastUpdated => 1031514049 }, + 'user profiling' => { + message => q|User Profiling|, + lastUpdated =>1092930637, + context => q|Title of the user profile settings manager for the admin console.| + }, + }; 1; diff --git a/www/extras/tabs/tabs.css b/www/extras/tabs/tabs.css index 803d5f0bf..fc9c2cdaf 100644 --- a/www/extras/tabs/tabs.css +++ b/www/extras/tabs/tabs.css @@ -20,7 +20,7 @@ div.tabs { top: 2px; left: 8px; - white-space: nowrap; +/* white-space: nowrap;*/ cursor: default !important; z-index: 10000; }

'.deleteIcon("op=deleteReplacement&replacementId=".$data->{replacementId}) diff --git a/lib/WebGUI/Operation/Settings.pm b/lib/WebGUI/Operation/Settings.pm index 10f3906f6..215e67e08 100644 --- a/lib/WebGUI/Operation/Settings.pm +++ b/lib/WebGUI/Operation/Settings.pm @@ -11,12 +11,13 @@ package WebGUI::Operation::Settings; #------------------------------------------------------------------- use strict qw(vars subs); +use Tie::IxHash; +use WebGUI::AdminConsole; use WebGUI::DateTime; use WebGUI::Grouping; -use WebGUI::HTMLForm; +use WebGUI::TabForm; use WebGUI::Icon; use WebGUI::International; -use WebGUI::Operation::Shared; use WebGUI::Privilege; use WebGUI::Session; use WebGUI::Style; @@ -24,197 +25,248 @@ use WebGUI::SQL; use WebGUI::URL; #------------------------------------------------------------------- -sub _submenu { - my (%menu); - tie %menu, 'Tie::IxHash'; - $menu{WebGUI::URL::page('op=manageSettings')} = WebGUI::International::get(4); - return menuWrapper($_[0],\%menu); -} - -#------------------------------------------------------------------- -sub www_editCompanyInformation { +sub www_editSettings { return WebGUI::Privilege::adminOnly() unless (WebGUI::Grouping::isInGroup(3)); - my ($output, $f); - $output .= helpIcon("company information edit"); - $output .= '

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

'; - $f = WebGUI::HTMLForm->new; - $f->hidden("op","saveSettings"); - $f->text("companyName",WebGUI::International::get(125),$session{setting}{companyName}); - $f->email("companyEmail",WebGUI::International::get(126),$session{setting}{companyEmail}); - $f->url("companyURL",WebGUI::International::get(127),$session{setting}{companyURL}); - $f->submit; - $output .= $f->print; - return _submenu($output); -} - -#------------------------------------------------------------------- -sub www_editContentSettings { - return WebGUI::Privilege::adminOnly() unless (WebGUI::Grouping::isInGroup(3)); - my ($output, %htmlFilter, $f, $pages); - $pages = WebGUI::SQL->buildHashRef("select pageId,menuTitle from page order by menuTitle"); - %htmlFilter = ('none'=>WebGUI::International::get(420), 'most'=>WebGUI::International::get(421), - 'javascript'=>WebGUI::International::get(526), 'all'=>WebGUI::International::get(419)); - $output .= helpIcon("content settings edit"); - $output .= '

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

'; - $f = WebGUI::HTMLForm->new; - $f->hidden("op","saveSettings"); - $f->selectList("defaultPage",$pages,WebGUI::International::get(527),[$session{setting}{defaultPage}]); - $f->selectList("notFoundPage",$pages,WebGUI::International::get(141),[$session{setting}{notFoundPage}]); - $f->text( + my $i18n = WebGUI::International->new("WebGUI"); + my %tabs; + tie %tabs, 'Tie::IxHash'; + %tabs = ( + company=>{ label=>$i18n->get("company") }, + content=>{ label=>$i18n->get("content") }, + ui=>{ label=>$i18n->get("ui") }, + messaging=>{ label=>$i18n->get("messaging") }, + misc=>{ label=>$i18n->get("misc") }, + user=>{ label=>$i18n->get("user") }, + auth=>{ label=>$i18n->get("authentication") }, + ); + my $tabform = WebGUI::TabForm->new(\%tabs); + $tabform->hidden({ + name=>"op", + value=>"saveSettings"}); +# company settings + $tabform->getTab("company")->text( + -name=>"companyName", + -label=>$i18n->get(125), + -value=>$session{setting}{companyName} + ); + $tabform->getTab("company")->text( + -name=>"companyEmail", + -label=>$i18n->get(126), + -value=>$session{setting}{companyEmail} + ); + $tabform->getTab("company")->url( + -name=>"companyURL", + -label=>$i18n->get(127), + -value=>$session{setting}{companyURL} + ); +# content settings + my $pages = WebGUI::SQL->buildHashRef("select pageId,menuTitle from page order by menuTitle"); + my %htmlFilter = ( + 'none'=>$i18n->get(420), + 'most'=>$i18n->get(421), + 'javascript'=>$i18n->get(526), + 'all'=>$i18n->get(419) + ); + $tabform->getTab("content")->selectList( + -name=>"defaultPage", + -options=>$pages, + -label=>$i18n->get(527), + -value=>[$session{setting}{defaultPage}] + ); + $tabform->getTab("content")->selectList( + -name=>"notFoundPage", + -options=>$pages, + -label=>$i18n->get(141), + -value=>[$session{setting}{notFoundPage}] + ); + $tabform->getTab("content")->text( -name=>"urlExtension", -value=>$session{setting}{urlExtension}, - -label=>WebGUI::International::get("url extension") + -label=>$i18n->get("url extension") ); - $f->text( + $tabform->getTab("content")->text( -name=>"favicon", - -label=>WebGUI::International::get(897), + -label=>$i18n->get(897), -value=>$session{setting}{favicon} ); - $f->text( + $tabform->getTab("content")->text( -name=>"siteicon", - -label=>WebGUI::International::get(898), + -label=>$i18n->get(898), -value=>$session{setting}{siteicon} ); - $f->integer("maxAttachmentSize",WebGUI::International::get(130),$session{setting}{maxAttachmentSize}); - $f->integer("maxImageSize",WebGUI::International::get(583),$session{setting}{maxImageSize}); - $f->integer("thumbnailSize",WebGUI::International::get(406),$session{setting}{thumbnailSize}); - $f->integer("snippetsPreviewLength",WebGUI::International::get(888),$session{setting}{snippetsPreviewLength}); - $f->integer("textAreaRows",WebGUI::International::get(463),$session{setting}{textAreaRows}); - $f->integer("textAreaCols",WebGUI::International::get(464),$session{setting}{textAreaCols}); - $f->integer("textBoxSize",WebGUI::International::get(465),$session{setting}{textBoxSize}); - $f->submit; - $output .= $f->print; - return _submenu($output); -} - -#------------------------------------------------------------------- -sub www_editMessagingSettings { - return WebGUI::Privilege::adminOnly() unless (WebGUI::Grouping::isInGroup(3)); - my ($output, $f); - $output .= helpIcon("messaging settings edit"); - $output .= '

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

'; - $f = WebGUI::HTMLForm->new; - $f->hidden("op","saveSettings"); - $f->text("smtpServer",WebGUI::International::get(135),$session{setting}{smtpServer}); - $f->textarea("mailFooter",WebGUI::International::get(824),$session{setting}{mailFooter}); - $f->yesNo("alertOnNewUser",WebGUI::International::get(534),$session{setting}{alertOnNewUser}); - $f->group("onNewUserAlertGroup",WebGUI::International::get(535),[$session{setting}{onNewUserAlertGroup}]); - $f->submit; - $output .= $f->print; - return _submenu($output); -} - -#------------------------------------------------------------------- -sub www_editMiscSettings { - return WebGUI::Privilege::adminOnly() unless (WebGUI::Grouping::isInGroup(3)); - my ($output, $f); - $output .= helpIcon("miscellaneous settings edit"); - $output .= '

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

'; - $f = WebGUI::HTMLForm->new; - $f->hidden("op","saveSettings"); - $f->yesNo("sharedClipboard",WebGUI::International::get(947),$session{setting}{sharedClipboard}); - $f->yesNo("sharedTrash",WebGUI::International::get(946),$session{setting}{sharedTrash}); - $f->yesNo("proxiedClientAddress",WebGUI::International::get(973),$session{setting}{proxiedClientAddress}); - $f->yesNo("preventProxyCache",WebGUI::International::get(400),$session{setting}{preventProxyCache}); - $f->yesNo("showDebug",WebGUI::International::get(707),$session{setting}{showDebug}); - $f->yesNo("trackPageStatistics",WebGUI::International::get(749),$session{setting}{trackPageStatistics}); - $f->selectList( + $tabform->getTab("content")->integer( + -name=>"maxAttachmentSize", + -label=>$i18n->get(130), + -value=>$session{setting}{maxAttachmentSize} + ); + $tabform->getTab("content")->integer( + -name=>"maxImageSize", + -label=>$i18n->get(583), + -value=>$session{setting}{maxImageSize} + ); + $tabform->getTab("content")->integer( + -name=>"thumbnailSize", + -label=>$i18n->get(406), + -value=>$session{setting}{thumbnailSize} + ); + $tabform->getTab("content")->yesNo( + -name=>"metaDataEnabled", + -label=>$i18n->get("Enable Metadata ?", 'MetaData'), + -value=>$session{setting}{metaDataEnabled} + ); +# user interface settings + $tabform->getTab("ui")->yesNo( + -name=>"sharedClipboard", + -label=>$i18n->get(947), + -value=>$session{setting}{sharedClipboard} + ); + $tabform->getTab("ui")->yesNo( + -name=>"sharedTrash", + -label=>$i18n->get(946), + -value=>$session{setting}{sharedTrash} + ); + $tabform->getTab("ui")->integer( + -name=>"snippetsPreviewLength", + -label=>$i18n->get(888), + -value=>$session{setting}{snippetsPreviewLength} + ); + $tabform->getTab("ui")->integer( + -name=>"textAreaRows", + -label=>$i18n->get(463), + -value=>$session{setting}{textAreaRows} + ); + $tabform->getTab("ui")->integer( + -name=>"textAreaCols", + -label=>$i18n->get(464), + -value=>$session{setting}{textAreaCols} + ); + $tabform->getTab("ui")->integer( + -name=>"textBoxSize", + -label=>$i18n->get(465), + -value=>$session{setting}{textBoxSize} + ); +# messaging settings + $tabform->getTab("messaging")->text( + -name=>"smtpServer", + -label=>$i18n->get(135), + -value=>$session{setting}{smtpServer} + ); + $tabform->getTab("messaging")->textarea( + -name=>"mailFooter", + -label=>$i18n->get(824), + -value=>$session{setting}{mailFooter} + ); + $tabform->getTab("messaging")->yesNo( + -name=>"alertOnNewUser", + -label=>$i18n->get(534), + -value=>$session{setting}{alertOnNewUser} + ); + $tabform->getTab("messaging")->group( + -name=>"onNewUserAlertGroup", + -label=>$i18n->get(535), + -value=>[$session{setting}{onNewUserAlertGroup}] + ); +# misc settings + $tabform->getTab("misc")->yesNo( + -name=>"proxiedClientAddress", + -label=>$i18n->get(973), + -value=>$session{setting}{proxiedClientAddress} + ); + $tabform->getTab("misc")->yesNo( + -name=>"preventProxyCache", + -label=>$i18n->get(400), + -value=>$session{setting}{preventProxyCache} + ); + $tabform->getTab("misc")->yesNo( + -name=>"showDebug", + -label=>$i18n->get(707), + -value=>$session{setting}{showDebug} + ); + $tabform->getTab("misc")->yesNo( + -name=>"trackPageStatistics", + -label=>$i18n->get(749), + -value=>$session{setting}{trackPageStatistics} + ); + $tabform->getTab("misc")->selectList( -name=>"hostToUse", -value=>[$session{setting}{hostToUse}], -options=>{ - sitename=>WebGUI::International::get(1070), - HTTP_HOST=>WebGUI::International::get(1071) + sitename=>$i18n->get(1070), + HTTP_HOST=>$i18n->get(1071) }, - -label=>WebGUI::International::get(1069) + -label=>$i18n->get(1069) ); - $f->yesNo( - -name=>"useAdminStyle", - -value=>$session{setting}{useAdminStyle}, - -label=>WebGUI::International::get(1080) +# user settings + $tabform->getTab("user")->yesNo( + -name=>"anonymousRegistration", + -label=>$i18n->get(118), + -value=>$session{setting}{anonymousRegistration} ); - $f->template( - -name=>"adminStyleId", - -namespace=>"style", - -value=>$session{setting}{adminStyleId}, - -label=>WebGUI::International::get(1081) + $tabform->getTab("user")->text( + -name=>"runOnRegistration", + -label=>$i18n->get(559), + -value=>$session{setting}{runOnRegistration} ); - $f->yesNo( - -name=>"metaDataEnabled", - -label=>WebGUI::International::get("Enable Metadata ?", 'MetaData'), - -value=>$session{setting}{metaDataEnabled}, - ); - $f->yesNo( + $tabform->getTab("user")->yesNo( + -name=>"useKarma", + -label=>$i18n->get(539), + -value=>$session{setting}{useKarma} + ); + $tabform->getTab("user")->integer( + -name=>"karmaPerLogin", + -label=>$i18n->get(540), + -value=>$session{setting}{karmaPerLogin} + ); + my ($interval, $units) = WebGUI::DateTime::secondsToInterval($session{setting}{sessionTimeout}); + $tabform->getTab("user")->interval( + -name=>"sessionTimeout", + -label=>$i18n->get(142), + -intervalValue=>$interval, + -unitsValue=>$units + ); + $tabform->getTab("user")->yesNo( + -name=>"selfDeactivation", + -label=>$i18n->get(885), + -value=>$session{setting}{selfDeactivation} + ); + $tabform->getTab("user")->yesNo( + -name=>"encryptLogin", + -label=>$i18n->get(1006), + -value=>$session{setting}{encryptLogin} + ); + $tabform->getTab("user")->yesNo( -name=>"passiveProfilingEnabled", - -label=>WebGUI::International::get("Enable passive profiling ?", 'MetaData'), + -label=>$i18n->get("Enable passive profiling ?", 'MetaData'), -value=>$session{setting}{passiveProfilingEnabled}, - -extras=>' onChange="alert(\''.WebGUI::International::get("Illegal Warning","MetaData").'\')" ' + -extras=>' onChange="alert(\''.$i18n->get("Illegal Warning","MetaData").'\')" ' ); - $f->submit; - $output .= $f->print; - return _submenu($output); -} - -#------------------------------------------------------------------- -sub www_editUserSettings { - return WebGUI::Privilege::adminOnly() unless (WebGUI::Grouping::isInGroup(3)); - my ($output, $f, $cmd, $html); - $output .= helpIcon("user settings edit"); - $output .= '

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

'; +# auth settings WebGUI::Style::setScript($session{config}{extrasURL}."/swapLayers.js",{language=>"Javascript"}); - $output .= ''; - $f = WebGUI::HTMLForm->new("","","","","","border='0' cellpadding='0' cellspacing='0' width='800'"); - $f->hidden("op","saveSettings"); - $f->raw('