diff --git a/docs/upgrades/7fixup.pl b/docs/upgrades/7fixup.pl index e85805571..ce3d520e3 100644 --- a/docs/upgrades/7fixup.pl +++ b/docs/upgrades/7fixup.pl @@ -17,16 +17,66 @@ addPrototypes(); rearrangeImportNode(); addNewStyles(); addRobots(); -#deleteOldContent(); -#addNewContent(); +deleteOldContent(); +addNewContent(); $versionTag->commit; purgeOldRevisions(); finish($session); # this line required +#------------------------------------------------- +sub addNewContent { + print "\tAdding new content.\n"; + my $home = WebGUI::Asset->getDefault($session); + $home->addChild({ + className=>"WebGUI::Asset::Wobject::Article", + title=>"Welcome", + menuTitle=>"Welcome", + url=>"home/welcome", + ownerUserId=>'3', + groupIdView=>'7', + groupIdEdit=>'4', + description=>q|

The WebGUI Content Engine is a powerful and easy to use system for managing web sites, and building web applications. It provides thousands of features out of the box, and lots of plug-in points so you can extend it to match your needs. It's easy enough for the average business user, but powerful enough for any large enterprise.

+ +

There are thousands of small and large businesses, schools, universities, governments, associations, clubs, churches, projects, and communities using WebGUI all over the world today. A brief list of some of them can be found here. Your site should be on that list.

