You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@roller.apache.org by sn...@apache.org on 2005/06/09 05:19:20 UTC

svn commit: r189695 [3/67] - in /incubator/roller/trunk: ./ contrib/ contrib/lib/ contrib/plugins/ contrib/plugins/src/ contrib/plugins/src/org/ contrib/plugins/src/org/roller/ contrib/plugins/src/org/roller/presentation/ contrib/plugins/src/org/roller/presentation/velocity/ contrib/plugins/src/org/roller/presentation/velocity/plugins/ contrib/plugins/src/org/roller/presentation/velocity/plugins/acronyms/ contrib/plugins/src/org/roller/presentation/velocity/plugins/bookmarks/ contrib/plugins/src/org/roller/presentation/velocity/plugins/email/ contrib/plugins/src/org/roller/presentation/velocity/plugins/jspwiki/ contrib/plugins/src/org/roller/presentation/velocity/plugins/radeox/ contrib/plugins/src/org/roller/presentation/velocity/plugins/readmore/ contrib/plugins/src/org/roller/presentation/velocity/plugins/smileys/ contrib/plugins/src/org/roller/presentation/velocity/plugins/textile/ contrib/plugins/src/org/roller/presentation/velocity/plugins/topictag/ custom/ custom/src/ custom/web/ docs/ docs/images/ docs/installguide/ docs/installguide/old/ docs/userguide/ docs/userguide/images/ docs/userguide/old/ metadata/ metadata/database/ metadata/database/hibernate/ metadata/xdoclet/ nbproject/ personal/ personal/eclipse/ personal/testing/ sandbox/ sandbox/planetroller/ sandbox/planetroller/metadata/ sandbox/planetroller/metadata/database/ sandbox/planetroller/src/ sandbox/planetroller/src/org/ sandbox/planetroller/src/org/roller/ sandbox/planetroller/src/org/roller/tools/ sandbox/planetroller/src/org/roller/tools/planet/ sandbox/planetroller/templates/ sandbox/planetroller/test/ sandbox/planetroller/test/org/ sandbox/planetroller/test/org/roller/ sandbox/planetroller/test/org/roller/model/ sandbox/planetroller/test/org/roller/tools/ sandbox/planetroller/test/org/roller/tools/planet/ sandbox/planetroller/testdata/ sandbox/planetroller/testdata/cache/ sandbox/planetroller/testdata/output/ sandbox/standalone/ sandbox/standalone/jspwiki/ sandbox/standalone/jspwiki/default/ sandbox/standalone/jspwiki/default/images/ sandbox/standalone/lib/ sandbox/standalone/src/ sandbox/standalone/src/org/ sandbox/standalone/src/org/roller/ sandbox/standalone/src/org/roller/jspwiki/ sandbox/standalone/src/org/roller/tomcat/ sandbox/standalone/src/org/roller/util/ sandbox/standalone/tests/ sandbox/standalone/tests/org/ sandbox/standalone/tests/org/roller/ sandbox/standalone/tests/org/roller/util/ sandbox/standalone/tomcat/ src/ src/org/ src/org/roller/ src/org/roller/business/ src/org/roller/business/hibernate/ src/org/roller/business/search/ src/org/roller/business/search/operations/ src/org/roller/business/utils/ src/org/roller/config/ src/org/roller/config/runtime/ src/org/roller/model/ src/org/roller/pojos/ src/org/roller/presentation/ src/org/roller/presentation/atomapi/ src/org/roller/presentation/bookmarks/ src/org/roller/presentation/bookmarks/actions/ src/org/roller/presentation/bookmarks/formbeans/ src/org/roller/presentation/bookmarks/tags/ src/org/roller/presentation/filters/ src/org/roller/presentation/forms/ src/org/roller/presentation/newsfeeds/ src/org/roller/presentation/pagecache/ src/org/roller/presentation/pagecache/rollercache/ src/org/roller/presentation/pings/ src/org/roller/presentation/planet/ src/org/roller/presentation/tags/ src/org/roller/presentation/tags/calendar/ src/org/roller/presentation/tags/menu/ src/org/roller/presentation/util/ src/org/roller/presentation/velocity/ src/org/roller/presentation/weblog/ src/org/roller/presentation/weblog/actions/ src/org/roller/presentation/weblog/formbeans/ src/org/roller/presentation/weblog/tags/ src/org/roller/presentation/website/ src/org/roller/presentation/website/actions/ src/org/roller/presentation/website/formbeans/ src/org/roller/presentation/website/tags/ src/org/roller/presentation/xmlrpc/ src/org/roller/util/ src/org/roller/util/rome/ tests/ tests/org/ tests/org/roller/ tests/org/roller/ant/ tests/org/roller/business/ tests/org/roller/presentation/ tests/org/roller/presentation/atomapi/ tests/org/roller/presentation/bookmarks/ tests/org/roller/presentation/filters/ tests/org/roller/presentation/velocity/ tests/org/roller/presentation/velocity/plugins/ tests/org/roller/presentation/velocity/plugins/smileys/ tests/org/roller/presentation/velocity/plugins/textile/ tests/org/roller/presentation/weblog/ tests/org/roller/presentation/xmlrpc/ tests/org/roller/util/ tests/org/roller/util/rome/ tools/ tools/buildtime/ tools/buildtime/ant-1.6.2/ tools/buildtime/findbugs/ tools/buildtime/findbugs/lib/ tools/buildtime/findbugs/plugin/ tools/buildtime/mockrunner-0.3/ tools/buildtime/mockrunner-0.3/lib/ tools/buildtime/mockrunner-0.35/ tools/buildtime/mockrunner-0.35/lib/ tools/buildtime/tomcat-4.1.24/ tools/buildtime/xdoclet-1.2/ tools/buildtime/xdoclet-1.2/lib/ tools/hibernate-2.1/ tools/hibernate-2.1/lib/ tools/lib/ tools/standard-1.0.3/ tools/standard-1.0.3/lib/ tools/standard-1.0.3/tld/ tools/struts-1.2.4/ tools/struts-1.2.4/lib/ web/ web/WEB-INF/ web/WEB-INF/classes/ web/WEB-INF/classes/flavors/ web/WEB-INF/classes/themes/ web/bookmarks/ web/editor/ web/editor/images/ web/images/ web/images/editor/ web/images/midas/ web/images/preview/ web/images/smileys/ web/planet/ web/tags/ web/templates/ web/theme/ web/theme/images/ web/theme/lavender/ web/theme/scripts/ web/theme/scripts/classes/ web/themes/ web/themes/basic/ web/themes/berkley/ web/themes/berkley/images/ web/themes/brushedmetal/ web/themes/brushedmetal/images/ web/themes/cheb/ web/themes/cheb/images/ web/themes/cheb/scripts/ web/themes/clean/ web/themes/currency-i18n/ web/themes/currency-i18n/images/ web/themes/currency/ web/themes/currency/images/ web/themes/grey2/ web/themes/moonshine/ web/themes/movablemanila/ web/themes/movablemanila/images/ web/themes/pacifica/ web/themes/robot/ web/themes/rolling/ web/themes/rolling/images/ web/themes/sotto/ web/themes/sotto/images/ web/themes/sotto/styles/ web/themes/sunsets/ web/themes/sunsets/images/ web/themes/sunsets/scripts/ web/themes/sunsets/styles/ web/themes/werner/ web/themes/x2/ web/themes/x2/images/ web/themes/x2/scripts/ web/themes/x2/styles/ web/weblog/ web/website/

Added: incubator/roller/trunk/contrib/plugins/src/org/roller/presentation/velocity/plugins/email/ObfuscateEmailPlugin.java
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/contrib/plugins/src/org/roller/presentation/velocity/plugins/email/ObfuscateEmailPlugin.java?rev=189695&view=auto
==============================================================================
--- incubator/roller/trunk/contrib/plugins/src/org/roller/presentation/velocity/plugins/email/ObfuscateEmailPlugin.java (added)
+++ incubator/roller/trunk/contrib/plugins/src/org/roller/presentation/velocity/plugins/email/ObfuscateEmailPlugin.java Wed Jun  8 20:18:46 2005
@@ -0,0 +1,61 @@
+/*
+ * Created on Nov 2, 2003
+ *
+ */
+package org.roller.presentation.velocity.plugins.email;
+
+import org.apache.commons.lang.StringEscapeUtils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.velocity.context.Context;
+import org.roller.pojos.WeblogEntryData;
+import org.roller.presentation.RollerRequest;
+import org.roller.presentation.velocity.PagePlugin;
+import org.roller.util.RegexUtil;
+
+/**
+ * @author lance
+ *
+ */
+public class ObfuscateEmailPlugin implements PagePlugin
+{
+    protected String name = "Email Scrambler";
+    protected String description = "Automatically converts email addresses " +
+      "to me-AT-mail-DOT-com format.  Also "scrambles" mailto: links.";
+    
+    private static Log mLogger = 
+       LogFactory.getFactory().getInstance(ObfuscateEmailPlugin.class);
+           
+    public ObfuscateEmailPlugin()
+    {
+        mLogger.debug("ObfuscateEmailPlugin instantiated.");
+    }
+    
+    public String toString() { return name; }
+
+	/* (non-Javadoc)
+	 * @see org.roller.presentation.velocity.PagePlugin#init(org.roller.presentation.RollerRequest, org.apache.velocity.context.Context)
+	 */
+	public void init(RollerRequest rreq, Context ctx)
+	{
+	}
+
+	/* 
+     * Find any likely email addresses and HEX escape them 
+     * (non-Javadoc)
+	 * @see org.roller.presentation.velocity.PagePlugin#render(java.lang.String)
+	 */
+	public String render(String str)
+	{
+        return RegexUtil.encodeEmail(str);
+	}
+    
+    public String render(WeblogEntryData entry, boolean skipFlag)
+    {
+        return render(entry.getText());
+    }
+
+    public String getName() { return name; }
+    public String getDescription() { return StringEscapeUtils.escapeJavaScript(description); }
+
+}

Added: incubator/roller/trunk/contrib/plugins/src/org/roller/presentation/velocity/plugins/email/package.html
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/contrib/plugins/src/org/roller/presentation/velocity/plugins/email/package.html?rev=189695&view=auto
==============================================================================
--- incubator/roller/trunk/contrib/plugins/src/org/roller/presentation/velocity/plugins/email/package.html (added)
+++ incubator/roller/trunk/contrib/plugins/src/org/roller/presentation/velocity/plugins/email/package.html Wed Jun  8 20:18:46 2005
@@ -0,0 +1,9 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+  <title></title>
+</head>
+<body>
+PagePlugin: Email address obfuscation.<br>
+</body>
+</html>

