Skip to content

Commit

Permalink
Item8402:
Browse files Browse the repository at this point in the history
   * 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
  • Loading branch information
MichaelDaum authored and MichaelDaum committed Nov 6, 2013
1 parent 0cf03c6 commit 3ef1a81
Show file tree
Hide file tree
Showing 14 changed files with 43 additions and 39 deletions.
8 changes: 4 additions & 4 deletions 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"}%

Expand Down Expand Up @@ -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 <nop>TopicTitle if. <a href='#' id='clsFetchTitle'>%MAKETEXT{"Get from topic title."}%</a> | |
| Meta Description | textarea | 80x2 | | SEO description. Use a maximum of 160 chars for the description. <a href='#' id='clsFetchDescription'>%MAKETEXT{"Get description from content."}%</a> | |
| Meta Keywords | text | 75 | | SEO keywords. Specify a comma separate list of keywords. <a href='#' id='clsFetchKeywords'>%MAKETEXT{"Get from classification."}%</a> | |
| HTML Title | text | 75 | | controls the title being added to the html page, defaults to <nop>TopicTitle if. <a href='#' id='clsGenerateTitle'>%MAKETEXT{"Generate title"}%</a> | |
| Meta Description | textarea | 80x2 | | SEO description. Use a maximum of 160 chars for the description. <a href='#' id='clsGenerateDescription'>%MAKETEXT{"Generate description"}%</a> | |
| Meta Keywords | text | 75 | | SEO keywords. Specify a comma separate list of keywords. <a href='#' id='clsGenerateKeywords'>%MAKETEXT{"Generate keywords"}%</a> | |

%META:FORM{name="Applications.TopicType"}%
%META:FIELD{name="TopicType" title="TopicType" value="TopicType, DataForm, DocuTopic, ApplicationTopic"}%
Expand Down
4 changes: 3 additions & 1 deletion 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"}%
%{<verbatim class="tml">}%
%TMPL:INCLUDE{"Applications.ClassificationApp.SeoTopicView"}%
Expand All @@ -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"}%
<div itemprop="articleBody">
<!-- -->%TMPL:END%
%{</verbatim>}%

%{<verbatim class="tml">}%
%TMPL:DEF{"aftertext"}%<!-- -->
</div>
%DBCALL{"Applications.BlogApp.RenderBlogEntryPagination" CLASS="blogBottomPagination"}%
</div>
<!-- -->%TMPL:END%
Expand Down
4 changes: 2 additions & 2 deletions 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"}%
%{<verbatim class="tml">}%
%TMPL:INCLUDE{"SolrAjaxSearchView"}%
%TMPL:INCLUDE{"SolrSearchView"}%
%{</verbatim>}%

%{<verbatim class="tml">}%
Expand Down
5 changes: 3 additions & 2 deletions 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"}%
%{<verbatim class="tml">}%
%TMPL:INCLUDE{"view"}%
%TMPL:INCLUDE{"Applications.ClassificationApp.SeoTopicView"}%
%{</verbatim>}%

%{<verbatim class="tml">}%
%TMPL:DEF{"revinfo"}%%TMPL:END%
%TMPL:DEF{"beforetext"}%%TMPL:END%
%{</verbatim>}%

%{<verbatim class="tml">}%
Expand Down
4 changes: 2 additions & 2 deletions 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"}%

Expand Down Expand Up @@ -61,7 +61,7 @@ This TopicFunction displays a collection of BlogEntries within the given CATegor
<div class='blogCommentCount foswikiRight'>
$percntDBCALL{\"Applications.BlogApp.RenderNumberOfComments\"
THETOPIC=\"$web.$topic\"
COMMENTSYSTEM=\"%COMMENTSYSTEM{default="metacomment"}%\"
COMMENTSYSTEM=\"$expand(preferences.COMMENTSYSTEM or '%COMMENTSYSTEM{default="metacomment"}%')\"
}$percnt</div>
[[$web.$topic]]
$percntIF{\"'$expand(State)' = 'unpublished'\"
Expand Down
8 changes: 5 additions & 3 deletions 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"}%

Expand All @@ -18,24 +18,26 @@
<div class="blogInfo">
%DBQUERY{
topic="%BASEWEB%.%BASETOPIC%"
format="$formatTime(createdate, '$day $mon $year')"
format="<span itemprop='datePublished' content='$formatTime(createdate, '$year-$mo-$day')'>$formatTime(createdate, '$day $mon $year')</span>"
}%
%DBQUERY{
topic="%BASEWEB%.%BASETOPIC%"
format="&#124; $percntFORMATLIST{
\"$expand(Author or createauthor)\"
split=\"\s*,\s*\"
format=\"$dollarpercntIF{\\"istopic '%USERSWEB%.$1'\\" then=\\"[[%USERSWEB%.$1]]\\" else=\\"<nop>$1\\"}$dollarpercnt\"
format=\"$dollarpercntIF{\\"istopic '%USERSWEB%.$1'\\" then=\\"<a href='%SCRIPTURLPATH{view}%/%USERSWEB%/$1' rel='author' itemprop='author'>$dollarpercntGETTOPICTITLE{%USERSWEB%.$1}$dollarpercnt</a>\\" else=\\"<nop>$1\\"}$dollarpercnt\"
separator=\", \"
}$percnt"
}%
%CATINFO{
"%BASEWEB%.%BASETOPIC%"
header="&#124; "
format="<a href='$url' rel='tag' itemprop='keywords' class='$name'><noautolink>$title</noautolink></a>"
}% <!-- -->
%TAGINFO{
"%BASEWEB%.%BASETOPIC%"
header="&#124; "
format="<a href='$url' rel='tag' itemprop='keywords' class='$class'><noautolink>$name</noautolink></a>"
}% <!-- -->
</div>
<!-- -->%STOPINCLUDE%
Expand Down
4 changes: 2 additions & 2 deletions 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"}%