|, + templateId=>'PBtmpl0000000000000002' + }); + $home->addChild({ + className=>"WebGUI::Asset::Wobject::Article", + title=>"Key Benefits", + menuTitle=>"Key Benefits", + url=>"home/key-benefits", + ownerUserId=>'3', + groupIdView=>'7', + groupIdEdit=>'4', + description=>q| +

+Easy To Use - WebGUI is absolutely easy to use. WebGUI 7 has a completely revamped user interface to make it even easier to use. There are lots of visual cues, consistent icons, helper apps, and a huge repository of built-in help files. +

+

+Workflow & Versioning - Never again worry about content getting put on your site that you don't want there. Never again lose your old content after making an edit. And never again push out new changes until you're absolutely ready to release them. WebGUI's workflow and versioning system if fast, flexible, powerful, and easy to use. +

+

+Everything's a Template - Worry nevermore about your CMS forcing you into a mould that doesn't suit you. With WebGUI everything a site visitor can see is a customizable template, so you can make it look exactly how you want. Moreover if you're the type that strives for excellence rest in the knowledge that all the templates that come with WebGUI are XHTML 1.0 strict compliant. +

+

+Localization - WebGUI's entire user interface is set up to be internationalized. Visit one of the WebGUI Worldwide member sites to get translations for your language. Stay there to get support and services in your native language. Feel confident in the knowledge that WebGUI will work with your native characters because it's UTF-8 compliant. On top of that WebGUI allows you to customize dates, currency, and weights to match your locale. +

+

+Pluggable By Design - With WebGUI 7 you have many plug-in points to add your own functionality. And best of all, the API is stable and standardized. Write it today and it will still work years from now and survive all upgrades. +

+|, + templateId=>'PBtmpl0000000000000002' + }); +} + #------------------------------------------------- sub deleteOldContent { print "\tDeleting old content\n"; + foreach my $id (qw(TKzUMeIxRLrZ3NAEez6CXQ sWVXMZGibxHe2Ekj1DCldA x_WjMvFmilhX-jvZuIpinw DC1etlIaBRQitXnchZKvUw wCIc38CvNHUK7aY92Ww4SQ)) { + my $asset = WebGUI::Asset->newByDynamicClass($session, $id); + $asset->purge if (defined $asset); + } } @@ -150,7 +200,8 @@ sub addNewStyles { } } print "\t\tSetting all pages to use new style.\n"; - $session->db->write("update wobject set styleTemplateId='stevestyle000000000001' where styleTemplateId in ('B1bNjWVtzSjsvGZh9lPz_A','9tBSOV44a9JPS8CcerOvYw')"); + $session->db->write("update wobject set styleTemplateId='stevestyle000000000003' where styleTemplateId in ('B1bNjWVtzSjsvGZh9lPz_A','9tBSOV44a9JPS8CcerOvYw')"); + $session->setting->set("userFunctionStyleId","stevestyle000000000003"); print "\t\tDeleting old styles.\n"; my $asset = WebGUI::Asset->new($session,'9tBSOV44a9JPS8CcerOvYw'); $asset->purge if defined $asset; diff --git a/docs/upgrades/7fixup/style1/style01.snippet b/docs/upgrades/7fixup/style1/style01.snippet index a974460e7..f6d414636 100644 --- a/docs/upgrades/7fixup/style1/style01.snippet +++ b/docs/upgrades/7fixup/style1/style01.snippet @@ -1,7 +1,6 @@ -#title:style01.css -#menuTitle:style01.css -#url:style01.css -#processAsTemplate:yes +#title:css01.css +#menuTitle:css01.css +#url:style1/css01.css #mimeType:text/css body, html { @@ -14,7 +13,7 @@ body, html #main { width:800px; - background: url('^FileUrl(style01/main_bg.jpg);') repeat-y; + background: url('^FileUrl(style1/main_bg.jpg);') repeat-y; height:100%; margin-left:auto; margin-right:auto; @@ -32,7 +31,7 @@ body > #main { width:800px; height:133px; - background: url('^FileUrl(style01/header.jpg);') top left no-repeat; + background: url('^FileUrl(style1/header.jpg);') top left no-repeat; margin-bottom:0px; position:relative; } @@ -53,7 +52,7 @@ body > #main #main #mainContent { - background: url('^FileUrl(style01/orange_left01.jpg);') left top no-repeat; + background: url('^FileUrl(style1/orange_left01.jpg);') left top no-repeat; width:100%; height:100%; margin-top:0px; @@ -100,50 +99,50 @@ body > #main height:25px; display:block; float:left; - background: url('^FileUrl(style01/nav1_off_left.jpg);') no-repeat top left; + background: url('^FileUrl(style1/nav1_off_left.jpg);') no-repeat top left; } #main .mainNav_2 div .left { - background: url('^FileUrl(style01/nav2_off_left.jpg);') no-repeat top left; + background: url('^FileUrl(style1/nav2_off_left.jpg);') no-repeat top left; } #main .mainNav_1 div .center, #main .mainNav_2 div .center { height:25px; display:block; float:left; - background: url('^FileUrl(style01/nav1_off_center.jpg);') repeat-x top left; + background: url('^FileUrl(style1/nav1_off_center.jpg);') repeat-x top left; color:white; font-family:arial, verdana; font-size:8pt; } #main .mainNav_2 div .center { - background: url('^FileUrl(style01/nav2_off_center.jpg);') repeat-x top left; + background: url('^FileUrl(style1/nav2_off_center.jpg);') repeat-x top left; } #main .mainNav_1 div .right, #main .mainNav_2 div .right { width:10px; height:25px; display:block; float:left; - background: url('^FileUrl(style01/nav1_off_right.jpg);') no-repeat top left; + background: url('^FileUrl(style1/nav1_off_right.jpg);') no-repeat top left; } #main .mainNav_2 div .right { - background: url('^FileUrl(style01/nav2_off_right.jpg);') no-repeat top left; + background: url('^FileUrl(style1/nav2_off_right.jpg);') no-repeat top left; } #main .mainNav_1 div.navOn .left { - background: url('^FileUrl(style01/nav1_on_left.jpg);') no-repeat top left; + background: url('^FileUrl(style1/nav1_on_left.jpg);') no-repeat top left; } #main .mainNav_1 div.navOn .center { - background: url('^FileUrl(style01/nav1_on_center.jpg);') repeat-x top left; + background: url('^FileUrl(style1/nav1_on_center.jpg);') repeat-x top left; } #main .mainNav_1 div.navOn .right { - background: url('^FileUrl(style01/nav1_on_right.jpg);') no-repeat top left; + background: url('^FileUrl(style1/nav1_on_right.jpg);') no-repeat top left; } #main .mainNav_2 div.navOn .left { - background: url('^FileUrl(style01/nav2_on_left.jpg);') no-repeat top left; + background: url('^FileUrl(style1/nav2_on_left.jpg);') no-repeat top left; } #main .mainNav_2 div.navOn .center { - background: url('^FileUrl(style01/nav2_center_on.jpg);') repeat-x top left; + background: url('^FileUrl(style1/nav2_center_on.jpg);') repeat-x top left; } #main .mainNav_2 div.navOn .right { - background: url('^FileUrl(style01/nav2_on_right.jpg);') no-repeat top left; + background: url('^FileUrl(style1/nav2_on_right.jpg);') no-repeat top left; } #main .mainNav_1 div.navOn a:link, #main .mainNav_1 div.navOn a:visited, #main .mainNav_2 div.navOn a:link, #main .mainNav_2 div.navOn a:visited { color:black; @@ -225,4 +224,4 @@ body > #main } * html #copyright { background: transparent; -} \ No newline at end of file +} diff --git a/docs/upgrades/7fixup/style1/style01.tmpl b/docs/upgrades/7fixup/style1/style01.tmpl index 85ab3ebcb..60200b3de 100644 --- a/docs/upgrades/7fixup/style1/style01.tmpl +++ b/docs/upgrades/7fixup/style1/style01.tmpl @@ -8,7 +8,7 @@ ^Page(title); - + ^AdminBar(); @@ -44,9 +44,9 @@
^L("","","PBtmpl0000000000000044");
^AdminToggle;
- ^AssetProxy(style01/gui_bottom.jpg);
- WebGUI Button + ^AssetProxy(style1/gui_bottom.jpg);
+ WebGUI Button
- \ No newline at end of file + diff --git a/docs/upgrades/7fixup/style1/style01_nav.tmpl b/docs/upgrades/7fixup/style1/style01_nav.tmpl index 2e8420c37..3a4625033 100644 --- a/docs/upgrades/7fixup/style1/style01_nav.tmpl +++ b/docs/upgrades/7fixup/style1/style01_nav.tmpl @@ -1,7 +1,7 @@ #stevenav00000000000001 #title:Style 01 Nav #menuTitle:Style 01 Nav -#url:style01_nav +#url:style1_nav #namespace:Navigation