Added: incubator/roller/trunk/contrib/plugins/src/org/roller/presentation/velocity/plugins/jspwiki/RollerPageProvider.java
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/contrib/plugins/src/org/roller/presentation/velocity/plugins/jspwiki/RollerPageProvider.java?rev=189695&view=auto
==============================================================================
--- incubator/roller/trunk/contrib/plugins/src/org/roller/presentation/velocity/plugins/jspwiki/RollerPageProvider.java (added)
+++ incubator/roller/trunk/contrib/plugins/src/org/roller/presentation/velocity/plugins/jspwiki/RollerPageProvider.java Wed Jun  8 20:18:46 2005
@@ -0,0 +1,22 @@
+/*
+ * Created on May 29, 2003
+ */
+package org.roller.presentation.velocity.plugins.jspwiki;
+
+import com.ecyrd.jspwiki.providers.FileSystemProvider;
+
+/**
+ * Override page provider so that Wiki links always appear as hyperlinks
+ * to the external Wiki's Wiki.jsp?page=MyPageName page. Without this, they
+ * would appear as links tp Edit.jsp?page=MyPageName, which is not quite as
+ * nice. Eventually, it may be a good idea to use JSPWiki's XML-RPC interface
+ * to figure out if the page exists or not.
+ * @author David M Johnson
+ */
+public class RollerPageProvider extends FileSystemProvider
+{
+    public boolean pageExists(String arg0)
+    {
+        return true;
+    }
+}

Added: incubator/roller/trunk/contrib/plugins/src/org/roller/presentation/velocity/plugins/jspwiki/WikiPlugin.java
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/contrib/plugins/src/org/roller/presentation/velocity/plugins/jspwiki/WikiPlugin.java?rev=189695&view=auto
==============================================================================
--- incubator/roller/trunk/contrib/plugins/src/org/roller/presentation/velocity/plugins/jspwiki/WikiPlugin.java (added)
+++ incubator/roller/trunk/contrib/plugins/src/org/roller/presentation/velocity/plugins/jspwiki/WikiPlugin.java Wed Jun  8 20:18:46 2005
@@ -0,0 +1,3 @@
+package org.roller.presentation.velocity.plugins.jspwiki;
+import com.ecyrd.jspwiki.FileUtil;
import com.ecyrd.jspwiki.TranslatorReader;
import com.ecyrd.jspwiki.WikiContext;
import com.ecyrd.jspwiki.WikiEngine;
import com.ecyrd.jspwiki.WikiPage;

import org.apache.commons.lang.StringEscapeUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.velocity.context.Context;
import org.roller.pojos.WeblogEntryData;
import org.roller.presentation.RollerRequest;
import org.roller.presentation.velocity.PagePlugin;

import java.io.StringReader;
import java.util.StringTokenizer;

/**
 * Wiki plugin using the JSPWiki WikiEngine. If you want Wiki links to point 
 * to your JSPWiki, then edit the jspwiki.properties fiel in Roller's WEB-INF
 * directory and set the jspwiki.baseURL appropriately. For example, if your
 * Wiki is on your localhost in the Servlet Context named 'wiki' then you'd
 * set jspwiki.baseURL like so:<br />
 * <br />
 *  jspwiki.baseURL=http://local:8080/wiki/<br />
 * 
 * @author David M Johnson
 */
public class WikiPlugin implements PagePlugin
{
    protected String name = "JSPWiki Syntax";
    public String description = "Allows use of JSPWiki formatting to easily " +
    "generate HTML. See the " +
    "<a href='http://www.jspwiki.org/Wiki.jsp?page=TextFormattingRules' target='jspwiki'>JSPWiki</a> site.";
    
    private static Log mLogger = 
       LogFactory.getFactory().getInstance(WikiPlugin.class);

    static WikiEngine mWikiEngine = null;
    static WikiContext mWikiContext = null;
    static WikiPage mWikiPage = new WikiPage("dummyPage");
    
    public WikiPlugin()
    {
        mLogger.debug("JSPWiki WikiPlugin instantiated.");
    }
    
    public String toString() { return name; }
    
    /** 
     * Initialize the JSPWiki Engine if not done so already.
     * Put the Plugin into the VelocityContex (is this still necessary?-Lance).
     */
    public void init(RollerRequest rreq, Context ctx)
    {
        try
        {
            if (WikiPlugin.mWikiEngine == null)
            {
                if (rreq != null && rreq.getPageContext() != null)
                {
                    WikiPlugin.mWikiEngine = WikiEngine.getInstance(
                        rreq.getPageContext().getServletConfig());
                }
            }
            if (WikiPlugin.mWikiContext == null && WikiPlugin.mWikiEngine != null)
            {
                WikiPlugin.mWikiContext = new WikiContext( 
                    WikiPlugin.mWikiEngine, WikiPlugin.mWikiPage );
            }

            if (WikiPlugin.mWikiContext != null && WikiPlugin.mWikiEngine != null)
            {
                ctx.put("wikiPlugin",this);
            }
        }
        catch (Exception e)
        {
            mLogger.error("ERROR initializing WikiPlugin",e);
        }
    }
    
    /** 
     * Convert an input string that contains text that uses JSPWiki
     * syntax to an output string in HTML format.
     * @param src Input string that uses JSPWiki syntax
     * @return Output string in HTML format.
     */
    public String render( String src )
    {
        String ret = null;        
        try
        {
            StringReader reader = new StringReader(src);            
            TranslatorReader tr = new TranslatorReader( mWikiContext, reader );
            ret = FileUtil.readContents( tr );        
        }
        catch (Exception e)
        {
            mLogger.error("ERROR rendering Wiki text",e);
        }
        return ret;
    }
    
    public String render( WeblogEntryData entry, boolean skipFlag)
    {
        return render(entry.getText());
    }
+    /** Return URL to the Wiki page for a weblog entry, CamelCase style */
    public String makeCamelCaseWikiLink( WeblogEntryData wd, String prefix )
    {
        StringBuffer sb = new StringBuffer();
        StringTokenizer toker = new StringTokenizer(wd.getAnchor(),"_");
        while ( toker.hasMoreTokens() )
        {
            String token = toker.nextToken();
            sb.append( token.substring(0,1).toUpperCase() );
            sb.append( token.substring(1) );
        }
        return mWikiEngine.getBaseURL()+"Wiki.jsp?page="+prefix+sb.toString();
    }
    
    /** Return URL to the Wiki page for a weblog entry, spacey style */
    public String makeSpacedWikiLink( WeblogEntryData wd, String prefix )
    {
        StringBuffer sb = new StringBuffer();
        StringTokenizer toker = new StringTokenizer(wd.getAnchor(),"_");
        while ( toker.hasMoreTokens() )
        {
            sb.append( toker.nextToken() );
            if ( toker.hasMoreTokens() ) sb.append("%20");
        }
        return mWikiEngine.getBaseURL()+"Wiki.jsp?page="+prefix+sb.toString();
    }

    public String getName() { return name; }
    public String getDescription() { return StringEscapeUtils.escapeJavaScript(description); }
}
\ No newline at end of file

Added: incubator/roller/trunk/contrib/plugins/src/org/roller/presentation/velocity/plugins/jspwiki/package.html
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/contrib/plugins/src/org/roller/presentation/velocity/plugins/jspwiki/package.html?rev=189695&view=auto
==============================================================================
--- incubator/roller/trunk/contrib/plugins/src/org/roller/presentation/velocity/plugins/jspwiki/package.html (added)
+++ incubator/roller/trunk/contrib/plugins/src/org/roller/presentation/velocity/plugins/jspwiki/package.html Wed Jun  8 20:18:46 2005
@@ -0,0 +1,9 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+  <title></title>
+</head>
+<body>
+PagePlugin: JSPWiki rendering of weblog entries.<br>
+</body>
+</html>

Added: incubator/roller/trunk/contrib/plugins/src/org/roller/presentation/velocity/plugins/radeox/WikiPlugin.java
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/contrib/plugins/src/org/roller/presentation/velocity/plugins/radeox/WikiPlugin.java?rev=189695&view=auto
==============================================================================
--- incubator/roller/trunk/contrib/plugins/src/org/roller/presentation/velocity/plugins/radeox/WikiPlugin.java (added)
+++ incubator/roller/trunk/contrib/plugins/src/org/roller/presentation/velocity/plugins/radeox/WikiPlugin.java Wed Jun  8 20:18:46 2005
@@ -0,0 +1,61 @@
+
+package org.roller.presentation.velocity.plugins.radeox;
+
+import org.apache.commons.lang.StringEscapeUtils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.velocity.context.Context;
+import org.radeox.EngineManager;
+import org.radeox.engine.context.BaseRenderContext;
+import org.radeox.engine.context.RenderContext;
+import org.roller.pojos.WeblogEntryData;
+import org.roller.presentation.RollerRequest;
+import org.roller.presentation.velocity.PagePlugin;
+
+/**
+ * @author David M Johnson
+ */
+public class WikiPlugin implements PagePlugin
+{
+    protected String name = "Radeox Wiki";
+    protected String description = "Allows use of Radeox formatting to generate HTML. " +
+        "See the <a href='http://radeox.org/space/snipsnap-help' target='radeox'>Radeox</a> site.";
+    
+    private static Log mLogger = 
+       LogFactory.getFactory().getInstance(WikiPlugin.class);
+    
+    public WikiPlugin()
+    {
+        mLogger.debug("Radeox WikiPlugin instantiated.");
+    }
+    
+    public String toString() { return name; }
+    
+    /** 
+     * Put plugin into the page context so templates may access it.
+     */
+    public void init(RollerRequest rreq, Context ctx)
+    {
+        ctx.put("wikiRenderer",this);
+    }
+    
+    /** 
+     * Convert an input string that contains text that uses the Radeox Wiki
+     * syntax to an output string in HTML format.
+     * @param src Input string that uses Radeox Wiki syntax
+     * @return Output string in HTML format.
+     */
+    public String render( String src )
+    {
+        RenderContext context = new BaseRenderContext();
+        return EngineManager.getInstance().render(src, context);
+    }
+    
+    public String render( WeblogEntryData entry, boolean skipFlag)
+    {
+        return render( entry.getText() );
+    }
+
+    public String getName() { return name; }
+    public String getDescription() { return StringEscapeUtils.escapeJavaScript(description); }
+}

Added: incubator/roller/trunk/contrib/plugins/src/org/roller/presentation/velocity/plugins/radeox/package.html
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/contrib/plugins/src/org/roller/presentation/velocity/plugins/radeox/package.html?rev=189695&view=auto
==============================================================================
--- incubator/roller/trunk/contrib/plugins/src/org/roller/presentation/velocity/plugins/radeox/package.html (added)
+++ incubator/roller/trunk/contrib/plugins/src/org/roller/presentation/velocity/plugins/radeox/package.html Wed Jun  8 20:18:46 2005
@@ -0,0 +1,9 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+  <title></title>
+</head>
+<body>
+PagePlugin: Radeox Wiki rendering of weblog entries.<br>
+</body>
+</html>

