You are viewing a plain text version of this content. The canonical link for it is here.
Posted to svn@forrest.apache.org by cr...@apache.org on 2005/06/13 15:38:41 UTC
svn commit: r190399 - in /forrest/trunk: main/fresh-site/src/documentation/
main/webapp/resources/schema/ main/webapp/resources/schema/dtd/
main/webapp/skins/pelt/xslt/html/ site-author/
Author: crossley
Date: Mon Jun 13 06:38:40 2005
New Revision: 190399
URL: http://svn.apache.org/viewcvs?rev=190399&view=rev
Log:
Enhance the Message of the Day facility (MOTD)
to detect URI string patterns and append different text.
To use it you need skinconfig-v07-1.dtd
Added:
forrest/trunk/main/webapp/resources/schema/dtd/skinconfig-v07-1.dtd
- copied, changed from r190343, forrest/trunk/main/webapp/resources/schema/dtd/skinconfig-v06-3.dtd
Modified:
forrest/trunk/main/fresh-site/src/documentation/skinconf.xml
forrest/trunk/main/webapp/resources/schema/catalog.forrest
forrest/trunk/main/webapp/resources/schema/catalog.forrest.xcat
forrest/trunk/main/webapp/skins/pelt/xslt/html/site2xhtml.xsl
forrest/trunk/site-author/status.xml
Modified: forrest/trunk/main/fresh-site/src/documentation/skinconf.xml
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/fresh-site/src/documentation/skinconf.xml?rev=190399&r1=190398&r2=190399&view=diff
==============================================================================
--- forrest/trunk/main/fresh-site/src/documentation/skinconf.xml (original)
+++ forrest/trunk/main/fresh-site/src/documentation/skinconf.xml Mon Jun 13 06:38:40 2005
@@ -21,7 +21,7 @@
which will be used to configure the chosen Forrest skin.
-->
-<!DOCTYPE skinconfig PUBLIC "-//APACHE//DTD Skin Configuration V0.6-3//EN" "http://forrest.apache.org/dtd/skinconfig-v06-3.dtd">
+<!DOCTYPE skinconfig PUBLIC "-//APACHE//DTD Skin Configuration V0.7-1//EN" "http://forrest.apache.org/dtd/skinconfig-v07-1.dtd">
<skinconfig>
<!-- To enable lucene search add provider="lucene" (default is google).
Add box-location="alt" to move the search box to an alternate location
@@ -138,7 +138,11 @@
Send feedback about the website to:
</feedback>
- <!-- Optional message of the day.
+ <!-- Optional message of the day (MOTD).
+ Note: This is only implemented in the pelt skin.
+ If the optional <motd> element is used, then messages will be appended
+ depending on the URI string pattern.
+ motd-option : Specifies a pattern to match and provides small text content.
motd-title : This text will be added in brackets after the <html><title>
motd-page : This text will be added in a panel on the face of the page,
with the "motd-page-url" being the hyperlink "More".
@@ -147,13 +151,24 @@
alt : at the bottom of the left-hand navigation panel
both : both
-->
- <!--
- <motd-title>v0.7</motd-title>
- <motd-page location="alt">
- This is documentation for the current release v0.7
- </motd-page>
- <motd-page-url>/docs/</motd-page-url>
- -->
+<!--
+ <motd>
+ <motd-option pattern="docs_0_80">
+ <motd-title>v0.8-dev</motd-title>
+ <motd-page location="both">
+ This is documentation for development version v0.8
+ </motd-page>
+ <motd-page-url>/versions/index.html</motd-page-url>
+ </motd-option>
+ <motd-option pattern="docs_0_70">
+ <motd-title>v0.7</motd-title>
+ <motd-page location="both">
+ This is documentation for current version v0.7
+ </motd-page>
+ <motd-page-url>/versions/index.html</motd-page-url>
+ </motd-option>
+ </motd>
+-->
<!--
extra-css - here you can define custom css-elements that are
Modified: forrest/trunk/main/webapp/resources/schema/catalog.forrest
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/webapp/resources/schema/catalog.forrest?rev=190399&r1=190398&r2=190399&view=diff
==============================================================================
--- forrest/trunk/main/webapp/resources/schema/catalog.forrest (original)
+++ forrest/trunk/main/webapp/resources/schema/catalog.forrest Mon Jun 13 06:38:40 2005
@@ -65,6 +65,8 @@
"dtd/projectInfo/task-v10.mod"
-- New unfinished DTDs --
+PUBLIC "-//APACHE//DTD Skin Configuration V0.7-1//EN"
+ "dtd/skinconfig-v07-1.dtd"
PUBLIC "-//APACHE//DTD Skin Configuration V0.6-3//EN"
"dtd/skinconfig-v06-3.dtd"
Modified: forrest/trunk/main/webapp/resources/schema/catalog.forrest.xcat
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/webapp/resources/schema/catalog.forrest.xcat?rev=190399&r1=190398&r2=190399&view=diff
==============================================================================
--- forrest/trunk/main/webapp/resources/schema/catalog.forrest.xcat (original)
+++ forrest/trunk/main/webapp/resources/schema/catalog.forrest.xcat Mon Jun 13 06:38:40 2005
@@ -65,6 +65,8 @@
uri="dtd/projectInfo/developers-v10.mod"/>
<!-- New unfinished DTDs -->
+<public publicId="-//APACHE//DTD Skin Configuration V0.7-1//EN"
+ uri="dtd/skinconfig-v07-1.dtd"/>
<public publicId="-//APACHE//DTD Skin Configuration V0.6-3//EN"
uri="dtd/skinconfig-v06-3.dtd"/>
Copied: forrest/trunk/main/webapp/resources/schema/dtd/skinconfig-v07-1.dtd (from r190343, forrest/trunk/main/webapp/resources/schema/dtd/skinconfig-v06-3.dtd)
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/webapp/resources/schema/dtd/skinconfig-v07-1.dtd?p2=forrest/trunk/main/webapp/resources/schema/dtd/skinconfig-v07-1.dtd&p1=forrest/trunk/main/webapp/resources/schema/dtd/skinconfig-v06-3.dtd&r1=190343&r2=190399&rev=190399&view=diff
==============================================================================
--- forrest/trunk/main/webapp/resources/schema/dtd/skinconfig-v06-3.dtd (original)
+++ forrest/trunk/main/webapp/resources/schema/dtd/skinconfig-v07-1.dtd Mon Jun 13 06:38:40 2005
@@ -1,5 +1,5 @@
<!--
- Copyright 2002-2004 The Apache Software Foundation or its licensors,
+ Copyright 2002-2005 The Apache Software Foundation or its licensors,
as applicable.
Licensed under the Apache License, Version 2.0 (the "License");
@@ -16,7 +16,7 @@
-->
<!-- ===================================================================
- Forrest Skinconf DTD (Version 0.6)
+ Forrest Skinconf DTD (Version 0.7)
PURPOSE:
This DTD was developed to create a simple Skin configuration
@@ -46,7 +46,7 @@
project-name?, project-description?, project-url?, project-logo,
group-name?, group-description?, group-url?, group-logo?,
host-url?, host-logo?, favicon-url?, year?, vendor?, copyright-link?, trail?,
- toc?, headings?, feedback?, motd-title?, motd-page?, motd-page-url?,
+ toc?, headings?, feedback?, motd?,
extra-css?, colors?, pdf?, credits?)>
<!ELEMENT search EMPTY>
@@ -108,6 +108,9 @@
<!ELEMENT feedback (#PCDATA)>
<!ATTLIST feedback href CDATA #IMPLIED
to CDATA #IMPLIED>
+ <!ELEMENT motd (motd-option+)>
+ <!ELEMENT motd-option (motd-title?, motd-page?, motd-page-url?)>
+ <!ATTLIST motd-option pattern CDATA #IMPLIED>
<!ELEMENT motd-title (#PCDATA)>
<!ELEMENT motd-page (#PCDATA)>
<!ATTLIST motd-page location CDATA #IMPLIED>
Modified: forrest/trunk/main/webapp/skins/pelt/xslt/html/site2xhtml.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/webapp/skins/pelt/xslt/html/site2xhtml.xsl?rev=190399&r1=190398&r2=190399&view=diff
==============================================================================
--- forrest/trunk/main/webapp/skins/pelt/xslt/html/site2xhtml.xsl (original)
+++ forrest/trunk/main/webapp/skins/pelt/xslt/html/site2xhtml.xsl Mon Jun 13 06:38:40 2005
@@ -60,10 +60,14 @@
+-->
<title>
<xsl:value-of select="div[@id='content']/h1"/>
- <xsl:if test="$config/motd-title">
- <xsl:text> (</xsl:text>
- <xsl:value-of select="$config/motd-title"/>
- <xsl:text>)</xsl:text>
+ <xsl:if test="$config/motd">
+ <xsl:for-each select="$config/motd/motd-option">
+ <xsl:if test="contains($path, @pattern)">
+ <xsl:text> (</xsl:text>
+ <xsl:value-of select="motd-title"/>
+ <xsl:text>)</xsl:text>
+ </xsl:if>
+ </xsl:for-each>
</xsl:if>
</title>
<!--+
@@ -489,21 +493,25 @@
</xsl:if>
<!-- Message of the day -->
- <xsl:if test="$config/motd-page">
- <xsl:if test="$config/motd-page/@location='alt' or $config/motd-page/@location='both'">
- <hr />
- <xsl:value-of select="$config/motd-page"/>
- <xsl:if test="$config/motd-page-url">
- <xsl:text> (</xsl:text>
- <a>
- <xsl:attribute name="href">
- <xsl:value-of select="$config/motd-page-url"/>
- </xsl:attribute>
- <xsl:text>More</xsl:text>
- </a>
- <xsl:text>)</xsl:text>
+ <xsl:if test="$config/motd">
+ <xsl:for-each select="$config/motd/motd-option">
+ <xsl:if test="contains($path, @pattern)">
+ <xsl:if test="motd-page/@location='alt' or motd-page/@location='both'">
+ <hr />
+ <xsl:value-of select="motd-page"/>
+ <xsl:if test="motd-page-url">
+ <xsl:text> (</xsl:text>
+ <a>
+ <xsl:attribute name="href">
+ <xsl:value-of select="motd-page-url"/>
+ </xsl:attribute>
+ <xsl:text>More</xsl:text>
+ </a>
+ <xsl:text>)</xsl:text>
+ </xsl:if>
+ </xsl:if>
</xsl:if>
- </xsl:if>
+ </xsl:for-each>
</xsl:if>
</div>
@@ -707,22 +715,26 @@
</xsl:template>
<xsl:template match="div[@id='skinconf-toc-page']">
- <xsl:if test="$config/motd-page">
- <xsl:if test="$config/motd-page/@location='page' or $config/motd-page/@location='both'">
- <div id="motd-area">
- <xsl:value-of select="$config/motd-page"/>
- <xsl:if test="$config/motd-page-url">
- <xsl:text> (</xsl:text>
- <a>
- <xsl:attribute name="href">
- <xsl:value-of select="$config/motd-page-url"/>
- </xsl:attribute>
- <xsl:text>More</xsl:text>
- </a>
- <xsl:text>)</xsl:text>
+ <xsl:if test="$config/motd">
+ <xsl:for-each select="$config/motd/motd-option">
+ <xsl:if test="contains($path, @pattern)">
+ <xsl:if test="motd-page/@location='page' or motd-page/@location='both'">
+ <div id="motd-area">
+ <xsl:value-of select="motd-page"/>
+ <xsl:if test="motd-page-url">
+ <xsl:text> (</xsl:text>
+ <a>
+ <xsl:attribute name="href">
+ <xsl:value-of select="motd-page-url"/>
+ </xsl:attribute>
+ <xsl:text>More</xsl:text>
+ </a>
+ <xsl:text>)</xsl:text>
+ </xsl:if>
+ </div>
</xsl:if>
- </div>
- </xsl:if>
+ </xsl:if>
+ </xsl:for-each>
</xsl:if>
<xsl:if test="$config/toc">
Modified: forrest/trunk/site-author/status.xml
URL: http://svn.apache.org/viewcvs/forrest/trunk/site-author/status.xml?rev=190399&r1=190398&r2=190399&view=diff
==============================================================================
--- forrest/trunk/site-author/status.xml (original)
+++ forrest/trunk/site-author/status.xml Mon Jun 13 06:38:40 2005
@@ -129,6 +129,14 @@
Added document to facilitate
<link href="site:upgrading_07">upgrading to v0.7</link>
</action>
+ <action dev="DC" type="update" context="code" importance="high">
+ Enhanced the Message of the Day (MOTD) facility.
+ See skinconf.xml from a "seed" site for configuration details.
+ Append a small text string after html title.
+ Add text to a panel on the page.
+ Select different messages depending on the URI string pattern.
+ To use it, declare skinconfig-v07-1.dtd in your skinconf.xml file.
+ </action>
<action context="code" type="update" dev="DC" due-to="Cyriaque Dupoirieux" fixes-bug="FOR-355">
Enable skinconf to specify optional page number format for PDF.
</action>
@@ -256,12 +264,6 @@
Added
<link href="site:howto/custom-html-source">How to customize
processing of html source</link>
- </action>
- <action dev="DC" type="add" context="code" importance="high">
- Added rudimentary Message of the Day facility.
- See skinconf.xml from a "seed" site for configuration details.
- Append a small text string after html title.
- Add text to a panel on the page.
</action>
<action dev="RDG" type="update" context="code" importance="high">
Moved status "changes" and "todo" page generation to the