diff --git a/docs/upgrades/7fixup/style1/style01_nav_lvl2.tmpl b/docs/upgrades/7fixup/style1/style01_nav_lvl2.tmpl index 399a7980c..3484c8cfc 100644 --- a/docs/upgrades/7fixup/style1/style01_nav_lvl2.tmpl +++ b/docs/upgrades/7fixup/style1/style01_nav_lvl2.tmpl @@ -1,7 +1,7 @@ -#id:PBnav000000style01lvl2 +#PBnav000000style01lvl2 #title:Style 01 Nav lvl2 #menutitle:Style 01 Nav lvl2 -#url:style01_nav_lvl2 +#url:style1_nav_lvl2

@@ -25,4 +25,4 @@   - \ No newline at end of file + diff --git a/docs/upgrades/7fixup/style2/css02.snippet b/docs/upgrades/7fixup/style2/css02.snippet index 8565e7cbd..23c79416f 100644 --- a/docs/upgrades/7fixup/style2/css02.snippet +++ b/docs/upgrades/7fixup/style2/css02.snippet @@ -1,35 +1,36 @@ #title:css02.css #menuTitle:css02.css -#url:css02.css +#url:style/css02.css +#mimeType:text/css body, html { height:100%; } body { - background:#7c9ab0 url('^FileUrl(style02/main_bg.jpg);') repeat-y right; + background:#7c9ab0 url('^FileUrl(style2/main_bg.jpg);') repeat-y right; margin:0px; } .rightColumn { width:20%; height:100%; - background: #eeeeee url('^FileUrl(style02/rightCol_bg.jpg);') repeat-y right; + background: #eeeeee url('^FileUrl(style2/rightCol_bg.jpg);') repeat-y right; text-align:center; } .rightColumn #pb_wg_bg { - background: url('^FileUrl(style02/pb_wg_bg.jpg);') repeat-x; + background: url('^FileUrl(style2/pb_wg_bg.jpg);') repeat-x; width:100%; text-align:left; } .rightColumn #pb_wg { - background: url('^FileUrl(style02/pb_wg.jpg);') left no-repeat; + background: url('^FileUrl(style2/pb_wg.jpg);') left no-repeat; height:53px; } .leftColumn { width:80%; - background: white url('^FileUrl(style02/context_bg.jpg);') repeat-y right; + background: white url('^FileUrl(style2/context_bg.jpg);') repeat-y right; } .leftColumn #header { width:100%; - background:#7c9ab0 url('^FileUrl(style02/leftCol_header.jpg);') right no-repeat; + background:#7c9ab0 url('^FileUrl(style2/leftCol_header.jpg);') right no-repeat; height:86px; position:relative; } @@ -56,7 +57,7 @@ body { left:7px; } .leftColumn #context { - /*background: #fff url('^FileUrl(style02/context_bg.jpg);') repeat-y right; */ + /*background: #fff url('^FileUrl(style2/context_bg.jpg);') repeat-y right; */ width:95%; font-family:verdana; font-size:9pt; @@ -75,11 +76,11 @@ body { text-decoration:none; } .leftColumn #pageTitleBG { - background: url('^FileUrl(style02/page_title_bg.jpg);') repeat-x; + background: url('^FileUrl(style2/page_title_bg.jpg);') repeat-x; width:100%; } .leftColumn #pageTitleBG #pageTitle { - background: url('^FileUrl(style02/page_title.jpg);') right no-repeat; + background: url('^FileUrl(style2/page_title.jpg);') right no-repeat; width:100%; height:50px; } @@ -95,7 +96,7 @@ body { } .rightColumn #nav { width:85%; - background: #b5b5b5 url('^FileUrl(style02/nav_bg.jpg);') repeat-x top; + background: #b5b5b5 url('^FileUrl(style2/nav_bg.jpg);') repeat-x top; border-right:solid #848484 1px; margin-left:auto; margin-right:auto; @@ -137,4 +138,4 @@ body { font-size:9pt; color:silver; text-align:center; -} \ No newline at end of file +} diff --git a/docs/upgrades/7fixup/style2/style02.tmpl b/docs/upgrades/7fixup/style2/style02.tmpl index 569be049b..ac61280a3 100644 --- a/docs/upgrades/7fixup/style2/style02.tmpl +++ b/docs/upgrades/7fixup/style2/style02.tmpl @@ -9,7 +9,7 @@ ^c; - ^Page(title); - + ^AdminBar(); @@ -31,23 +31,23 @@
- +
- - + +
- +
- - + +
@@ -64,4 +64,4 @@ - \ No newline at end of file + diff --git a/docs/upgrades/7fixup/style3/coolmenu.tmpl b/docs/upgrades/7fixup/style3/coolmenu.tmpl index 16ee80ad0..2fb777b37 100644 --- a/docs/upgrades/7fixup/style3/coolmenu.tmpl +++ b/docs/upgrades/7fixup/style3/coolmenu.tmpl @@ -2,253 +2,253 @@ #title:Newer Coolmenu #menuTitle:Newer Coolmenu #url:newer-coolmenu -#namespace:Navigation - -