Added: incubator/roller/trunk/contrib/plugins/src/org/roller/presentation/velocity/plugins/readmore/ReadMorePlugin.java
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/contrib/plugins/src/org/roller/presentation/velocity/plugins/readmore/ReadMorePlugin.java?rev=189695&view=auto
==============================================================================
--- incubator/roller/trunk/contrib/plugins/src/org/roller/presentation/velocity/plugins/readmore/ReadMorePlugin.java (added)
+++ incubator/roller/trunk/contrib/plugins/src/org/roller/presentation/velocity/plugins/readmore/ReadMorePlugin.java Wed Jun  8 20:18:46 2005
@@ -0,0 +1,107 @@
+/*
+ * Created on Nov 2, 2003
+ *
+ */
+package org.roller.presentation.velocity.plugins.readmore;
+
+import org.apache.commons.lang.StringEscapeUtils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.velocity.context.Context;
+import org.roller.RollerException;
+import org.roller.model.RollerFactory;
+import org.roller.model.UserManager;
+import org.roller.pojos.WeblogEntryData;
+import org.roller.pojos.WebsiteData;
+import org.roller.presentation.RollerRequest;
+import org.roller.presentation.velocity.PagePlugin;
+import org.roller.util.Utilities;
+
+/**
+ * @author lance
+ */
+public class ReadMorePlugin implements PagePlugin
+{
+    protected String name = "Read More Summary";
+    protected String description = "Stops entry after 250 characters and creates " +
+        "a link to the full entry.";
+    
+    private static Log mLogger = 
+       LogFactory.getFactory().getInstance(ReadMorePlugin.class);
+       
+    String ctxPath = "";
+    
+    public ReadMorePlugin()
+    {
+        mLogger.debug("ReadMorePlugin instantiated.");
+    }
+    
+    public String toString() { return name; }
+
+	/* (non-Javadoc)
+	 * @see org.roller.presentation.velocity.PagePlugin#init(org.roller.presentation.RollerRequest, org.apache.velocity.context.Context)
+	 */
+	public void init(RollerRequest rreq, Context ctx) throws RollerException
+	{
+        if (rreq == null) throw new RollerException("RollerRequest is null.");
+  
+        ctxPath = rreq.getRequest().getContextPath();        
+	}
+
+	/**
+     * @param mgr
+     * @param website
+     * @return
+     */
+    private String getPageLink(UserManager mgr, WebsiteData website) throws RollerException
+    {
+        return mgr.retrievePage(website.getDefaultPageId()).getLink();
+    }
+
+    /* 
+     * This method cannot do it's intended job (since it cannot
+     * read the current Entry) so it is to do no work!
+     * 
+     * (non-Javadoc)
+	 * @see org.roller.presentation.velocity.PagePlugin#render(java.lang.String)
+	 */
+	public String render(String str)
+	{
+		return str;
+	}
+    
+    public String render(WeblogEntryData entry, boolean skipFlag)
+    {
+        if (skipFlag) 
+            return entry.getText();
+        
+        // in case it didn't initialize
+        String pageLink = "Weblog";
+        try
+        {
+            pageLink = getPageLink(
+                RollerFactory.getRoller().getUserManager(), entry.getWebsite());
+        }
+        catch (RollerException e) 
        {
+            mLogger.warn("Unable to get pageLink", e);
+        }
+        
+        String result = Utilities.removeHTML(entry.getText(), true);
        result = Utilities.truncateText(result, 240, 260, "...");
        //String result = Utilities.truncateNicely(entry.getText(), 240, 260, "... ");
        
+        // if the result is shorter, we need to add "Read More" link
+        if (result.length() < entry.getText().length())
+        {            
+            String link = "<div class=\"readMore\"><a href=\"" + 
+                ctxPath + "/comments/" + 
+                entry.getWebsite().getUser().getUserName() + 
+                "/" + pageLink + "/" + Utilities.encode(entry.getAnchor()) +
+                "\">Read More</a></div>";
+            
+            result += link;
+        }
+        return result;
+    }
+
+
+    public String getName() { return name; }
+    public String getDescription() { return StringEscapeUtils.escapeJavaScript(description); }
+}
\ No newline at end of file

Added: incubator/roller/trunk/contrib/plugins/src/org/roller/presentation/velocity/plugins/readmore/package.html
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/contrib/plugins/src/org/roller/presentation/velocity/plugins/readmore/package.html?rev=189695&view=auto
==============================================================================
--- incubator/roller/trunk/contrib/plugins/src/org/roller/presentation/velocity/plugins/readmore/package.html (added)
+++ incubator/roller/trunk/contrib/plugins/src/org/roller/presentation/velocity/plugins/readmore/package.html Wed Jun  8 20:18:46 2005
@@ -0,0 +1,9 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+  <title></title>
+</head>
+<body>
+PagePlugin: Readmore rendering of weblog entries.<br>
+</body>
+</html>

Added: incubator/roller/trunk/contrib/plugins/src/org/roller/presentation/velocity/plugins/smileys/SmileysPlugin.java
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/contrib/plugins/src/org/roller/presentation/velocity/plugins/smileys/SmileysPlugin.java?rev=189695&view=auto
==============================================================================
--- incubator/roller/trunk/contrib/plugins/src/org/roller/presentation/velocity/plugins/smileys/SmileysPlugin.java (added)
+++ incubator/roller/trunk/contrib/plugins/src/org/roller/presentation/velocity/plugins/smileys/SmileysPlugin.java Wed Jun  8 20:18:46 2005
@@ -0,0 +1,185 @@
+package org.roller.presentation.velocity.plugins.smileys;
+
+import org.apache.commons.lang.StringEscapeUtils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.velocity.context.Context;
+import org.roller.RollerException;
+import org.roller.pojos.WeblogEntryData;
+import org.roller.presentation.RollerRequest;
+import org.roller.presentation.velocity.PagePlugin;
+
+import java.util.Enumeration;
+import java.util.Properties;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * Converts ascii emoticons into HTML image tags.
+ * 
+ * @author lance.lavandowska
+ * Created on Jun 8, 2004
+ */
+public class SmileysPlugin implements PagePlugin
+{
+    private String name = "Emoticons";
+    private String description = "Change ASCII emoticons to graphics.  " +
+        ":-) becomes <img src='./images/smileys/smile.gif'>";
+    
+    public String toString() { return name; } 
+    
+    static Pattern[] smileyPatterns = new Pattern[0];
+    static String[] imageTags = new String[0];
+
+    private static Log mLogger = 
+        LogFactory.getFactory().getInstance(SmileysPlugin.class);
+
+    /*
+     * Definition of the emoticons 'glyph' and graphic.
+     */
+    private static Properties smileyDefs = new Properties();
+    static
+    {
+        try
+        {
+            smileyDefs.load(SmileysPlugin.class.getResourceAsStream("smileys.properties"));
+        }
+        catch (Exception e)
+        {
+            mLogger.error("Unable to load smileys.properties", e);
+        }        
+    }
+    
+    public SmileysPlugin()
+    {
+        mLogger.debug("SmileysPlugin instantiated.");
+    }
+
+    /* 
+     * Find occurences of ascii emoticons and turn them into
+     * HTML image pointers.
+     * 
+     * @see org.roller.presentation.velocity.PagePlugin#render(java.lang.String)
+     */
+    public String render(String text)
+    {
+        Matcher matcher = null;
+        for (int i=0; i<smileyPatterns.length; i++)
+        {
+            matcher = smileyPatterns[i].matcher(text);
+            text = matcher.replaceAll(imageTags[i]);
+        }
+        return text;
+    }
+
+    /* 
+     * Convert the SmileyDefs into RegEx patterns and img tags for
+     * later use.  Need an HttpServletRequest though so that we can
+     * get the ServletContext Path.  But only do it once.
+     * 
+     * @see org.roller.presentation.velocity.PagePlugin#init(org.roller.presentation.RollerRequest, org.apache.velocity.context.Context)
+     */
+    public synchronized void init(RollerRequest rreq, Context ctx) throws RollerException
+    {
+        // don't do this work if Smileys already loaded
+        if (SmileysPlugin.smileyPatterns.length < 1)
+        {
+            String contextPath = "";
+            if (rreq != null && rreq.getRequest() != null) 
+            {
+                contextPath = rreq.getRequest().getContextPath();
+            }
+            Pattern[] tempP = new Pattern[SmileysPlugin.smileyDefs.size()];
+            String[] tempS = new String[SmileysPlugin.smileyDefs.size()];
+            //System.out.println("# smileys: " + smileyDefs.size());
+            int count = 0;
+            Enumeration enum1 = SmileysPlugin.smileyDefs.propertyNames();
+            while(enum1.hasMoreElements())
+            {
+                String smiley = (String)enum1.nextElement();
+                String smileyAlt = htmlEscape(smiley);
+                tempP[count] = Pattern.compile(regexEscape(smiley));
+                tempS[count] = "<img src=\"" + 
+                               contextPath + "/images/smileys/" + 
+                               smileyDefs.getProperty(smiley, "smile.gif") +
+                               "\" class=\"smiley\"" + 
+                               " alt=\"" + smileyAlt + "\"" +
+                               " title=\"" + smileyAlt +"\">";
+                //System.out.println(smiley + "=" + tempS[count]);
+                count++;
+            }
+            SmileysPlugin.smileyPatterns = tempP;
+            SmileysPlugin.imageTags = tempS;
+        }
+    }
+    
+    /*
+     * To display the smiley 'glyph' certain characters
+     * must be HTML escaped.
+     */
+    private String htmlEscape(String smiley) 
+    {
+        char[] chars = smiley.toCharArray();
+        StringBuffer buf = new StringBuffer();
+        for (int i=0; i<chars.length; i++) 
+        {
+            if (chars[i] == '"')
+            {
+                buf.append("&quot;");
+            }
+            else if (chars[i] == '>')
+            {
+                buf.append("&gt;");
+            }
+            else if (chars[i] == '<')
+            {
+                buf.append("&lt;");
+            }
+            else
+            {    
+                buf.append(chars[i]);
+            }
+        }
+        return buf.toString();    
+    }
+
+    /**
+     * Some characters have to escaped with a backslash before
+     * being compiled into a Regular Expression.
+     * 
+     * @param smiley
+     * @return
+     */
+    private static char[] escape_regex = new char[] 
+        {'-', '(', ')', '\\', '|', ':', '^', '$', '*', '+', '?', 
+         '{', '}', '!', '=', '<', '>', '&', '[', ']' };
+    private String regexEscape(String smiley)
+    {
+        char[] chars = smiley.toCharArray();
+        StringBuffer buf = new StringBuffer();
+        for (int i=0; i<chars.length; i++) 
+        {
+            for (int x=0; x<escape_regex.length; x++)
+            {
+                if (escape_regex[x] == chars[i])
+                {
+                    buf.append("\\");
+                    break;                    
+                }
+            }
+            buf.append(chars[i]);
+        }
+        return buf.toString();
+    }
+
+    /* 
+     * @see org.roller.presentation.velocity.PagePlugin#render(org.roller.pojos.WeblogEntryData, boolean)
+     */
+    public String render(WeblogEntryData entry, boolean skipFlag)
+    {
+        return render(entry.getText());
+    }
+
+    public String getName() { return name; }
+    public String getDescription() { return StringEscapeUtils.escapeJavaScript(description); }
+}

