converted items to articles
This commit is contained in:
parent
ca59a02d3c
commit
6e568979e6
5 changed files with 64 additions and 14 deletions
|
|
@ -4,3 +4,9 @@
|
|||
privacy problems.
|
||||
- Removed all the old styles. They now exist as themes in the user
|
||||
contributions area of plainblack.com.
|
||||
- Migrated styles to templates and removed the styles system.
|
||||
- Updated page templates to be more powerful.
|
||||
- Converted items to articles and removed the item wobject.
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -75,7 +75,10 @@ while (my $template = $sth->hashRef) {
|
|||
<tmpl_if session.var.adminOn>
|
||||
<style>
|
||||
div.wobject:hover {
|
||||
border: 1px outset #cccccc;
|
||||
border: 2px ridge gray;
|
||||
}
|
||||
div.wobject {
|
||||
border: 2px hidden;
|
||||
}
|
||||
</style>
|
||||
</tmpl_if>
|
||||
|
|
@ -90,18 +93,60 @@ while (my $template = $sth->hashRef) {
|
|||
$sth->finish;
|
||||
|
||||
#--------------------------------------------
|
||||
#print "\tUpdating config file.\n" unless ($quiet);
|
||||
#my $pathToConfig = '../../etc/'.$configFile;
|
||||
#my $conf = Parse::PlainConfig->new('DELIM' => '=', 'FILE' => $pathToConfig);
|
||||
#my $wobjects = $conf->get("wobjects");
|
||||
#$conf->set("wobjects"=>$wobjects);
|
||||
#$conf->write;
|
||||
print "\tConverting items into articles.\n" unless ($quiet);
|
||||
my $sth = WebGUI::SQL->read("select * from template where namespace='Item'");
|
||||
while (my $template = $sth->hashRef) {
|
||||
$template->{name} =~ s/Default (.*?)/$1/i;
|
||||
if ($template->{templateId} < 1000) {
|
||||
($template->{templateId}) = WebGUI::SQL->quickArray("select max(templateId) from template where namespace='Article' and templateId<1000");
|
||||
$template->{templateId}++;
|
||||
} else {
|
||||
($template->{templateId}) = WebGUI::SQL->quickArray("select max(templateId) from template where namespace='Article'");
|
||||
if ($template->{templateId} > 999) {
|
||||
$template->{templateId}++;
|
||||
} else {
|
||||
$template->{templateId} = 1000;
|
||||
}
|
||||
}
|
||||
WebGUI::SQL->write("insert into template (templateId,name,template,namespace) values (".$template->{templateId}.",
|
||||
".quote($template->{name}).", ".quote($template->{template}).", 'Article')");
|
||||
}
|
||||
$sth->finish;
|
||||
WebGUI::SQL->write("delete from template where namespace='Item'");
|
||||
WebGUI::SQL->write("update wobject set namespace='Article' where namespace='Item'");
|
||||
my $sth = WebGUI::SQL->read("select * from Item");
|
||||
while (my $data = $sth->hashRef) {
|
||||
WebGUI::SQL->write("insert into Article (wobjectId,linkURL,attachment) values (".$data->{wobjectId}.",
|
||||
".quote($data->{linkURL}).", ".quote($data->{attachment}).")");
|
||||
}
|
||||
$sth->finish;
|
||||
WebGUI::SQL->write("drop table Item");
|
||||
|
||||
|
||||
#--------------------------------------------
|
||||
print "\tUpdating config file.\n" unless ($quiet);
|
||||
my $pathToConfig = '../../etc/'.$configFile;
|
||||
my $conf = Parse::PlainConfig->new('DELIM' => '=', 'FILE' => $pathToConfig);
|
||||
my $macros = $conf->get("macros");
|
||||
delete $macros->{"\\"};
|
||||
$macros->{"\\\\"} = "Backslash_pageUrl";
|
||||
$conf->set("macros"=>$macros);
|
||||
my $wobjects = $conf->get("wobjects");
|
||||
my @newWobjects;
|
||||
foreach my $wobject (@{$wobjects}) {
|
||||
unless ($wobject eq "Item") {
|
||||
push(@newWobjects,$wobject);
|
||||
}
|
||||
}
|
||||
$conf->set("wobjects"=>\@newWobjects);
|
||||
$conf->write;
|
||||
|
||||
|
||||
|
||||
#--------------------------------------------
|
||||
print "\tRemoving unneeded files.\n" unless ($quiet);
|
||||
unlink("../../lib/WebGUI/Operation/Style.pm");
|
||||
unlink("../../lib/WebGUI/Wobject/Item.pm");
|
||||
#unlink("../../lib/WebGUI/Wobject/LinkList.pm");
|
||||
#unlink("../../lib/WebGUI/Wobject/FAQ.pm");
|
||||
|
||||
|
|
|
|||
|
|
@ -47,7 +47,6 @@ insert into help (helpId,namespace,titleId,bodyId,seeAlso) values (28, 'WebGUI',
|
|||
insert into help (helpId,namespace,titleId,bodyId,seeAlso) values (31, 'WebGUI', 681, 636, '30,WebGUI;1,WebGUI;3,WebGUI;');
|
||||
insert into help (helpId,namespace,titleId,bodyId,seeAlso) values (30, 'WebGUI', 680, 635, '31,WebGUI;');
|
||||
insert into help (helpId,namespace,titleId,bodyId,seeAlso) values (25, 'WebGUI', 675, 630, '60,WebGUI;');
|
||||
insert into help (helpId,namespace,titleId,bodyId,seeAlso) values (1, 'Item', 61, 71, '2,Item;21,WebGUI;');
|
||||
insert into help (helpId,namespace,titleId,bodyId,seeAlso) values (6, 'WebGUI', 656, 611, '12,WebGUI;');
|
||||
insert into help (helpId,namespace,titleId,bodyId,seeAlso) values (46, 'WebGUI', 696, 651, '66,WebGUI;');
|
||||
insert into help (helpId,namespace,titleId,bodyId,seeAlso) values (22, 'WebGUI', 672, 627, '12,WebGUI;');
|
||||
|
|
@ -62,7 +61,7 @@ insert into help (helpId,namespace,titleId,bodyId,seeAlso) values (1, 'LinkList'
|
|||
insert into help (helpId,namespace,titleId,bodyId,seeAlso) values (21, 'WebGUI', 671, 626, '19,WebGUI;18,WebGUI;27,WebGUI;14,WebGUI;');
|
||||
insert into help (helpId,namespace,titleId,bodyId,seeAlso) values (1, 'Article', 61, 71, '2,Article;71,WebGUI;21,WebGUI;');
|
||||
insert into help (helpId,namespace,titleId,bodyId,seeAlso) values (1, 'ExtraColumn', 61, 71, '21,WebGUI;');
|
||||
insert into help (helpId,namespace,titleId,bodyId,seeAlso) values (27, 'WebGUI', 677, 632, '1,Article;1,EventsCalendar;1,ExtraColumn;1,FAQ;1,FileManager;1,HttpProxy;1,Item;1,LinkList;1,DataForm;1,MessageBoard;1,Poll;1,Product;1,SiteMap;1,SQLReport;1,Survey;1,SyndicatedContent;1,USS;1,WobjectProxy;21,WebGUI;');
|
||||
insert into help (helpId,namespace,titleId,bodyId,seeAlso) values (27, 'WebGUI', 677, 632, '1,Article;1,EventsCalendar;1,ExtraColumn;1,FAQ;1,FileManager;1,HttpProxy;1,LinkList;1,DataForm;1,MessageBoard;1,Poll;1,Product;1,SiteMap;1,SQLReport;1,Survey;1,SyndicatedContent;1,USS;1,WobjectProxy;21,WebGUI;');
|
||||
insert into help (helpId,namespace,titleId,bodyId,seeAlso) values (1, 'Poll', 61, 71, '2,Poll;21,WebGUI;');
|
||||
insert into help (helpId,namespace,titleId,bodyId,seeAlso) values (1, 'SiteMap', 61, 71, '2,SiteMap;21,WebGUI;');
|
||||
insert into help (helpId,namespace,titleId,bodyId,seeAlso) values (1, 'SQLReport', 61, 71, '21,WebGUI;');
|
||||
|
|
@ -104,12 +103,11 @@ insert into help (helpId,namespace,titleId,bodyId,seeAlso) values (1, 'Survey',
|
|||
insert into help (helpId,namespace,titleId,bodyId,seeAlso) values (49, 'WebGUI', 785, 786, '53,WebGUI;54,WebGUI;56,WebGUI;20,WebGUI;61,WebGUI;55,WebGUI;');
|
||||
insert into help (helpId,namespace,titleId,bodyId,seeAlso) values (50, 'WebGUI', 825, 826, '33,WebGUI;');
|
||||
insert into help (helpId,namespace,titleId,bodyId,seeAlso) values (2, 'Article', 72, 73, '1,Article;51,WebGUI;');
|
||||
insert into help (helpId,namespace,titleId,bodyId,seeAlso) values (51, 'WebGUI', 827, 828, '2,Article;3,DataForm;3,EventsCalendar;3,FAQ;3,FileManager;2,Item;3,LinkList;2,MessageBoard;7,Product;2,SiteMap;2,SyndicatedContent;33,WebGUI;2,USS;');
|
||||
insert into help (helpId,namespace,titleId,bodyId,seeAlso) values (51, 'WebGUI', 827, 828, '2,Article;3,DataForm;3,EventsCalendar;3,FAQ;3,FileManager;3,LinkList;2,MessageBoard;7,Product;2,SiteMap;2,SyndicatedContent;33,WebGUI;2,USS;');
|
||||
insert into help (helpId,namespace,titleId,bodyId,seeAlso) values (3, 'EventsCalendar', 94, 95, '1,EventsCalendar;51,WebGUI;');
|
||||
insert into help (helpId,namespace,titleId,bodyId,seeAlso) values (3, 'FAQ', 76, 77, '1,FAQ;51,WebGUI;');
|
||||
insert into help (helpId,namespace,titleId,bodyId,seeAlso) values (3, 'FileManager', 75, 76, '1,FileManager;51,WebGUI;');
|
||||
insert into help (helpId,namespace,titleId,bodyId,seeAlso) values (4, 'EventsCalendar', 96, 97, '2,EventsCalendar;51,WebGUI;');
|
||||
insert into help (helpId,namespace,titleId,bodyId,seeAlso) values (2, 'Item', 73, 74, '1,Item;51,WebGUI;');
|
||||
insert into help (helpId,namespace,titleId,bodyId,seeAlso) values (3, 'LinkList', 75, 76, '1,LinkList;51,WebGUI;');
|
||||
insert into help (helpId,namespace,titleId,bodyId,seeAlso) values (2, 'MessageBoard', 73, 74, '75,WebGUI;76,WebGUI;73,WebGUI;77,WebGUI;72,WebGUI;74,WebGUI;1,MessageBoard;51,WebGUI;');
|
||||
insert into help (helpId,namespace,titleId,bodyId,seeAlso) values (2, 'SiteMap', 72, 73, '1,SiteMap;51,WebGUI;');
|
||||
|
|
@ -149,4 +147,6 @@ insert into help (helpId,namespace,titleId,bodyId,seeAlso) values (77, 'WebGUI',
|
|||
insert into help (helpId,namespace,titleId,bodyId,seeAlso) values (3, 'MessageBoard', 78, 79, '71,WebGUI;1,MessageBoard;');
|
||||
|
||||
|
||||
delete from international where namespace='Item';
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -14,8 +14,8 @@ uploadsPath = /data/WebGUI/www/uploads
|
|||
|
||||
authMethods = LDAP, WebGUI
|
||||
|
||||
wobjects = Article, EventsCalendar, ExtraColumn, FAQ, FileManager, HttpProxy, \
|
||||
Item, LinkList, DataForm, MessageBoard, Poll, Product, SiteMap, \
|
||||
wobjects = Article, EventsCalendar, ExtraColumn, FileManager, HttpProxy, \
|
||||
DataForm, MessageBoard, Poll, Product, SiteMap, \
|
||||
SQLReport, Survey, SyndicatedContent, USS, WobjectProxy
|
||||
|
||||
macros = a => a_account, \
|
||||
|
|
|
|||
|
|
@ -109,7 +109,6 @@ use WebGUI::Operation::Search ();
|
|||
use WebGUI::Operation::Settings ();
|
||||
use WebGUI::Operation::Shared ();
|
||||
use WebGUI::Operation::Statistics ();
|
||||
use WebGUI::Operation::Style ();
|
||||
use WebGUI::Operation::Template ();
|
||||
use WebGUI::Operation::Theme ();
|
||||
use WebGUI::Operation::Trash ();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue