diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 73883d62a..ef2eb6177 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -21,6 +21,7 @@ - fixed #10648: Story Topic: Photos don't display - fixed #10649: Story Manager Keywords not working correctly - fixed #10643: Products: Pictures gone + - imported new templates from the Template Working Group 7.7.14 - fixed #10606: shelf selector diff --git a/docs/gotcha.txt b/docs/gotcha.txt index 9f06605ce..419befdcf 100644 --- a/docs/gotcha.txt +++ b/docs/gotcha.txt @@ -16,6 +16,114 @@ save you many hours of grief. un-Shop things, which is why it was replaced). Please test the new one with your setup. + * 29 templates have been replaced with new ones. These are the templates + for the Article, File, Folder, Image, Navigation, Layout, Poll, Search + and Syndicated Content assets. 13 templates have been deleted (Article, + Navigation and Layout templates). These were deleted because of deprecated + code, redundancy and because we are want to reduce the number of + templates. This will make the whole set of templates more comprehensible. + + Changes for all these templates: + - extra divs, classes and IDs have been added; + - consistent markup for recurring code, like titles, descriptions, attachments and pagination; + - inline styles and deprecated code removed. + + Article + - All Article templates: + - Removed pagination. This will be re-added later, when the pagination macro bug has been fixed (bug #10619) + - Default Article: + - Added attachment loop (RFE #4152) + - Removed code for image, since there now is a dedicated Article with Image template + - Center Image: + - Deleted: align="center" is deprecated + - Left align image: + - Changed name to Article with Image + - Removed tables and added styles for img positioning + - Linked Image with Caption + - Removed tables and added styles for img positioning + - Item: + - Added attachment loop + - Item w/ popup links: + - Deleted: pop-up links are bad practice and this doesn't need to be a default + - Article with files: + - Deleted: attachment loop now added to Default Article + - article.css added + + File + - Default File: + - The linktext is title instead of the filename (RFE #10173) + - Flash File: + - Template now uses swfobject code + - Absolute width and height attributes are set in the html to replace the percentage value and inline style + + Folder + - File Folder: + - The linktext is title instead of the filename (like in the Default File template) + - Tables have not been removed, since they are semantically correct here + + Image + - Image: + - Only added extra div with ID and class + - Annotate Image: + - No changes + + Changes for Navigation + - crumbTrail: + - No specific changes + - verticalMenu: + - Deleted: best practice is using "Bulleted List" for vertical navs + - horizontalMenu: + - Based on unordered list + - Added styles + - DropMenu: + - Javascript cleaned up + - Noscript alternative added + - Tabs: + - Based on unordered list + - Added styles + - Tree Navigation: + - Javascript cleaned up + - Hierarchical top nav: + - Javascript cleaned up + - Synopsis: + - HTML based on definition list + - Bulleted list: + - Now always generates validating html (closing ul and li tags) + - Indent Nav: + - No specific changes + - navigation.css added + + Layout + - All table layouts: + - Deleted: using tables for positioning is bad practice + - All non table layouts: + - Removed unnecessary divs ("layoutColumnPadding" and "content") + - Styles for positioning added + - One Over Two: + - Newly added + - Replaces News, but has one less content position + - News, Three Over One, Left column: + - Deleted: we want to reduce the number of templates and only kept the basic/most used page layouts + - layout.css added + + Poll + - Default Poll: + - General cleanup, added extra classes and IDs + - poll.css added + + Search + - Default Search: + - Results in a definitions list + - Form post back to the current page instead of to the asset in wobject focus, + this prevents possible "breaking" of the style + + Syndicated Content + - Default Syndicated Content: + - General cleanup, added extra tags, classes and IDs + - Syndicated Articles: + - General cleanup, added extra tags, classes and IDs + - Removed inline style + 7.7.13 -------------------------------------------------------------------- * WebGUI has allowed metadata possible values to be processed differently diff --git a/docs/upgrades/packages-7.7.15/flash-style-3-template.wgpkg b/docs/upgrades/packages-7.7.15/flash-style-3-template.wgpkg new file mode 100644 index 000000000..5daae092c Binary files /dev/null and b/docs/upgrades/packages-7.7.15/flash-style-3-template.wgpkg differ diff --git a/docs/upgrades/packages-7.7.15/flash-tutorial-template.wgpkg b/docs/upgrades/packages-7.7.15/flash-tutorial-template.wgpkg new file mode 100644 index 000000000..8eea7431a Binary files /dev/null and b/docs/upgrades/packages-7.7.15/flash-tutorial-template.wgpkg differ diff --git a/docs/upgrades/packages-7.7.15/root_import_article.wgpkg b/docs/upgrades/packages-7.7.15/root_import_article.wgpkg new file mode 100644 index 000000000..2a5082e88 Binary files /dev/null and b/docs/upgrades/packages-7.7.15/root_import_article.wgpkg differ diff --git a/docs/upgrades/packages-7.7.15/root_import_fileasset.wgpkg b/docs/upgrades/packages-7.7.15/root_import_fileasset.wgpkg new file mode 100644 index 000000000..27dac0d09 Binary files /dev/null and b/docs/upgrades/packages-7.7.15/root_import_fileasset.wgpkg differ diff --git a/docs/upgrades/packages-7.7.15/root_import_folder.wgpkg b/docs/upgrades/packages-7.7.15/root_import_folder.wgpkg new file mode 100644 index 000000000..436538023 Binary files /dev/null and b/docs/upgrades/packages-7.7.15/root_import_folder.wgpkg differ diff --git a/docs/upgrades/packages-7.7.15/root_import_imageasset.wgpkg b/docs/upgrades/packages-7.7.15/root_import_imageasset.wgpkg new file mode 100644 index 000000000..b8223cd92 Binary files /dev/null and b/docs/upgrades/packages-7.7.15/root_import_imageasset.wgpkg differ diff --git a/docs/upgrades/packages-7.7.15/root_import_layout.wgpkg b/docs/upgrades/packages-7.7.15/root_import_layout.wgpkg new file mode 100644 index 000000000..b56f44f08 Binary files /dev/null and b/docs/upgrades/packages-7.7.15/root_import_layout.wgpkg differ diff --git a/docs/upgrades/packages-7.7.15/root_import_navigation.wgpkg b/docs/upgrades/packages-7.7.15/root_import_navigation.wgpkg new file mode 100644 index 000000000..4d2cedf06 Binary files /dev/null and b/docs/upgrades/packages-7.7.15/root_import_navigation.wgpkg differ diff --git a/docs/upgrades/packages-7.7.15/root_import_poll.wgpkg b/docs/upgrades/packages-7.7.15/root_import_poll.wgpkg new file mode 100644 index 000000000..6286d301e Binary files /dev/null and b/docs/upgrades/packages-7.7.15/root_import_poll.wgpkg differ diff --git a/docs/upgrades/packages-7.7.15/root_import_search.wgpkg b/docs/upgrades/packages-7.7.15/root_import_search.wgpkg new file mode 100644 index 000000000..00922d35f Binary files /dev/null and b/docs/upgrades/packages-7.7.15/root_import_search.wgpkg differ diff --git a/docs/upgrades/packages-7.7.15/root_import_syndicatedcontent.wgpkg b/docs/upgrades/packages-7.7.15/root_import_syndicatedcontent.wgpkg new file mode 100644 index 000000000..2906754c5 Binary files /dev/null and b/docs/upgrades/packages-7.7.15/root_import_syndicatedcontent.wgpkg differ diff --git a/docs/upgrades/packages-7.7.15/webgui.css.wgpkg b/docs/upgrades/packages-7.7.15/webgui.css.wgpkg new file mode 100644 index 000000000..98ef98d72 Binary files /dev/null and b/docs/upgrades/packages-7.7.15/webgui.css.wgpkg differ diff --git a/docs/upgrades/upgrade_7.7.14-7.7.15.pl b/docs/upgrades/upgrade_7.7.14-7.7.15.pl index 171758b25..237f24dfa 100644 --- a/docs/upgrades/upgrade_7.7.14-7.7.15.pl +++ b/docs/upgrades/upgrade_7.7.14-7.7.15.pl @@ -19,6 +19,8 @@ BEGIN { use strict; use Getopt::Long; +use List::MoreUtils qw/uniq/; + use WebGUI::Session; use WebGUI::Storage; use WebGUI::Asset; @@ -33,6 +35,7 @@ my $session = start(); # this line required # upgrade functions go here replacePayPalDriver($session); addFieldPriceToThingyRecord( $session ); +replaceUsageOfOldTemplates($session); finish($session); # this line required @@ -78,6 +81,62 @@ sub replacePayPalDriver { } } +#---------------------------------------------------------------------------- +sub replaceUsageOfOldTemplates { + my $session = shift; + print "\tRemoving usage of outdated templates with new ones... " unless $quiet; + # and here's our code + print "\n\t\tUpgrading Navigation templates... " unless $quiet; + my @navigationPairs = ( + ## New Old + [ qw/PBnav00000000000bullet PBtmpl0000000000000048/ ] ##Bulleted List <- Vertical Menu + ); + foreach my $pairs (@navigationPairs) { + my ($new, $old) = @{ $pairs }; + $session->db->write('UPDATE Navigation SET templateId=? where templateId=?', [$new, $old]) + } + print "\n\t\tUpgrading Article templates... " unless $quiet; + my @articlePairs = ( + ## New Old + [ qw/PBtmpl0000000000000103 PBtmpl0000000000000084/ ], ##Article with Image <- Center Image + [ qw/PBtmpl0000000000000123 PBtmpl0000000000000129/ ], ##Item <- Item w/pop-up Links + [ qw/PBtmpl0000000000000002 PBtmpl0000000000000207/ ], ##Default Article <- Article with Files + ); + foreach my $pairs (@articlePairs) { + my ($new, $old) = @{ $pairs }; + $session->db->write('UPDATE Article SET templateId=? where templateId=?', [$new, $old]) + } + print "\n\t\tUpgrading Layout templates... " unless $quiet; + my @layoutPairs = ( + ## New Old + [ qw/PBtmpl0000000000000135 PBtmpl00000000table125/ ], ## Side By Side <- Left Column (Table) + [ qw/PBtmpl0000000000000094 PBtmpl00000000table094/ ], ## One over two <- News (Table) + [ qw/PBtmpl0000000000000131 PBtmpl00000000table131/ ], ## Right Column <- Right Column (Table) + [ qw/PBtmpl0000000000000135 PBtmpl00000000table135/ ], ## Side By Side <- Side By Side (Table) + [ qw/PBtmpl0000000000000054 PBtmpl00000000table118/ ], ## Default Page <- Three Over One (Table) + [ qw/PBtmpl0000000000000054 PBtmpl000000000table54/ ], ## Default Page <- Default Page (Table) + [ qw/PBtmpl0000000000000109 PBtmpl00000000table109/ ], ## One Over Three <- One Over Three (Table) + [ qw/PBtmpl0000000000000135 PBtmpl0000000000000125/ ], ## Side By Side <- Left Column + [ qw/PBtmpl0000000000000054 PBtmpl0000000000000118/ ], ## Default Page <- Three Over One + ); + foreach my $pairs (@layoutPairs) { + my ($new, $old) = @{ $pairs }; + $session->db->write('UPDATE Layout SET templateId=? where templateId=?', [$new, $old]) + } + print "\n\t\tPurging old templates... " unless $quiet; + my @oldTemplates = uniq map { $_->[1] } (@navigationPairs, @articlePairs, @layoutPairs); + TEMPLATE: foreach my $templateId (@oldTemplates) { + my $template = eval { WebGUI::Asset->newPending($session, $templateId); }; + if ($@) { + print "\n\t\t\tUnable to instanciate templateId: $templateId. Skipping..."; + next TEMPLATE; + } + print "\n\t\t\tPurging ". $template->getTitle . " ..." unless $quiet; + $template->purge; + } + print "DONE!\n" unless $quiet; +} + # -------------- DO NOT EDIT BELOW THIS LINE --------------------------------