Added: incubator/roller/trunk/contrib/plugins/src/org/roller/presentation/velocity/plugins/smileys/smileys.properties
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/contrib/plugins/src/org/roller/presentation/velocity/plugins/smileys/smileys.properties?rev=189695&view=auto
==============================================================================
--- incubator/roller/trunk/contrib/plugins/src/org/roller/presentation/velocity/plugins/smileys/smileys.properties (added)
+++ incubator/roller/trunk/contrib/plugins/src/org/roller/presentation/velocity/plugins/smileys/smileys.properties Wed Jun  8 20:18:46 2005
@@ -0,0 +1,40 @@
+\:-)=smile.gif
+\:)=smile.gif
+;-)=wink.gif
+;)=wink.gif
+\:-(=sad.gif
+\:(=sad.gif
+\:-0=surprised.gif
+8-)=sunglasses.gif
+\:-D=grin.gif
+\\-o=bored.gif
+\:-P=tongue.gif
+O\:-)=angelic.gif
+\:-||=angry.gif
+%-)=drunk.gif
+/\:)=20.gif
+\:-S=15.gif
+\:|=19.gif
+;;)=smirk.gif
+\:-B=bucktooth.gif
+\=;=hand.gif
+[-(=28.gif
+(\:|=depressed.gif
+\=P~=drool.gif
+\:-?=thinker.gif
+\=D>=whisper.gif
+\:">=blush.gif
+\:o)=clown.gif
+\:-/=confused.gif
+\:((=cry.gif
+>\:)=devil.gif
+\#-o=doh.gif
+\:-*=kiss.gif
+\:))=laugh.gif
+\:x=love.gif
+8-|=rolleyes.gif
+\:(\:-$=shush.gif
+\:-&=sick.gif
+8-}=silly.gif
+I-)=sleep.gif
+\:->=smug.gif
\ No newline at end of file

Added: incubator/roller/trunk/contrib/plugins/src/org/roller/presentation/velocity/plugins/textile/TextilePlugin.java
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/contrib/plugins/src/org/roller/presentation/velocity/plugins/textile/TextilePlugin.java?rev=189695&view=auto
==============================================================================
--- incubator/roller/trunk/contrib/plugins/src/org/roller/presentation/velocity/plugins/textile/TextilePlugin.java (added)
+++ incubator/roller/trunk/contrib/plugins/src/org/roller/presentation/velocity/plugins/textile/TextilePlugin.java Wed Jun  8 20:18:46 2005
@@ -0,0 +1,59 @@
+
+package org.roller.presentation.velocity.plugins.textile;
+
+import org.apache.commons.lang.StringEscapeUtils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.velocity.context.Context;
+import org.roller.pojos.WeblogEntryData;
+import org.roller.presentation.RollerRequest;
+import org.roller.presentation.velocity.PagePlugin;
+
+/**
+ * @author David M Johnson
+ */
+public class TextilePlugin implements PagePlugin
+{
+    public String name = "Textile Formatter";
+    public String description = "Allows use of Textile formatting to easily " +
+        "generate HTML. See the <a href='http://textism.com/tools/textile' target='textile'>Textile</a> site.";
+
+    public String toString() { return name; } 
+    
+    private net.sf.textile4j.Textile mTextile = new net.sf.textile4j.Textile();
+    
+    private static Log mLogger = 
+       LogFactory.getFactory().getInstance(TextilePlugin.class);
+    
+    public TextilePlugin()
+    {
+        mLogger.debug("Textile Plugin instantiated.");
+    }
+    
+    /** 
+     * Put plugin into the page context so templates may access it.
+     */
+    public void init(RollerRequest rreq, Context ctx)
+    {
+        ctx.put("textileRenderer",this);
+    }
+    
+    /** 
+     * Convert an input string that contains text that uses the Textile
+     * syntax to an output string in HTML format.
+     * @param src Input string that uses Textile syntax
+     * @return Output string in HTML format.
+     */
+    public String render( String src )
+    {
+        return mTextile.process(src);
+    }
+    
+    public String render( WeblogEntryData entry, boolean skipFlag )
+    {
+        return render( entry.getText() );
+    }
+
+    public String getName() { return name; }
+    public String getDescription() { return StringEscapeUtils.escapeJavaScript(description); }
+}

Added: incubator/roller/trunk/contrib/plugins/src/org/roller/presentation/velocity/plugins/textile/package.html
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/contrib/plugins/src/org/roller/presentation/velocity/plugins/textile/package.html?rev=189695&view=auto
==============================================================================
--- incubator/roller/trunk/contrib/plugins/src/org/roller/presentation/velocity/plugins/textile/package.html (added)
+++ incubator/roller/trunk/contrib/plugins/src/org/roller/presentation/velocity/plugins/textile/package.html Wed Jun  8 20:18:46 2005
@@ -0,0 +1,9 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+  <title></title>
+</head>
+<body>
+PagePlugin: Textile rendering of weblog entries.<br>
+</body>
+</html>