Expand All @@ -23,7 +23,7 @@
---+++ metacomment
<verbatim class="tml">
%STARTSECTION{"metacomment"}%%METACOMMENTS{
topic="$web.$topic"
topic="%THETOPIC%"
approval="on"
format="$count"
limit="1"
Expand Down
9 changes: 5 additions & 4 deletions 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"}%

Expand Down Expand Up @@ -36,8 +36,7 @@
$percntDBCALL{\"Applications.RenderTopicThumbnail\"
OBJECT=\"$web.$topic\"
TYPE=\"plain\"
}$percnt<!-- -->
$expand(topictitle)
}$percnt $expand(topictitle)
<br /><span class='foswikiTopicInfo foswikiSmallish'>$formfield(Summary)</span>
%CLEAR%
</a></li>"
Expand All @@ -48,12 +47,14 @@
</verbatim>

---++ Test
%STARTSECTION{"test"}%
%DBCALL{"%TOPIC%"}%
%ENDSECTION{"test"}%

%DBCALL{"Applications.RenderFunctionCallers"}%

---++ Copyright
&copy; 2005-2012 http://michaeldaumconsulting.com
&copy; 2005-2013 http://michaeldaumconsulting.com

%DBCALL{"Applications.GnuGeneralPublicLicense" section="notice"}%

Expand Down
10 changes: 10 additions & 0 deletions 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="<nop>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"}%
13 changes: 1 addition & 12 deletions 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 <nop>%BASEWEB% Web

| *Month:* | *Topic <br /> views:* | *Topic <br /> saves:* | *File <br /> uploads:* | *Most popular <br /> topic views:* | *Top contributors for <br /> topic save and uploads:* |
| <!--statDate--> | <!--statViews--> | <!--statSaves--> | <!--statUploads--> | <!--statTopViews--> | <!--statTopContributors--> |
| Jul 2012 | 0 | 0 | 0 | | |

__Notes:__
* Do not edit this topic, it is updated automatically. (You can also <a href="%SCRIPTURLPATH{"statistics"}%/%BASEWEB%">force</a> 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"}%
8 changes: 3 additions & 5 deletions data/_BlogTemplate/WebAtom.txt
@@ -1,6 +1,4 @@
%META:TOPICINFO{author="ProjectContributor" date="1231502400" format="1.0" version="$Rev: 9914 $"}%
<title>%WIKITOOLNAME%'s <nop>%WEB% web</title>
<subtitle>%MAKETEXT{"The [_1] web of Foswiki, the Free and Open Source Wiki." args="<nop>%WEB%"}%</subtitle>
%INCLUDE{"%SYSTEMWEB%.WebAtomBase"}% <!--
* Set SKIN = rssatom
-->
* Set VIEW_TEMPLATE = Applications.AtomView
* Set FILTER = TopicType=~'\bBlogEntry\b'
* Set LIMIT = 5
2 changes: 1 addition & 1 deletion data/_BlogTemplate/WebHome.txt
Expand Up @@ -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"}%
2 changes: 1 addition & 1 deletion lib/Foswiki/Plugins/BlogPlugin/DEPENDENCIES
Expand Up @@ -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.
1 change: 1 addition & 0 deletions lib/Foswiki/Plugins/BlogPlugin/MANIFEST
Expand Up @@ -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
Expand Down

0 comments on commit 3ef1a81

Please sign in to comment.