-
- - -

-
- - - - - - - -~~~ -^JavaScript("/coolmenus/coolmenus4.js"); - \ No newline at end of file +#namespace:Navigation + +

+
+ + +

+
+ + + + + + + +~~~ + + diff --git a/docs/upgrades/7fixup/style3/css03.snippet b/docs/upgrades/7fixup/style3/css03.snippet index e5002dbc7..aecdca380 100644 --- a/docs/upgrades/7fixup/style3/css03.snippet +++ b/docs/upgrades/7fixup/style3/css03.snippet @@ -1,6 +1,7 @@ #title:css03.css #menuTitle:css03.css -#url:css03.css +#url:style3/css03.css +#mimeType:text/css body, html { margin:0px; background-color:#b53018; @@ -18,18 +19,18 @@ body, html { } #header { - background: url('^FileUrl(style03/header_bg.jpg);') repeat-x; + background: url('^FileUrl(style3/header_bg.jpg);') repeat-x; width:100%; margin:0px; height:115px; } #headerTitle { - background: url('^FileUrl(style03/header_left.jpg);') no-repeat left top; + background: url('^FileUrl(style3/header_left.jpg);') no-repeat left top; height:100%; width:100%; } #headerRight { - background: url('^FileUrl(style03/header_right.jpg);') no-repeat right top; + background: url('^FileUrl(style3/header_right.jpg);') no-repeat right top; width:100%; height:100%; text-align:right; @@ -113,7 +114,7 @@ html #main #mainBody #contentArea { position:absolute; top:0px; left:0px; - background: url('^FileUrl(style03/main_top_bg.jpg);') repeat-x; + background: url('^FileUrl(style3/main_top_bg.jpg);') repeat-x; z-index:1; } #bottomCorner { @@ -122,14 +123,14 @@ html #main #mainBody #contentArea { position:absolute; bottom:0px; right:0px; - background: url('^FileUrl(style03/main_bottom.jpg);') no-repeat right; + background: url('^FileUrl(style3/main_bottom.jpg);') no-repeat right; z-index:1; } #footer { width:100%; margin:0px; - background:#000 url('^FileUrl(style03/footer_right.jpg);') no-repeat right top; + background:#000 url('^FileUrl(style3/footer_right.jpg);') no-repeat right top; height:57px; border-top:solid #B53018 2px; text-align:right; diff --git a/docs/upgrades/7fixup/style3/style03.tmpl b/docs/upgrades/7fixup/style3/style03.tmpl index 77c7c90a4..45969c507 100644 --- a/docs/upgrades/7fixup/style3/style03.tmpl +++ b/docs/upgrades/7fixup/style3/style03.tmpl @@ -9,7 +9,7 @@ ^c; - ^Page(title); - + ^AdminBar(); @@ -25,7 +25,7 @@

^H(^c;);

^Page(title);