Added: incubator/roller/trunk/contrib/plugins/src/org/roller/presentation/velocity/plugins/topictag/TopicTagPlugin.java
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/contrib/plugins/src/org/roller/presentation/velocity/plugins/topictag/TopicTagPlugin.java?rev=189695&view=auto
==============================================================================
--- incubator/roller/trunk/contrib/plugins/src/org/roller/presentation/velocity/plugins/topictag/TopicTagPlugin.java (added)
+++ incubator/roller/trunk/contrib/plugins/src/org/roller/presentation/velocity/plugins/topictag/TopicTagPlugin.java Wed Jun  8 20:18:46 2005
@@ -0,0 +1,461 @@
+/*
+ * Copyright (c) 2004
+ * Anil R. Gangolli. All rights reserved.
+ *
+ * Distributed with Roller Weblogger under the terms of the Roller license.
+ */
+
+package org.roller.presentation.velocity.plugins.topictag;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.velocity.context.Context;
+import org.roller.RollerException;
+import org.roller.config.RollerConfig;
+import org.roller.model.BookmarkManager;
+import org.roller.model.RollerFactory;
+import org.roller.pojos.BookmarkData;
+import org.roller.pojos.WeblogEntryData;
+import org.roller.pojos.WebsiteData;
+import org.roller.presentation.RollerRequest;
+import org.roller.presentation.velocity.PagePlugin;
+
+import java.io.UnsupportedEncodingException;
+import java.net.URLEncoder;
+import java.text.FieldPosition;
+import java.text.MessageFormat;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import java.util.regex.PatternSyntaxException;
+
+/**
+ * Provides an easy way to write topic tag links for Technorati (or similar services).
+ * <p/>
+ * Looks for occurrences of topic tag specifiers of the form
+ * <pre>
+ * <code>topic:{topicbookmark}[tag]</code>  OR    <code>topic:[tag]</code>
+ * </pre>
+ * and replaces them with a topic tag link of the form:
+ * <pre>
+ * <code>&lt;a rel="tag" href="site/tag"&gt;tag&lt;/a&gt;</code>
+ * </pre>
+ * <p/>
+ * More information on topic tag links can be found at <a href="http://www.technorati.com">Technorati</a>.
+ * <p/>
+ * <p/>
+ * In the first form, the <code>topicbookmark</code> is used as the name of a bookmark, and the URL from that bookmark
+ * entry is used as the <code>site</code> portion in the <code>href</code> of the link.
+ * <p/>
+ * All folders are searched to find a bookmark with the name specified by <code>topicbookmark</code>. A name must match
+ * exactly, ignoring case.  The first matching bookmark is used, and folders may be searched in any order.  The
+ * bookmark's URL value can end in a "/" or not; either will work.
+ * <p/>
+ * The second form is equivalent to using the string "Default Topic Site" as the value of <code>topicbookmark</code>.
+ * <p/>
+ * If the bookmark lookup fails, then "http://www.technorati.com/tag" is used as the site name in the topic tag link.
+ * <p/>
+ * You can specify some Roller site-wide properties in the roller.properties or roller-custom.properties to override
+ * some of the defaults of this plugin. All of these are optional.
+ * <p/>
+ * <dl> <dt><code>org.roller.presentation.velocity.plugins.topictag.TopicTagPlugin.defaultTopicBookmarkName</code></dt>
+ * <dd>Specify the name of the default topic bookmark instead of "Default Topic Site"</dd>
+ * <p/>
+ * <dt><code>org.roller.presentation.velocity.plugins.topictag.TopicTagPlugin.defaultTopicSite</code></dt> <dd>Specify
+ * the default site name to be used instead of "http://www.technorati.com" for the case in which all of the lookups
+ * fail.</dd>
+ * <p/>
+ * <dt><code>org.roller.presentation.velocity.plugins.topictag.TopicTagPlugin.tagPatternWithBookmark</code></dt> <dd>Can
+ * be used to redefine the regular expression used to find a long-form topic tag specifiers in the input.  This pattern
+ * corresponds to the "long form" and must have two matching groups.  Group 1 must correspond to the bookmark name.
+ * Group 2 must correspond to the tag.</dd>
+ * <p/>
+ * <dt><code>org.roller.presentation.velocity.plugins.topictag.TopicTagPlugin.tagPatternDefaultBookmark</code></dt>
+ * <dd>Can be used to redefine the regular expression used to find short-form topic tag specifiers in the input. This
+ * pattern must have one matching group, which corresponds to the tag.</dd>
+ * <p/>
+ * <dt><code>org.roller.presentation.velocity.plugins.topictag.TopicTagPlugin.linkFormatString</code></dt> <dd>Can be
+ * used to redefine the format of the generated link.  This string is a message format string with three positional
+ * parameters.  Parameter <code>{0}</code> represents the site including a trailing "/",  parameter <code>{1}</code>
+ * represents the url-encoded tag and parameter <code>{2}</code> represents the original unencoded tag text.</dd>
+ * <p/>
+ * </dl>
+ *
+ * @author <a href="mailto:anil@busybuddha.org">Anil Gangolli</a>
+ * @version 0.3
+ */
+public class TopicTagPlugin implements PagePlugin
+{
+    private static final String version = "0.3";
+    private static final Log mLogger = LogFactory.getFactory().getInstance(TopicTagPlugin.class);
+
+
+    // Default values of properties that can be set from the web.xml configuration.
+    private String defaultTopicBookmarkName = "Default Topic Site";
+    private String defaultTopicSite = "http://www.technorati.com/tag";
+    private String tagRegexWithBookmark = "topic:\\{(.*?)\\}\\[(.*?)\\]";
+    private String tagRegexWithoutBookmark = "topic:\\[(.*?)\\]";
+    private String linkFormatString = "<a rel=\"tag\" href=\"{0}{1}\">{2}</a>";
+
+    // Compiled form of the regular expressions above.  Compiled during the init()
+    private Pattern tagPatternWithBookmark;
+    private Pattern tagPatternWithoutBookmark;
+    private MessageFormat linkFormat;
+
+    // A map of the user's bookmarks (values of type BookmarkData) keyed by name (String).   If the user has multiple
+    // bookmarks with the same name in different folders, only one gets used (the last encountered).
+    private Map userBookmarks;
+
+
+    public TopicTagPlugin()
+    {
+    }
+
+    /**
+     * Initialize the plugin instance.   This sets up the configurable properties and default topic site.
+     *
+     * @param rreq Plugins may need to access RollerRequest.
+     * @param ctx  Plugins may place objects into the Velocity Context.
+     * @see PagePlugin#init(org.roller.presentation.RollerRequest, org.apache.velocity.context.Context)
+     */
+    public void init(RollerRequest rreq, Context ctx) throws RollerException
+    {
+        if (mLogger.isDebugEnabled())
+        {
+            mLogger.debug("TopicTagPlugin v. " + version);
+        }
+
+
+        // Initialize property settings
+        initializeProperties();
+
+        // Build map of the user's bookmarks
+        userBookmarks = buildBookmarkMap(rreq.getWebsite());
+
+        // Determine default topic site from bookmark if present
+        BookmarkData defaultTopicBookmark = (BookmarkData) userBookmarks.get(defaultTopicBookmarkName);
+        if (defaultTopicBookmark != null) defaultTopicSite = defaultTopicBookmark.getUrl();
+
+        // Append / to defaultTopicSite if it doesn't have it
+        if (!defaultTopicSite.endsWith("/"))
+        {
+            defaultTopicSite += "/";
+        }
+
+        // Compile patterns and make sure they have the correct number of matching groups in them.
+        try
+        {
+            tagPatternWithBookmark = Pattern.compile(tagRegexWithBookmark);
+        }
+        catch (PatternSyntaxException e)
+        {
+            throw new RollerException("Invalid regular expression for topic tags with bookmark '" +
+                tagRegexWithBookmark + "': " + e.getMessage());
+        }
+        int groupCount = tagPatternWithBookmark.matcher("").groupCount();
+        if (groupCount != 2)
+        {
+            throw new RollerException("Regular expression for topic tags with bookmark '" + tagRegexWithBookmark +
+                "' contains wrong number of capture groups.  Must have exactly 2.  Contains " + groupCount);
+        }
+
+        try
+        {
+            tagPatternWithoutBookmark = Pattern.compile(tagRegexWithoutBookmark);
+        }
+        catch (PatternSyntaxException e)
+        {
+            throw new RollerException("Invalid regular expression for topic tags without bookmark '" +
+                tagRegexWithoutBookmark + "': " + e.getMessage());
+        }
+        groupCount = tagPatternWithoutBookmark.matcher("").groupCount();
+        if (groupCount != 1)
+        {
+            throw new RollerException("Regular expression for topic tags without bookmark '" + tagRegexWithoutBookmark +
+                "' contains wrong number of capture groups.  Must have exactly 1.  Contains " + groupCount);
+        }
+
+        // Create link format from format string
+        setLinkFormat(new MessageFormat(linkFormatString));
+    }
+
+    /**
+     * Apply the plugin to the given entry.  Returns the entry text with topic tags expanded.
+     *
+     * @param entry           WeblogEntry to which plugin should be applied.
+     * @param skipFlagIgnored the "skip flag" is ignored for this plugin
+     * @return Results of applying plugin to entry.
+     */
+    public String render(WeblogEntryData entry, boolean skipFlagIgnored)
+    {
+        String entryText = entry.getText();
+        StringBuffer result = new StringBuffer(entryText.length());
+        MessageFormat fmt = getLinkFormat();
+
+        // Replace all of the instances matching the pattern with bookmark specified.
+        Matcher m = tagPatternWithBookmark.matcher(entryText);
+        while (m.find())
+        {
+            String bookmark = m.group(1);
+            String tag = m.group(2);
+            String site = getBookmarkSite(bookmark);
+            if (site == null)
+            {
+                site = getDefaultTopicSite();
+            }
+            if (!site.endsWith("/"))
+            {
+                site += "/";
+            }
+            String link = generateLink(fmt, site, tag);
+            m.appendReplacement(result, link);
+        }
+        m.appendTail(result);
+
+        // Now, in a second phase replace all of the instances matching the pattern without bookmark specified.
+        entryText = result.toString();
+        result = new StringBuffer(entryText.length());
+        m = tagPatternWithoutBookmark.matcher(entryText);
+        while (m.find())
+        {
+            String tag = m.group(1);
+            String site = getDefaultTopicSite();
+            String link = generateLink(fmt, site, tag);
+            m.appendReplacement(result, link);
+        }
+        m.appendTail(result);
+
+        return result.toString();
+    }
+
+    /**
+     * Render from a string without entry data context. Because we require the context of the website in order to do the
+     * bookmark searches.  This implementation can only return the input string.
+     *
+     * @param str String to which plugin should be applied.
+     * @return the input value.
+     * @see PagePlugin#render(String)
+     */
+    public String render(String str)
+    {
+        return str;
+    }
+
+    /**
+     * Returns the human-friendly name of this Plugin. This is what users will see.
+     *
+     * @return The human-friendly name of this Plugin.
+     */
+    public String getName()
+    {
+        // TODO: i18n
+        return "Topic Tags";
+    }
+
+    /**
+     * Briefly describes the function of the Plugin. May contain HTML.
+     *
+     * @return A brief description of the Plugin.
+     */
+    public String getDescription()
+    {
+        // TODO: i18n
+        return "Expands topic tags for <a href=\\'http://www.technorati.com\\'>Technorati</a> and similar sites. " +
+            "Topic tags are of the form <code>topic:{topicbookmark}[tag]</code>, where <code>topicbookmark</code> " +
+            "is the name of a bookmark whose URL will be used for the site name in the topic tag. " +
+            "If <code>{topicbookmark}</code> is omitted the plugin will use the URL of the <code>Default Topic Site</code> " +
+            "bookmark, if that is defined, otherwise http://www.technorati.com.";
+    }
+
+    /**
+     * Helper to generate the link from the link format and values of the site and tag.
+     *
+     * @param fmt  link format.  This should have positional parameters {0} representing site with terminal /,  {1} for
+     *             url-encoded-tag, and {2} for visible tag text.
+     * @param site base portion of the URL
+     * @param tag  tag value
+     * @return the generated link as a string
+     */
+    protected String generateLink(MessageFormat fmt, String site, String tag)
+    {
+        // Allocate initial capacity of buffer of approximately the right length.
+        StringBuffer sb = new StringBuffer(site.length() + tag.length() + getLinkFormatString().length());
+        fmt.format(new Object[]{site, urlEncode(tag), tag}, sb, new FieldPosition(0));
+        return sb.toString();
+    }
+
+    /**
+     * Resolve the bookmark name and return the URL from it.  If the bookmark can't be found, return null
+     *
+     * @param bookmarkName name of the bookmark
+     * @return String form of the URL from the bookmark by that name from any of the user's folders, or null if not
+     *         found.
+     */
+    protected String getBookmarkSite(String bookmarkName)
+    {
+        BookmarkData bookmark = (BookmarkData) getUserBookmarks().get(bookmarkName);
+        return bookmark == null ? null : bookmark.getUrl();
+    }
+
+
+    /**
+     * Build the bookmark map.
+     *
+     * @return map of the user's bookmarks (type BookmarkData), keyed by name (type String).
+     */
+    protected Map buildBookmarkMap(WebsiteData website) throws RollerException
+    {
+        Map bookmarkMap = new HashMap();
+        if (website == null)
+        {
+            mLogger.debug("Init called without website.  Skipping bookmark initialization.");
+        }
+        else
+        {
+            BookmarkManager bMgr = RollerFactory.getRoller().getBookmarkManager();
+            List bookmarks = bMgr.retrieveBookmarks(bMgr.getRootFolder(website), true);
+
+            for (Iterator i = bookmarks.iterator(); i.hasNext();)
+            {
+                BookmarkData b = (BookmarkData) i.next();
+                bookmarkMap.put(b.getName(), b);
+            }
+        }
+        return bookmarkMap;
+    }
+
+
+    // Sets up properties.  For better and worse, doesn't use reflection
+    private void initializeProperties()
+    {
+        setDefaultTopicBookmarkName(getSetting("defaultTopicBookmarkName", getDefaultTopicBookmarkName()));
+        setDefaultTopicSite(getSetting("defaultTopicSite", getDefaultTopicSite()));
+        setTagRegexWithBookmark(getSetting("tagRegexWithBookmark", getTagRegexWithBookmark()));
+        setTagRegexWithoutBookmark(getSetting("tagRegexWithoutBookmark", getTagRegexWithoutBookmark()));
+        setLinkFormatString(getSetting("linkFormatString", getLinkFormatString()));
+    }
+
+    private static final String thisClassnameDot = TopicTagPlugin.class.getName() + ".";
+
+    private String getSetting(String propName, String defaultValue)
+    {
+        String fullPropName = thisClassnameDot + propName;
+        String val = (String) RollerConfig.getProperty(fullPropName);
+        return (val != null) ? val : defaultValue;
+    }
+
+
+    // Private helper to URL encode the tag text.
+    private String urlEncode(String text)
+    {
+        // URL encode the searchtext
+        try
+        {
+            return URLEncoder.encode(text, "UTF-8");
+        }
+        catch (UnsupportedEncodingException uex)
+        {
+            // Should never actually occur for UTF-8.  If it does, we barf bitterly.
+            throw new RuntimeException(uex);
+        }
+    }
+
+
+    // Property getters and setters
+
+
+    public String getDefaultTopicSite()
+    {
+        return defaultTopicSite;
+    }
+
+    public void setDefaultTopicSite(String defaultTopicSite)
+    {
+        this.defaultTopicSite = defaultTopicSite;
+    }
+
+    public String getTagRegexWithBookmark()
+    {
+        return tagRegexWithBookmark;
+    }
+
+    public void setTagRegexWithBookmark(String tagRegexWithBookmark)
+    {
+        this.tagRegexWithBookmark = tagRegexWithBookmark;
+    }
+
+    public String getTagRegexWithoutBookmark()
+    {
+        return tagRegexWithoutBookmark;
+    }
+
+    public void setTagRegexWithoutBookmark(String tagRegexWithoutBookmark)
+    {
+        this.tagRegexWithoutBookmark = tagRegexWithoutBookmark;
+    }
+
+    public String getLinkFormatString()
+    {
+        return linkFormatString;
+    }
+
+    public void setLinkFormatString(String linkFormatString)
+    {
+        this.linkFormatString = linkFormatString;
+    }
+
+    public MessageFormat getLinkFormat()
+    {
+        return linkFormat;
+    }
+
+    public void setLinkFormat(MessageFormat linkFormat)
+    {
+        this.linkFormat = linkFormat;
+    }
+
+    public Pattern getTagPatternWithBookmark()
+    {
+        return tagPatternWithBookmark;
+    }
+
+    public void setTagPatternWithBookmark(Pattern tagPatternWithBookmark)
+    {
+        this.tagPatternWithBookmark = tagPatternWithBookmark;
+    }
+
+    public Pattern getTagPatternWithoutBookmark()
+    {
+        return tagPatternWithoutBookmark;
+    }
+
+    public void setTagPatternWithoutBookmark(Pattern tagPatternWithoutBookmark)
+    {
+        this.tagPatternWithoutBookmark = tagPatternWithoutBookmark;
+    }
+
+    public String getDefaultTopicBookmarkName()
+    {
+        return defaultTopicBookmarkName;
+    }
+
+    public void setDefaultTopicBookmarkName(String defaultTopicBookmarkName)
+    {
+        this.defaultTopicBookmarkName = defaultTopicBookmarkName;
+    }
+
+    public Map getUserBookmarks()
+    {
+        return userBookmarks;
+    }
+
+    public void setUserBookmarks(Map userBookmarks)
+    {
+        this.userBookmarks = userBookmarks;
+    }
+
+
+}

