From 3ef1a81d54263165fbd93781979f6a1fd3cdd886 Mon Sep 17 00:00:00 2001 From: MichaelDaum Date: Wed, 6 Nov 2013 10:14:57 +0000 Subject: [PATCH] Item8402: * new TopicType SeoTopic * added Seo foo to BlogEntries * fixed the way atom feeds are blended in * fixed default page cache settings for a blog's webhome * allow the comment system to be set per page * added microdata where appropriate git-svn-id: http://svn.foswiki.org/trunk/BlogPlugin@17048 0b4bb1d4-4e5a-0410-9cc4-b2b747904278 --- data/Applications/BlogApp/BlogEntry.txt | 8 ++++---- data/Applications/BlogApp/BlogEntryViewTemplate.txt | 4 +++- .../Applications/BlogApp/BlogSearchViewTemplate.txt | 4 ++-- data/Applications/BlogApp/FrontPageViewTemplate.txt | 5 +++-- data/Applications/BlogApp/RenderBlogEntries.txt | 4 ++-- data/Applications/BlogApp/RenderBlogEntryTitle.txt | 8 +++++--- .../Applications/BlogApp/RenderNumberOfComments.txt | 4 ++-- .../BlogApp/RenderRecentBlogEntries.txt | 9 +++++---- data/Applications/BlogApp/SeoTopic.txt | 10 ++++++++++ data/Applications/BlogApp/WebStatistics.txt | 13 +------------ data/_BlogTemplate/WebAtom.txt | 8 +++----- data/_BlogTemplate/WebHome.txt | 2 +- lib/Foswiki/Plugins/BlogPlugin/DEPENDENCIES | 2 +- lib/Foswiki/Plugins/BlogPlugin/MANIFEST | 1 + 14 files changed, 43 insertions(+), 39 deletions(-) create mode 100644 data/Applications/BlogApp/SeoTopic.txt diff --git a/data/Applications/BlogApp/BlogEntry.txt b/data/Applications/BlogApp/BlogEntry.txt index 800acc5..eaab715 100644 --- a/data/Applications/BlogApp/BlogEntry.txt +++ b/data/Applications/BlogApp/BlogEntry.txt @@ -1,4 +1,4 @@ -%META:TOPICINFO{author="micha" comment="reprev" date="1367671217" format="1.1" reprev="19" version="23"}% +%META:TOPICINFO{author="ProjectContributor" comment="reprev" date="1375429293" format="1.1" reprev="19" version="24"}% %META:TOPICPARENT{name="TopicType"}% %DBCALL{"Applications.RenderTopicInstaller" TEXT="Install '%TOPIC%' TopicType" TYPE="TopicType"}% @@ -34,9 +34,9 @@ This is the central TopicType to store blog entries. | Author | text | 75 | | author(s) of this posting | | | State | radio | 2 | published, unpublished | only blog entries in state published are readable by other users; unpublished blog entries are only visible for the authors of this blog entry | | | Sticky | checkbox+values | 4 | on frontpage=frontpage, on category=category | a sticky blog entries is rendered at the top of the frontpage or category independent of the normal timeline | | -| HTML Title | text | 75 | | controls the title being added to the html page, defaults to TopicTitle if. %MAKETEXT{"Get from topic title."}% | | -| Meta Description | textarea | 80x2 | | SEO description. Use a maximum of 160 chars for the description. %MAKETEXT{"Get description from content."}% | | -| Meta Keywords | text | 75 | | SEO keywords. Specify a comma separate list of keywords. %MAKETEXT{"Get from classification."}% | | +| HTML Title | text | 75 | | controls the title being added to the html page, defaults to TopicTitle if. %MAKETEXT{"Generate title"}% | | +| Meta Description | textarea | 80x2 | | SEO description. Use a maximum of 160 chars for the description. %MAKETEXT{"Generate description"}% | | +| Meta Keywords | text | 75 | | SEO keywords. Specify a comma separate list of keywords. %MAKETEXT{"Generate keywords"}% | | %META:FORM{name="Applications.TopicType"}% %META:FIELD{name="TopicType" title="TopicType" value="TopicType, DataForm, DocuTopic, ApplicationTopic"}% diff --git a/data/Applications/BlogApp/BlogEntryViewTemplate.txt b/data/Applications/BlogApp/BlogEntryViewTemplate.txt index ae55d1c..f925b0d 100644 --- a/data/Applications/BlogApp/BlogEntryViewTemplate.txt +++ b/data/Applications/BlogApp/BlogEntryViewTemplate.txt @@ -1,4 +1,4 @@ -%META:TOPICINFO{author="micha" comment="save topic" date="1366714238" format="1.1" reprev="17" version="22"}% +%META:TOPICINFO{author="ProjectContributor" comment="save topic" date="1375433298" format="1.1" reprev="17" version="23"}% %META:TOPICPARENT{name="TopicView"}% %{}% %TMPL:INCLUDE{"Applications.ClassificationApp.SeoTopicView"}% @@ -22,11 +22,13 @@ %UNSETVAR{field="State" matches="published" var="ALLOWTOPICVIEW"}% %UNSETVAR{field="State" matches="published" var="PERMSET_VIEW"}% %UNSETVAR{field="State" matches="published" var="PERMSET_VIEW_DETAILS"}% +
%TMPL:END% %{}% %{}% %TMPL:DEF{"aftertext"}% +
%DBCALL{"Applications.BlogApp.RenderBlogEntryPagination" CLASS="blogBottomPagination"}% %TMPL:END% diff --git a/data/Applications/BlogApp/BlogSearchViewTemplate.txt b/data/Applications/BlogApp/BlogSearchViewTemplate.txt index 978a3a4..36f5206 100644 --- a/data/Applications/BlogApp/BlogSearchViewTemplate.txt +++ b/data/Applications/BlogApp/BlogSearchViewTemplate.txt @@ -1,7 +1,7 @@ -%META:TOPICINFO{author="micha" comment="reprev" date="1367666725" format="1.1" reprev="4" version="5"}% +%META:TOPICINFO{author="ProjectContributor" comment="reprev" date="1367666725" format="1.1" reprev="4" version="5"}% %META:TOPICPARENT{name="TopicView"}% %{}% -%TMPL:INCLUDE{"SolrAjaxSearchView"}% +%TMPL:INCLUDE{"SolrSearchView"}% %{}% %{}% diff --git a/data/Applications/BlogApp/FrontPageViewTemplate.txt b/data/Applications/BlogApp/FrontPageViewTemplate.txt index d040bcd..68ce1bc 100644 --- a/data/Applications/BlogApp/FrontPageViewTemplate.txt +++ b/data/Applications/BlogApp/FrontPageViewTemplate.txt @@ -1,11 +1,12 @@ -%META:TOPICINFO{author="micha" comment="reprev" date="1359048572" format="1.1" reprev="14" version="19"}% +%META:TOPICINFO{author="ProjectContributor" comment="reprev" date="1367839892" format="1.1" reprev="14" version="20"}% %META:TOPICPARENT{name="TopicView"}% %{}% -%TMPL:INCLUDE{"view"}% +%TMPL:INCLUDE{"Applications.ClassificationApp.SeoTopicView"}% %{}% %{}% %TMPL:DEF{"revinfo"}%%TMPL:END% +%TMPL:DEF{"beforetext"}%%TMPL:END% %{}% %{}% diff --git a/data/Applications/BlogApp/RenderBlogEntries.txt b/data/Applications/BlogApp/RenderBlogEntries.txt index 0edc2d9..516b7e8 100644 --- a/data/Applications/BlogApp/RenderBlogEntries.txt +++ b/data/Applications/BlogApp/RenderBlogEntries.txt @@ -1,4 +1,4 @@ -%META:TOPICINFO{author="micha" comment="reprev" date="1367740468" format="1.1" reprev="27" version="27"}% +%META:TOPICINFO{author="ProjectContributor" comment="reprev" date="1367760968" format="1.1" reprev="27" version="28"}% %META:TOPICPARENT{name="TopicFunction"}% %TOC{depth="2"}% @@ -61,7 +61,7 @@ This TopicFunction displays a collection of BlogEntries within the given CATegor
$percntDBCALL{\"Applications.BlogApp.RenderNumberOfComments\" THETOPIC=\"$web.$topic\" - COMMENTSYSTEM=\"%COMMENTSYSTEM{default="metacomment"}%\" + COMMENTSYSTEM=\"$expand(preferences.COMMENTSYSTEM or '%COMMENTSYSTEM{default="metacomment"}%')\" }$percnt
[[$web.$topic]] $percntIF{\"'$expand(State)' = 'unpublished'\" diff --git a/data/Applications/BlogApp/RenderBlogEntryTitle.txt b/data/Applications/BlogApp/RenderBlogEntryTitle.txt index a032387..16d0f04 100644 --- a/data/Applications/BlogApp/RenderBlogEntryTitle.txt +++ b/data/Applications/BlogApp/RenderBlogEntryTitle.txt @@ -1,4 +1,4 @@ -%META:TOPICINFO{author="micha" comment="reprev" date="1367600480" format="1.1" reprev="8" version="8"}% +%META:TOPICINFO{author="ProjectContributor" comment="reprev" date="1377276606" format="1.1" reprev="9" version="10"}% %META:TOPICPARENT{name="TopicFunction"}% %TOC{depth="2"}% @@ -18,24 +18,26 @@
%DBQUERY{ topic="%BASEWEB%.%BASETOPIC%" - format="$formatTime(createdate, '$day $mon $year')" + format="" }% %DBQUERY{ topic="%BASEWEB%.%BASETOPIC%" format="| $percntFORMATLIST{ \"$expand(Author or createauthor)\" split=\"\s*,\s*\" - format=\"$dollarpercntIF{\\"istopic '%USERSWEB%.$1'\\" then=\\"[[%USERSWEB%.$1]]\\" else=\\"$1\\"}$dollarpercnt\" + format=\"$dollarpercntIF{\\"istopic '%USERSWEB%.$1'\\" then=\\"\\" else=\\"$1\\"}$dollarpercnt\" separator=\", \" }$percnt" }% %CATINFO{ "%BASEWEB%.%BASETOPIC%" header="| " + format="" }% %TAGINFO{ "%BASEWEB%.%BASETOPIC%" header="| " + format="" }%
%STOPINCLUDE% diff --git a/data/Applications/BlogApp/RenderNumberOfComments.txt b/data/Applications/BlogApp/RenderNumberOfComments.txt index f06bbf9..3d93332 100644 --- a/data/Applications/BlogApp/RenderNumberOfComments.txt +++ b/data/Applications/BlogApp/RenderNumberOfComments.txt @@ -1,4 +1,4 @@ -%META:TOPICINFO{author="micha" comment="reprev" date="1367740466" format="1.1" reprev="1" version="1"}% +%META:TOPICINFO{author="ProjectContributor" comment="reprev" date="1367760753" format="1.1" reprev="1" version="2"}% %META:TOPICPARENT{name="TopicFunction"}% %TOC{depth="2"}% @@ -23,7 +23,7 @@ ---+++ metacomment %STARTSECTION{"metacomment"}%%METACOMMENTS{ - topic="$web.$topic" + topic="%THETOPIC%" approval="on" format="$count" limit="1" diff --git a/data/Applications/BlogApp/RenderRecentBlogEntries.txt b/data/Applications/BlogApp/RenderRecentBlogEntries.txt index eacf217..0a2f05d 100644 --- a/data/Applications/BlogApp/RenderRecentBlogEntries.txt +++ b/data/Applications/BlogApp/RenderRecentBlogEntries.txt @@ -1,4 +1,4 @@ -%META:TOPICINFO{author="ProjectContributor" comment="reprev" date="1342208371" format="1.1" reprev="6" version="8"}% +%META:TOPICINFO{author="ProjectContributor" comment="reprev" date="1372157765" format="1.1" reprev="6" version="10"}% %META:TOPICPARENT{name="TopicFunction"}% %TOC{depth="2"}% @@ -36,8 +36,7 @@ $percntDBCALL{\"Applications.RenderTopicThumbnail\" OBJECT=\"$web.$topic\" TYPE=\"plain\" - }$percnt - $expand(topictitle) + }$percnt $expand(topictitle)
$formfield(Summary) %CLEAR% " @@ -48,12 +47,14 @@
---++ Test +%STARTSECTION{"test"}% %DBCALL{"%TOPIC%"}% +%ENDSECTION{"test"}% %DBCALL{"Applications.RenderFunctionCallers"}% ---++ Copyright -© 2005-2012 http://michaeldaumconsulting.com +© 2005-2013 http://michaeldaumconsulting.com %DBCALL{"Applications.GnuGeneralPublicLicense" section="notice"}% diff --git a/data/Applications/BlogApp/SeoTopic.txt b/data/Applications/BlogApp/SeoTopic.txt new file mode 100644 index 0000000..0a74f0d --- /dev/null +++ b/data/Applications/BlogApp/SeoTopic.txt @@ -0,0 +1,10 @@ +%META:TOPICINFO{author="ProjectContributor" date="1367839858" format="1.1" version="1"}% +%META:TOPICPARENT{name="WebHome"}% + + +%META:FORM{name="Applications.TopicStub"}% +%META:FIELD{name="TopicType" title="TopicType" value="TopicStub, TopicType"}% +%META:FIELD{name="TopicTitle" attributes="" title="TopicTitle" value=""}% +%META:FIELD{name="Summary" attributes="" title="Summary" value=""}% +%META:FIELD{name="WikiApplication" attributes="" title="WikiApplication" value="ClassificationApp"}% +%META:FIELD{name="Target" attributes="" title="Target" value="Applications/ClassificationApp.SeoTopic"}% diff --git a/data/Applications/BlogApp/WebStatistics.txt b/data/Applications/BlogApp/WebStatistics.txt index 8fd81d5..006ffc6 100644 --- a/data/Applications/BlogApp/WebStatistics.txt +++ b/data/Applications/BlogApp/WebStatistics.txt @@ -1,17 +1,6 @@ -%META:TOPICINFO{author="ProjectContributor" date="1342165233" format="1.1" reprev="3" version="3"}% +%META:TOPICINFO{author="ProjectContributor" comment="reprev" date="1383688807" format="1.1" reprev="168" version="168"}% %META:TOPICPARENT{name="WebHome"}% ---++ Statistics for %BASEWEB% Web | *Month:* | *Topic
views:* | *Topic
saves:* | *File
uploads:* | *Most popular
topic views:* | *Top contributors for
topic save and uploads:* | | | | | | | | -| Jul 2012 | 0 | 0 | 0 | | | - -__Notes:__ - * Do not edit this topic, it is updated automatically. (You can also force an update) - * %SYSTEMWEB%.CompleteDocumentation tells you how to enable the automatic updates of the statistics. - * Suggestion: You could archive this topic once a year and delete the previous year's statistics from the table. - -%META:FORM{name="Applications.ApplicationTopic"}% -%META:FIELD{name="TopicType" title="TopicType" value="WebTool"}% -%META:FIELD{name="Summary" attributes="" title="Summary" value="Statistics"}% -%META:FIELD{name="WikiApplication" attributes="" title="WikiApplication" value="WikiWorkbench"}% diff --git a/data/_BlogTemplate/WebAtom.txt b/data/_BlogTemplate/WebAtom.txt index 8901807..ad0af0f 100644 --- a/data/_BlogTemplate/WebAtom.txt +++ b/data/_BlogTemplate/WebAtom.txt @@ -1,6 +1,4 @@ %META:TOPICINFO{author="ProjectContributor" date="1231502400" format="1.0" version="$Rev: 9914 $"}% -%WIKITOOLNAME%'s <nop>%WEB% web -%MAKETEXT{"The [_1] web of Foswiki, the Free and Open Source Wiki." args="%WEB%"}% -%INCLUDE{"%SYSTEMWEB%.WebAtomBase"}% + * Set VIEW_TEMPLATE = Applications.AtomView + * Set FILTER = TopicType=~'\bBlogEntry\b' + * Set LIMIT = 5 diff --git a/data/_BlogTemplate/WebHome.txt b/data/_BlogTemplate/WebHome.txt index 40edd9d..7099d78 100644 --- a/data/_BlogTemplate/WebHome.txt +++ b/data/_BlogTemplate/WebHome.txt @@ -7,4 +7,4 @@ %META:PREFERENCE{name="VIEW_TEMPLATE" title="VIEW_TEMPLATE" type="Set" value="Applications.BlogApp.FrontPageView"}% %META:PREFERENCE{name="HTMLTITLE" title="HTMLTITLE" type="Set" value="Blog %25IF%7b%22defined HTMLTITLESEP%22 then=%22%25HTMLTITLESEP%25%22 else=%22-%22%7d%25 %25WIKITOOLNAME%25"}% %META:PREFERENCE{name="CACHEABLE" title="CACHEABLE" type="Set" value="on"}% -%META:PREFERENCE{name="CACHEEXPIRE" title="CACHEEXPIRE" type="Set" value="5min"}% +%META:PREFERENCE{name="CACHEEXPIRE" title="CACHEEXPIRE" type="Set" value="+5m"}% diff --git a/lib/Foswiki/Plugins/BlogPlugin/DEPENDENCIES b/lib/Foswiki/Plugins/BlogPlugin/DEPENDENCIES index 70f3da9..8f13a4f 100644 --- a/lib/Foswiki/Plugins/BlogPlugin/DEPENDENCIES +++ b/lib/Foswiki/Plugins/BlogPlugin/DEPENDENCIES @@ -2,7 +2,7 @@ Foswiki::Plugins::DBCachePlugin,>=4.10,perl,Required. Foswiki::Plugins::FilterPlugin,>=2.08,perl,Required; Foswiki::Plugins::FlexFormPlugin,>=2.60,perl,Required. Foswiki::Plugins::ImagePlugin,>=2.41,perl,Recommended. -Foswiki::Plugins::NatSkin,>=4.0,perl,Recommended. +Foswiki::Contrib::NatSkin,>=4.0,perl,Recommended. Foswiki::Plugins::RedDotPlugin,>=3.00,perl,Required. Foswiki::Plugins::SolrPlugin,>=1.10,perl,Recommended. Foswiki::Plugins::TagCloudPlugin,>=2.21,perl,Required. diff --git a/lib/Foswiki/Plugins/BlogPlugin/MANIFEST b/lib/Foswiki/Plugins/BlogPlugin/MANIFEST index 597279c..0e34e89 100644 --- a/lib/Foswiki/Plugins/BlogPlugin/MANIFEST +++ b/lib/Foswiki/Plugins/BlogPlugin/MANIFEST @@ -37,6 +37,7 @@ data/Applications/BlogApp/RenderRss.txt 0644 data/Applications/BlogApp/RenderSideBar.txt 0644 data/Applications/BlogApp/RenderSimilarBlogEntries.txt 0644 data/Applications/BlogApp/ReviewCategory.txt 0644 +data/Applications/BlogApp/SeoTopic.txt 0644 data/Applications/BlogApp/SoftwareCategory.txt 0644 data/Applications/BlogApp/TaggedTopic.txt 0644 data/Applications/BlogApp/TechnologyCategory.txt 0644