- ^AssetProxy(style03/wg.jpg);
+ ^AssetProxy(style3/wg.jpg);
@@ -35,7 +35,7 @@
- ^AssetProxy(style03/main_top.jpg); + ^AssetProxy(style3/main_top.jpg);
@@ -44,10 +44,10 @@ - ^AssetProxy(style03/pb.jpg);
+ ^AssetProxy(style3/pb.jpg);
- \ No newline at end of file + diff --git a/docs/upgrades/upgrade_6.8.8-6.99.0.pl b/docs/upgrades/upgrade_6.8.8-6.99.0.pl index 423650eef..4e4c1ba25 100644 --- a/docs/upgrades/upgrade_6.8.8-6.99.0.pl +++ b/docs/upgrades/upgrade_6.8.8-6.99.0.pl @@ -91,8 +91,14 @@ sub updateArticle { $child->purge; } } + if ($asset->get("convertCarriageReturns")) { + my $description = $asset->get("description"); + $description =~ s/\n/\
\n/g; + $asset->update({description=>$description}); + } } } + $session->db->write("alter table Article drop column convertCarriageReturns"); } #------------------------------------------------- diff --git a/lib/WebGUI/Asset/Wobject/Article.pm b/lib/WebGUI/Asset/Wobject/Article.pm index c78db6a8a..686287c99 100644 --- a/lib/WebGUI/Asset/Wobject/Article.pm +++ b/lib/WebGUI/Asset/Wobject/Article.pm @@ -57,11 +57,6 @@ ID of a tempate from the Article namespace to display the contents of the Articl The text displayed to the user as a hyperlink to the linkURL. -=item convertCarriageReturns - -A boolean. If set to true, all newlines will be converted to Break tags so that simple -text will come out formatted as paragraphs. - =back =cut @@ -125,15 +120,6 @@ sub definition { hoverHelp=>$i18n->get('link title description'), uiLevel=>3 }, - convertCarriageReturns=>{ - tab=>"display", - fieldType=>'yesNo', - defaultValue=>0, - label=>$i18n->get(10), - subtext=>'   '.$i18n->get(11).'', - hoverHelp=>$i18n->get('carriage return description'), - uiLevel=>5 - }, storageId=>{ tab=>"properties", fieldType=>"image", @@ -239,7 +225,7 @@ sub prepareView { sub purge { my $self = shift; - my $sth = $self->session->db->read("select storageId from Articlewhere assetId=?",[$self->getId]); + my $sth = $self->session->db->read("select storageId from Article where assetId=?",[$self->getId]); while (my ($storageId) = $sth->array) { my $storage = WebGUI::Storage::Image->get($self->session,$storageId); $storage->delete if defined $storage; @@ -308,9 +294,6 @@ sub view { } } $var{description} = $self->get("description"); - if ($self->get("convertCarriageReturns")) { - $var{description} =~ s/\n/\
\n/g; - } $var{"new.template"} = $self->getUrl.";overrideTemplateId="; $var{"description.full"} = $var{description}; $var{"description.full"} =~ s/\^\-\;//g; diff --git a/lib/WebGUI/Help/Asset_Article.pm b/lib/WebGUI/Help/Asset_Article.pm index 7a764ead2..9966f3f2d 100644 --- a/lib/WebGUI/Help/Asset_Article.pm +++ b/lib/WebGUI/Help/Asset_Article.pm @@ -27,12 +27,6 @@ our $HELP = { namespace => 'Asset_Article', uiLevel => 3, }, - { - title => '10', - description => 'carriage return description', - namespace => 'Asset_Article', - uiLevel => 5, - }, ], related => [ { diff --git a/lib/WebGUI/i18n/English/Asset_Article.pm b/lib/WebGUI/i18n/English/Asset_Article.pm index 68cee3845..7f7fff97c 100644 --- a/lib/WebGUI/i18n/English/Asset_Article.pm +++ b/lib/WebGUI/i18n/English/Asset_Article.pm @@ -21,11 +21,6 @@ our $I18N = { lastUpdated => 0 }, - '11' => { - message => q|(Select "Yes" only if you aren't adding <br> manually.)|, - lastUpdated => 1031514049 - }, - '71' => { message => q|

Articles are the Swiss Army knife of WebGUI. Most pieces of static content can be added via the Article. Articles are Wobjects, so they inherit the properties of both Wobjects and Assets.

@@ -234,17 +229,6 @@ The URL to view the replies to this article. lastUpdated => 1031514049 }, - '10' => { - message => q|Convert carriage returns?|, - lastUpdated => 1031514049 - }, - - 'carriage return description' => { - message => q| -If you're publishing HTML there's generally no need to check this option, but if you aren't using HTML and you want a carriage return every place you hit your "Enter" key, then check this option.|, - lastUpdated => 1119066524 - }, - };