Added: incubator/roller/trunk/custom/README.txt
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/custom/README.txt?rev=189695&view=auto
==============================================================================
--- incubator/roller/trunk/custom/README.txt (added)
+++ incubator/roller/trunk/custom/README.txt Wed Jun  8 20:18:46 2005
@@ -0,0 +1,19 @@
+
+README.txt for roller/custom directory
+
+Define filesets, paths, and src elements in the files to add code to the Roller build:
+
+   custom-src-forms.xmlf - (fileset) classes to be included in Struts form generation
+   custom-src-pojos.xmlf - (fileset)classes to be included in Hibernate mapping generation
+   custom-src-beans.xmlf - (src) classes to be included in rollerbeans.jar compilation
+   custom-src-web.xmlf -   (src) classes to be included in rollerweb.jar compilation
+   custom-web.xmlf -       (fileset) file to be copied into Roller's web context
+   custom-dbscripts.xmlf - (path) SQL files to be added in
+   custom-jars.xmlf -      (fileset) jars to add to base classpath and to build
+
+Define tasks be be executed during build process:
+
+   custom-post-dbtest.xmlf - (tasks) to be run after DB startup in test-hibernate
+   custom-pre-dbtest.xmlf -  (tasks) to be run just before DB shutdown in test-hibernate
+
+

Added: incubator/roller/trunk/custom/custom-ant.xmlf
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/custom/custom-ant.xmlf?rev=189695&view=auto
==============================================================================
--- incubator/roller/trunk/custom/custom-ant.xmlf (added)
+++ incubator/roller/trunk/custom/custom-ant.xmlf Wed Jun  8 20:18:46 2005
@@ -0,0 +1,79 @@
+
+<!-- Additional Ant tasks to include in build script -->
+
+    <!-- Netbeans debug single file 
+    <target name="debug-selected-files" if="netbeans.home" depends="build-test" 
+       description="Debug a Single File">
+       <fail unless="classname">Must set property 'classname'</fail>
+       <nbjpdastart name="${classname}" addressproperty="jpda.address" transport="dt_socket">
+          <classpath>
+            <path refid="junit.path"/>
+          </classpath>
+       </nbjpdastart>
+       <java classname="${classname}" fork="true" dir="${build.tests}">
+          <jvmarg value="-Xdebug"/>
+          <jvmarg value="-Xnoagent"/>
+          <jvmarg value="-Djava.compiler=none"/>
+          <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
+          <classpath>
+              <path refid="junit.path"/>
+          </classpath>
+       </java>
+    </target>
+    --> 
+
+    <!-- Netbeans debug.single target 
+    <target name="test-selected-files" if="netbeans.home" depends="build-test" 
+       description="Test/debug a Single File">
+       <fail unless="classname">Must set property 'classname'</fail>
+       <nbjpdastart name="junit.textui.TestRunner" addressproperty="jpda.address" transport="dt_socket">
+          <classpath>
+            <path refid="junit.path"/>
+          </classpath>
+       </nbjpdastart>
+       <java classname="junit.textui.TestRunner" fork="true" dir="${build.tests}">
+          <arg value="${classname}" />
+          <jvmarg value="-Xdebug"/>
+          <jvmarg value="-Xnoagent"/>
+          <jvmarg value="-Djava.compiler=none"/>
+          <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
+          <classpath>
+              <path refid="junit.path"/>
+          </classpath>
+       </java>
+    </target>
+    -->
+
+    <!-- Extend the init-hsqldb target to include custom tables
+    <target name="init-hsqldb-ex" depends="init-hsqldb" >
+        <sql driver="org.hsqldb.jdbcDriver"
+             url="jdbc:hsqldb:hsql://localhost:3219"
+             userid="sa" password=""  onerror="continue"
+             src="./build/roller/WEB-INF/dbscripts/hsql/droptables-planet.sql"
+             classpath="${ro.tools}/buildtime/hsqldb.jar" />    
+        <sql driver="org.hsqldb.jdbcDriver"
+             url="jdbc:hsqldb:hsql://localhost:3219"
+             userid="sa" password=""
+             src="./build/roller/WEB-INF/dbscripts/hsql/createdb-planet.sql"
+             classpath="${ro.tools}/buildtime/hsqldb.jar" />    
+    </target>
+    -->
+    
+<!--
+  <target name="deploy" depends="compile" description="Deploy application to servlet container">
+     <deploy url="${manager.url}"
+	     username="${manager.username}"
+	     password="${manager.password}"
+		 path="${app.path}"
+	     localWar="file://${build.home}"/>
+  </target>
+
+    <target name="debug" depends="compile, deploy" if="netbeans.home" description="Debug Project">
+       <nbjpdaconnect name="${app.name}" host="${jpda.host}" address="${jpda.address}" transport="dt_socket">
+	  <classpath refid="${run.classpath}"/>
+	  <sourcepath refid="${debug.sourcepath}"/>
+       </nbjpdaconnect>
+       <nbbrowse url="${client.url}"/>
+    </target>
+-->
+

Added: incubator/roller/trunk/custom/custom-dbscripts.xmlf
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/custom/custom-dbscripts.xmlf?rev=189695&view=auto
==============================================================================
--- incubator/roller/trunk/custom/custom-dbscripts.xmlf (added)
+++ incubator/roller/trunk/custom/custom-dbscripts.xmlf Wed Jun  8 20:18:46 2005
@@ -0,0 +1,8 @@
+
+<!-- Include SQL files in dbscript substitution
+   <fileset dir="./sandbox/planetroller/metadata/database">     
+      <include name="createdb-planet-raw.sql" />
+      <include name="droptables-planet-raw.sql" />
+   </fileset>
+-->
+

Added: incubator/roller/trunk/custom/custom-gen-beans.xmlf
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/custom/custom-gen-beans.xmlf?rev=189695&view=auto
==============================================================================
--- incubator/roller/trunk/custom/custom-gen-beans.xmlf (added)
+++ incubator/roller/trunk/custom/custom-gen-beans.xmlf Wed Jun  8 20:18:46 2005
@@ -0,0 +1,8 @@
+
+<!--  Custom classes to include in Hibernate mapping file generation 
+<fileset dir="${basedir}/custom/src" includes="**/*Data.java" /> 
+
+<fileset dir="${basedir}/sandbox/planetroller/src" 
+    includes="**/*Data.java,**/*Assoc.java" />
+-->
+    
\ No newline at end of file

Added: incubator/roller/trunk/custom/custom-gen-web.xmlf
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/custom/custom-gen-web.xmlf?rev=189695&view=auto
==============================================================================
--- incubator/roller/trunk/custom/custom-gen-web.xmlf (added)
+++ incubator/roller/trunk/custom/custom-gen-web.xmlf Wed Jun  8 20:18:46 2005
@@ -0,0 +1,9 @@
+
+<!--  Custom classes to include in Struts and web generation 
+<fileset dir="${basedir}/custom/src" includes="**/*Data.java" />
+
+<fileset dir="${basedir}/sandbox/planetroller/src" includes="**/*Data.java" />
+<fileset dir="${basedir}/sandbox/planetroller/src" includes="**/*Action.java" />
+<fileset dir="${basedir}/sandbox/planetroller/src" includes="**/*FormEx.java" />
+<fileset dir="${basedir}/sandbox/planetroller/src" includes="**/*Servlet.java" />
+-->

Added: incubator/roller/trunk/custom/custom-jars.xmlf
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/custom/custom-jars.xmlf?rev=189695&view=auto
==============================================================================
--- incubator/roller/trunk/custom/custom-jars.xmlf (added)
+++ incubator/roller/trunk/custom/custom-jars.xmlf Wed Jun  8 20:18:46 2005
@@ -0,0 +1,6 @@
+
+<!-- Custom jars to be added to both rollerbeans and rollerweb compiles -->
+<!-- <fileset dir="${basedir}/custom/lib" includes="*.java" />
+
+<fileset dir="${basedir}/sandbox/planetroller/web/WEB-INF/lib" includes="*.jar" />
+-->

Added: incubator/roller/trunk/custom/custom-post-dbtest.xmlf
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/custom/custom-post-dbtest.xmlf?rev=189695&view=auto
==============================================================================
--- incubator/roller/trunk/custom/custom-post-dbtest.xmlf (added)
+++ incubator/roller/trunk/custom/custom-post-dbtest.xmlf Wed Jun  8 20:18:46 2005
@@ -0,0 +1,9 @@
+
+<!-- add post-test tasks to test-hibernate target of build.xml
+    <sql driver="org.hsqldb.jdbcDriver"
+         url="jdbc:hsqldb:hsql://localhost:3219"
+         userid="sa" password=""
+         src="./build/roller/WEB-INF/dbscripts/droptables-planet.sql"
+         classpath="${ro.tools}/buildtime/hsqldb.jar" />
+-->
+

Added: incubator/roller/trunk/custom/custom-pre-dbtest.xmlf
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/custom/custom-pre-dbtest.xmlf?rev=189695&view=auto
==============================================================================
--- incubator/roller/trunk/custom/custom-pre-dbtest.xmlf (added)
+++ incubator/roller/trunk/custom/custom-pre-dbtest.xmlf Wed Jun  8 20:18:46 2005
@@ -0,0 +1,9 @@
+
+<!-- add pre-test tasks to test-hibernate target of build.xml 
+    <sql driver="org.hsqldb.jdbcDriver"
+        url="jdbc:hsqldb:hsql://localhost:3219"
+        userid="sa" password=""
+        src="./build/roller/WEB-INF/dbscripts/hsql/createdb-planet.sql"
+        classpath="${ro.tools}/buildtime/hsqldb.jar" />
+-->
+        
\ No newline at end of file

Added: incubator/roller/trunk/custom/custom-src-beans.xmlf
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/custom/custom-src-beans.xmlf?rev=189695&view=auto
==============================================================================
--- incubator/roller/trunk/custom/custom-src-beans.xmlf (added)
+++ incubator/roller/trunk/custom/custom-src-beans.xmlf Wed Jun  8 20:18:46 2005
@@ -0,0 +1,6 @@
+
+<!-- Custom classes to include in back-end compilation (rollerbeans.jar)
+Your classes must not be under the package org.roller.presentation.
+<src path="${basedir}/sandbox/planetroller/src" />
+-->
+

Added: incubator/roller/trunk/custom/custom-src-tests.xmlf
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/custom/custom-src-tests.xmlf?rev=189695&view=auto
==============================================================================
--- incubator/roller/trunk/custom/custom-src-tests.xmlf (added)
+++ incubator/roller/trunk/custom/custom-src-tests.xmlf Wed Jun  8 20:18:46 2005
@@ -0,0 +1,4 @@
+
+<!--  Custom classes to be compiled as tests 
+<src path="${basedir}/sandbox/planetroller/test" />
+-->

Added: incubator/roller/trunk/custom/custom-src-web.xmlf
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/custom/custom-src-web.xmlf?rev=189695&view=auto
==============================================================================
--- incubator/roller/trunk/custom/custom-src-web.xmlf (added)
+++ incubator/roller/trunk/custom/custom-src-web.xmlf Wed Jun  8 20:18:46 2005
@@ -0,0 +1,8 @@
+
+<!-- Custom classes to include in front-end compilation
+ Your classes must be under the package org.roller.presentation.
+<src dir="${basedir}/sandbox/planetroller/src" />
+
+<src path="${basedir}/sandbox/planetroller/src" />
+-->
+

Added: incubator/roller/trunk/custom/custom-web.xmlf
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/custom/custom-web.xmlf?rev=189695&view=auto
==============================================================================
--- incubator/roller/trunk/custom/custom-web.xmlf (added)
+++ incubator/roller/trunk/custom/custom-web.xmlf Wed Jun  8 20:18:46 2005
@@ -0,0 +1,9 @@
+
+<!-- Copy custom files into the Roller web context
+<copy todir="${build.stage_web}" overwrite="true">
+   <fileset dir="${basedir}/sandbox/planetroller/web">
+      <include name="**/**" />
+   </fileset>
+</copy>
+-->
+

Added: incubator/roller/trunk/custom/src/dummy.txt
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/custom/src/dummy.txt?rev=189695&view=auto
==============================================================================
    (empty)

Added: incubator/roller/trunk/custom/web/dummy.txt
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/custom/web/dummy.txt?rev=189695&view=auto
==============================================================================
    (empty)

Added: incubator/roller/trunk/docs/README.txt
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/docs/README.txt?rev=189695&view=auto
==============================================================================
--- incubator/roller/trunk/docs/README.txt (added)
+++ incubator/roller/trunk/docs/README.txt Wed Jun  8 20:18:46 2005
@@ -0,0 +1,10 @@
+
+Roller documentation is currently maintained on the Roller Wiki
+http://rollerweblogger.org/wiki
+
+Roller Installation Guide:
+http://rollerweblogger.org/wiki/Wiki.jsp?page=InstallationGuide
+
+Roller User Guide: 
+http://rollerweblogger.org/wiki/Wiki.jsp?page=UserGuide
+

Added: incubator/roller/trunk/docs/images/ant-logo.jpg
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/docs/images/ant-logo.jpg?rev=189695&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/docs/images/ant-logo.jpg
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/roller/trunk/docs/images/dots.jpg
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/docs/images/dots.jpg?rev=189695&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/docs/images/dots.jpg
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/roller/trunk/docs/images/hsql-logo.jpg
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/docs/images/hsql-logo.jpg?rev=189695&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/docs/images/hsql-logo.jpg
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/roller/trunk/docs/images/mysql-logo.jpg
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/docs/images/mysql-logo.jpg?rev=189695&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/docs/images/mysql-logo.jpg
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/roller/trunk/docs/images/netbeans-logo.jpg
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/docs/images/netbeans-logo.jpg?rev=189695&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/docs/images/netbeans-logo.jpg
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/roller/trunk/docs/images/onjava.gif
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/docs/images/onjava.gif?rev=189695&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/docs/images/onjava.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/roller/trunk/docs/images/rollerbadge.jpg
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/docs/images/rollerbadge.jpg?rev=189695&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/docs/images/rollerbadge.jpg
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/roller/trunk/docs/images/sm-blue-jaggies-spacer.jpg
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/docs/images/sm-blue-jaggies-spacer.jpg?rev=189695&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/docs/images/sm-blue-jaggies-spacer.jpg
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/roller/trunk/docs/images/sm-blue-jaggies.jpg
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/docs/images/sm-blue-jaggies.jpg?rev=189695&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/docs/images/sm-blue-jaggies.jpg
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/roller/trunk/docs/images/struts-power.gif
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/docs/images/struts-power.gif?rev=189695&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/docs/images/struts-power.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/roller/trunk/docs/images/tomcat-logo.jpg
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/docs/images/tomcat-logo.jpg?rev=189695&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/docs/images/tomcat-logo.jpg
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/roller/trunk/docs/images/velocity-logo.gif
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/docs/images/velocity-logo.gif?rev=189695&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/docs/images/velocity-logo.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/roller/trunk/docs/installguide/installguide.wiki
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/docs/installguide/installguide.wiki?rev=189695&view=auto
==============================================================================
--- incubator/roller/trunk/docs/installguide/installguide.wiki (added)
+++ incubator/roller/trunk/docs/installguide/installguide.wiki Wed Jun  8 20:18:46 2005
@@ -0,0 +1,350 @@
+!!!The Roller Weblogger Installation Guide v0.9.7
+See also: UserGuide
+
+Orignal text is ''Copyright © 2002 David M Johnson''
+
+* Introduction
+** STEP 1: Prerequisites[1]
+** STEP 2: Unpack the downloaded ZIP or TAR file[2]
+** STEP 3: Create Roller tables in your database[3]
+** STEP 4: Download and install JDBC driver[4]
+** STEP 5: Configure Roller's Servlet Context[5]
+** STEP 6: Configure Roller before start-up[6]
+** STEP 7: Start Tomcat and Roller[7]
+* Appendix A: Building and deploying Roller from Source[8]
+* Appendix B: Changes for deploying Roller on Resin[9]
+
+
+
+\\
+\\
+!!!Introduction
+
+This document describes how to install the [Roller Weblogger|http://www.rollerweblogger.org] on the Tomcat Servlet Engine and assumes the following configuration.
+
+* Java 1.4.X SDK
+* Tomcat 4.X.Y Servlet Container
+* A MySQL 3.2.X, Postgres, or HSQL database
+* Windows XP or Redhat 7.X Linux
+
+If you have more recent versions of the above software, don't worry, Roller will probably work fine. If you have older versions of the above software, you may have problems. Roller will not work on Tomcat 3.X or versions of Java prior to 1.4.0.  Older versions of Windows/Linux and MySQL may work fine for Roller.
+
+You should be able to make Roller work on any Servlet API 2.3 compatible Servlet Container (e.g. Resin, OrionServer, WebSphere, WebLogic, ...) and any JDBC-accessible database (e.g. Oracle, Informix, ...), but this document does not tell you how specifically to do that. 
+
+
+
+\\
+\\
+!!!Overview
+
+Here is an overview of the steps involved in a Roller installation:
+
+#[1]__Prerequisites__. Before you get to Roller, make sure your Java SDK, Tomcat, and MySQL are correcly installed on your system.
+#[2]__Unpack the downloaded ZIP or TAR file__. In this step, you unpack the ZIP or TAR file that downloaded into your Servlet Container's web application deployment directory.
+#[3]__Create Roller tables in your database__. In this step you use an SQL script to create within your database the tables required to run Roller.
+#[4]__Configure Roller's Servlet Context__. Edit the Tomcat configuration file to add a Servlet Context to do Servlet Authentication against the Roller database, and configure a connection pooling datasouce for access via JNDI.
+#[5]__Make JDBC driver available to Tomcat__. To support Servlet Authentication that you configured in step 4, you must place your JDBC driver jar(s) in Tomcat's common/lib directory.
+#[6]__Configure Roller before start-up__. Review the Roller configuration settings in Roller's web.xml before you start Roller.
+#[7]__Start your Servlet Container and your database__. Start your Servlet Container, open your web browser, browse to the Roller start page and start using Roller.
+
+
+
+\\
+\\
+!!!STEP 1: Prerequisites [#1]
+
+Before you install the Roller software you need to make sure you have installed your Java SDK, your Tomcat Servlet Engine, and your MySQL database installed and configured on your system.
+
+As part of the Tomcat install, you should have set an environment variable called CATALINA_HOME as show in the example below. I'm telling you this now because later, in other examples in this guide we will refer to the CATALINA_HOME variable. 
+
+    UNIX (csh) example
+
+    {{{
+    % setenv CATALINA_HOME /opt/jakarta-tomcat-4.1.24
+    }}}
+
+    Windows example, from an MS-DOS or Command Prompt window:
+    
+    {{{
+    C> set CATALINA_HOME d:\jakarta-tomcat-4.1.24
+    }}}
+
+
+
+
+\\
+\\
+!!!STEP 2: Unpack the downloaded ZIP or TAR file [#2]
+
+In this step, you unpack the ZIP or TAR file that downloaded into your Servlet Container's web application deployment directory. Tomcat's deployment directory is located in the webapps directory of the Tomcat install directory. 
+
+    UNIX example
+
+    {{{
+    % cp roller.tgz $CATALINA_HOME/webapps
+    % cd $CATALINA_HOME/webapps
+    % tar xzvf roller.tgz
+    }}}
+
+    On Windows: Use WinZIP to extract roller.zip into %CATALINA_HOME%\webapps
+
+__NOTE:__ Currenty, Roller cannot be installed as a WAR file because Roller needs to write to a file in the Roller web application directory (WEB-INF/roller-config.xml). At some point in the future this will be fixed.
+
+
+
+
+\\
+\\
+!!!STEP 3: Create Roller tables in your database [#3]
+
+Now you need to create a new database, create a user with appropriate privileges, and use an SQL script to create the database tables required to run Roller. To do this, login to your database and run one of the Roller database creation scripts located in Roller's WEB-INF directory:
+
+    createdb-mysql.sql - creates tables for MySQL
+    createdb-hsql.sql - creates tables for HSQL-DB
+    createdb-postgres.sql - creates tables for Postgres
+
+The examples below show you how you might do this using MySQL, assuming your Roller user will have username roller and password tiger. For more information on MySQL, refer to the MySQL Reference Manual.
+
+    UNIX example
+
+    {{{
+    % cd $CATALINA_HOME/webapps/roller/WEB-INF
+    % mysql -u root -p
+    password: *****
+    mysql> create database roller;
+    mysql> grant all on roller.* to roller identified by 'tiger';
+    mysql> use roller;
+    mysql> source createdb-mysql.sql
+    mysql> quit
+    }}}
+
+    Windows example, from an MS-DOS or Command Prompt window:
+
+    {{{
+    C> cd %CATALINA_HOME%\webapps\roller\WEB-INF
+    C> mysql -u root -p
+    password: *****
+    mysql> create database roller;
+    mysql> grant all on roller.* to roller identified by 'tiger';
+    mysql> use roller;
+    mysql> source createdb-mysql.sql
+    mysql> quit
+    }}}
+
+__NOTES:__
+
+If you are upgrading from Roller 0.9.6 you can upgrade your database using one of the 096-to-097-micrgration.sql scripts. This is a risky operation so you should backup your database before you run the migration script. 
+
+
+
+
+\\
+\\
+!!!STEP 4: Download and install JDBC driver [#4]
+
+To support Servlet Authentication that you configured in step 4, you must place your JDBC driver jar(s) in Tomcat's common/lib directory. You can find the MySQL JDBC driver, known as __Connector/J__, on the [Connector/J page of the MySQL web site|http://www.mysql.com/products/connector-j/index.html]. Download the connector, unzip the files, and copy the JDBC driver jar to the Tomcat common/lib directory.
+
+UNIX example: unzip and untar the MySQL Connector/J download into a directory, cd to that directory and then copy to Tomcat common/lib
+
+    {{{
+    % cp mysql-connector-java-3.0.7-stable-bin.jar $CATALINA_HOME/common/lib
+    }}}
+
+Windows example, from an MS-DOS or Command Prompt window: unzip the MySQL Connector/J download into a directory, cd to that directory and then copy to Tomcat common/lib
+
+    {{{
+    C> copy mysql-connector-java-3.0.7-stable-bin.jar %CATALINA_HOME%\common\lib
+    }}}
+
+NOTE: Due to a [known bug|http://www.rollerweblogger.org/page/roller/20030525#heads_up_mysql_connector_j] in Connector/J v3.0.7, you should probably use one of the [v3.0 nightly builds|http://mmmysql.sourceforge.net/snapshots/stable/] instead of v3.0.7 - soon Connector/J v3.0.8 will appear and it will fix this problem.
+
+
+
+
+\\
+\\
+!!!STEP 5: Configure Roller's Servlet Context [#5]
+
+Edit the Tomcat Servlet engine's conf/server.xml configuration file to add a the Roller Servlet Context. This is where you configure the Servlet Authentication to use the Roller database tables and where you configure the Roller datasource. Look for the section of the server.xml file where Contexts are defined and assuming that you are using MySQL you should add the following. Make sure you replace roller/tiger with your MySQL username and password.
+
+{{{
+<Context path="/roller" docBase="roller" debug="0">
+
+<Realm className="org.apache.catalina.realm.JDBCRealm"      
+    driverName="com.mysql.jdbc.Driver" 
+    connectionURL=
+    "jdbc:mysql://mysql.kattare.com/roller?user=roller&amp;password=tiger&amp;autoReconnect=true" 
+    userTable="rolleruser" 
+    userNameCol="username" 
+    userCredCol="password" 
+    userRoleTable="role" 
+    roleNameCol="role" debug="0" />
+
+<Resource name="jdbc/rollerdb" auth="Container" type="javax.sql.DataSource" />
+
+<ResourceParams name="jdbc/rollerdb">
+    <parameter>
+       <name>factory</name>
+       <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+    </parameter>
+    <parameter>
+       <name>driverClassName</name>
+       <value>com.mysql.jdbc.Driver</value>
+    </parameter>
+    <parameter>        
+       <name>url</name>
+       <value>jdbc:mysql://mysql.kattare.com/roller?user=roller&amp;password=tiger&amp;autoReconnect=true</value>
+    </parameter>
+    <parameter><name>maxActive</name>    <value>100</value></parameter>
+    <parameter><name>maxIdle</name>      <value>1000</value></parameter>
+    <parameter><name>maxWait</name>      <value>100</value></parameter>
+    <parameter><name>logAbandoned</name> <value>true</value></parameter>
+</ResourceParams>
+
+</Context>
+}}}
+
+__NOTES:__
+
+* The first part of the __<Context>__ configuration above sets up an Authentication __<Realm>__ for Tomcat. This allows Tomcat to check a user's login credentials (username and password) against a table in the Roller database. Here, we configure Tomcat to use the __rolleruser__ and __role__ tables in the Roller database. For more information on configuring this see the Tomcat docs for [JDBC Realm|http://jakarta.apache.org/tomcat/tomcat-4.1-doc/realm-howto.html#JDBCRealm].
+
+* The second part of the __<Context>__ configuration sets up the Roller DataSource as a __<Resource>__. Here you'll have to repeat some of the connection parameters that you entered in the __<Realm>__ setup.
+
+* The '&' character is used to identify entity references in XML, so you'll have to change the '&user=roller&password=password' to '&amp;amp;user=roller&amp;amp;password=password' in the connectionURL to avoid parsing exceptions while starting Tomcat.
+
+* If you are not using MySQL or if you are using the newer MySQL Connector/J JDBC driver, then you will have to substitute the appropriate JDBC connection parameters (driver class name and connection URL) for your database.
+
+* For more information on Tomcat's server.xml configuration file, refer to the [Tomcat Configuration Reference|http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/index.html].
+
+
+
+
+\\
+\\
+!!!STEP 6: Configure Roller before start-up [#6]
+
+!!Specify the Administrative user
+
+Before you start Roller, you need to specify the username of the user (or users) who will be the adminstrator of the Roller site. This adminstrator will be the only one who can access the Admin and Config pages in the Roller Editor UI. 
+
+Do this by editing the file roller/WEB-INF/roller-config.xml, an XML file. Look for the lines shown below and when you have found then, carefully change the string adminUser to the name of the username that you will use as your Roller administrator, or to a comma-sepatared list of users who will be your Roller administrators.
+
+    {{{
+    <adminUsers>
+        <adminUsers>adminUser</adminUsers>
+    </adminUsers>
+    }}}
+
+When you first start Roller, before doing anything else, create a new user with the name that you specified as the admin user.
+
+!!Tune the Page Cache settings
+
+Roller uses a technique called page caching to improve performance, reduce CPU usage, and reduce calls to the database. Page caching is implemented using an open source Java produce called OsCache. You can configure OsCache by editing the file roller/WEB-INF/classes/oscache.properties. For information on the settings in this file, please refer to the [OsCache website|http://www.opensymphony.com/oscache/]. The properties file that is included in Roller configures OsCache for memory caching with a maximum of 100 entries. If you have a high volume site, you may need to tune these settings, otherwise the defaults should be fine.
+
+If you'd like to use the Gzip filter and you are running Tomcat, you will need to use the alternate cache, CommonsPageCache.  You can make this change by uncommenting the "handler" init-parameters for PageCache in the web.xml file (change the /metadata/xdoclet/web-settings.xml if you are compiling for yourself).  Then you can uncomment the Gzip filters in web.xml (or in /metadata/xdoclet/filter-mappings.xml).  If you are using Resin, see [Appendix B|9].
+
+!!Set up the Logging Options
+
+Roller uses the open source Java Log4J logging package for logging. By default, Roller will place it's log file (roller.log) in the directory from which you started Roller, this file will not grow larger than 1MB in size, and when it does Log4J will start a new log file. Log4J will save the most recent two log files and delete older ones. You can configure all of these things by editing the Log4J configuration file at roller/WEB-INF/classes/log4j.properties.
+
+For example, if you want to place the Roller log file in the /var/logs directory, you would edit the  log4j.properties file and set the following property:
+
+   {{{
+   log4j.appender.R.File=/var/logs/roller.log
+   }}}
+
+
+
+
+\\
+\\
+!!!STEP 7: Start Tomcat and Roller [#7]
+
+Start your Servlet Container, open your web browser, browse to the Roller start page and start using Roller. If you are installing Roller on Tomcat then your Roller start page URL is probably [http://localhost:8080/roller].
+
+    UNIX example:
+
+    {{{
+    % cd $CATALINA_HOME/bin
+    % ./startup.sh}}}
+
+    Windows example, from an MS-DOS or Command Prompt window:
+
+    {{{
+    C> cd %CATALINA_HOME%\bin
+    C> startup
+    }}}
+
+You are done! Roller should be working perfectly now. If not, then please join consult with the experts on the [roller-user mailing list|http://sourceforge.net/mail/?group_id=47722]. Somebody has probably encountered the very same problems that you are encountering.
+
+
+
+
+\\
+\\
+!!!Appendix A: Building and deploying Roller from source [#8]
+
+Build and deploying Roller from source involves three simple steps: get the source, run the build script, follow the installation instructions above to deploy the results.
+
+!! Get the Roller source code
+
+If you want to build a stable released version of Roller then download the source files from SourceForge, both the source file and the tools file. The source file contains the source code for Roller. The tools file contains all of the 3rd party jars that are needed to build Roller. 
+
+On the other hand, if you want to build the latest, greatest, bleeding-edge, and possibly unstable version of Roller then get the sources from the SourceForge CVS repository. Refer to Roller's [SourceForge CVS page|http://sourceforge.net/cvs/?group_id=47722] for further instructions.
+
+!! Do a build 
+
+Once you have extracted the Roller source code into a directory on your system, then open up a command prompt and __cd__ to that directory. Build Roller by using either the UNIX or Windows version of the build script. This script sets up the right classpath and calls Roller's Ant build script __build.xml__.
+
+   On UNIX:
+
+   {{{
+   % build.sh all
+   }}}
+
+   On Windows:
+   {{{
+   C> build all
+   }}}
+
+This will build Roller and will stage the Roller web application into the __build/roller__ subdirectory.
+
+!! Deploy
+
+You can simply copy the build/roller to your tomcat/webapps directory and follow the installation instructions above (steps 3 through 7) to complete your deployment.
+
+If you have problems making a build then please join consult with the experts on the [roller-dev mailing list|http://sourceforge.net/mail/?group_id=47722]. Somebody has probably encountered the very same problems that you are encountering.
+
+
+
+
+\\
+\\
+!!! Appendix B: Deploying Roller on Resin [#9]
+
+!! resin.conf and roller.conf
+If you are already familiar with Resin's configuration files, you will know that you can split the configuration among more than one file.  Copy the example config file found at /personal/roller.conf into your ${resin.base}/conf directory, and add the following line in resin.conf's <host> declaration:
+
+    <resin:include href='roller.conf'/>
+
+__Note:__ Unless you're really a wiz with resin's configuration file, you'll definintely want to check the source out of CVS and include the aforementioned /person/roller.conf.
+
+Modify the roller.conf file, setting the correct <app-dir> and <resource-ref> values.
+
+!! Resin and Roller and Gzip Compression
+An issue was found with Tomcat and the CompressionFilter used in Roller, so the Filter was commented out as the default.  If you are using Resin, you can uncomment the filter-mappings for the CompressionFilter.  If you are recompiling Roller, look in /metadata/xdoclet/filter-mappings.xml.  If you want to modify the precompiled Roller, edit the /WEB-INF/web.xml directly.
+
+!! What version of Resin are you using?
+
+!Versions of Resin before 2.1.9 
+Versions of Resin before 2.1.9  have a problem with ServletFilters and the HttpServletResponseWrapper.  To get around this issue, you will need to recompile Roller after making a couple changes to the build.xml file.
+* Uncomment the "resinServer" property.
+* Uncomment the line that declares the "resin.path" property.
+* Inside the path declaration for base.path, uncomment the fileset for Resin, and correct the "dir" property as necessary (use relative pathing such as you see in the default setting).
+This will automatically perform all changes necessary to support Resin 2.1.8 and earlier.
+
+! Using Resin 2.1.9 (and later?)
+Because Resin 2.1.9 (and later) doesn't require the drastic changes above, the installation will miss one key strategic point: You will need to copy all XML related jars from Resin's /tools/lib directory, namely xercesImpl-2.3.0.jar and xmlParser-2.3.0.jar.  Or just uncomment the "resinServer" property and run the stage-web Ant task.
+
+! One last thing
+The latest version of Resin (2.1.9 as of this writing) has a conflict with the usage of the Jakarta Standard JSTL library.  Dave and Lance are currently in the process of straightening this out...  For now you will need to remove or comment the line <%@ taglib uri="core-stl"        prefix="c"%> from /theme/header.jsp.  __Update:__ Build 2.1.snap, as of May 5 2003, corrects this problem so you won't need to worry if you are using a version of Resin built after May 5 2003.