Index: /quintagroup.quills.extras/trunk/quintagroup/quills/extras/__init__.py
===================================================================
--- /quintagroup.quills.extras/trunk/quintagroup/quills/extras/__init__.py	(revision 641)
+++ /quintagroup.quills.extras/trunk/quintagroup/quills/extras/__init__.py	(revision 642)
@@ -1,2 +1,4 @@
 import weblogfolder_patch, keywords_widget_patch
+from zope.i18nmessageid import MessageFactory
+quintagroupQuillsMessageFactory = MessageFactory('quintagroup.quills.extras')
 
Index: intagroup.quills.extras/trunk/quintagroup/quills/extras/browser/categories.pt
===================================================================
--- /quintagroup.quills.extras/trunk/quintagroup/quills/extras/browser/categories.pt	(revision 641)
+++ 	(revision )
@@ -1,28 +1,0 @@
-<dl class="portlet portletWeblogCategories"
-    i18n:domain="quills.app">
-
-    <dt class="portletHeader">
-        <span class="portletTopLeft"></span>
-        <span class="tile"
-              tal:content="view/title">_title_</span>
-        <span class="portletTopRight"></span>
-    </dt>
-
-    <tal:loop repeat="cat view/getCategories">
-    <dd class="portletItem odd"
-	tal:attributes="class python:repeat['cat'].even() and 'portletItem even' or 'portletItem odd'">
-       <a title="Category" href="http://"
-          tal:content="cat/title|default"
-          tal:attributes="title cat/title;
-                          href cat/url">
-          Blog Category
-        </a>
-    </dd>
-    </tal:loop>
-
-    <dd class="portletFooter">
-        <span class="portletBottomLeft"></span>
-        <span class="portletBottomRight"></span>
-    </dd>
-
-</dl>
Index: intagroup.quills.extras/trunk/quintagroup/quills/extras/browser/categories.py
===================================================================
--- /quintagroup.quills.extras/trunk/quintagroup/quills/extras/browser/categories.py	(revision 641)
+++ 	(revision )
@@ -1,81 +1,0 @@
-# Zope imports
-from zope.formlib import form
-from zope.interface import implements
-from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile
-
-# CMF imports
-from Products.CMFCore.utils import getToolByName
-
-# Plone imports
-from plone.app.portlets.portlets import base
-from plone.app.portlets.browser.formhelper import NullAddForm
-from plone.memoize.instance import memoize
-from plone.portlets.interfaces import IPortletDataProvider
-
-# Quills imports
-from quills.app import QuillsAppMessageFactory as _
-
-# Local imports
-from quills.app.portlets.base import BasePortletRenderer
-
-
-PORTLET_TITLE = _(u"Weblog Categories")
-PORTLET_DESC = _(u"This portlet provides list of weblog categories.")
-
-
-class IWeblogCategoriesPortlet(IPortletDataProvider):
-    """A weblog administration portlet.
-    """
-
-
-class Assignment(base.Assignment):
-    implements(IWeblogCategoriesPortlet)
-
-    @property
-    def title(self):
-        return PORTLET_TITLE
-
-
-class Renderer(BasePortletRenderer, base.Renderer):
-
-    _template = ViewPageTemplateFile('categories.pt')
-
-    @property
-    def available(self):
-        return 1 or self.getCategories() and True or False
-
-    @property
-    def title(self):
-        return PORTLET_TITLE
-
-    @memoize
-    def getCategories(self):
-        cats = []
-        weblog = self.getWeblogContentObject()
-        #import pdb;pdb.set_trace()
-        if weblog:
-            catalog = getToolByName(self.context, 'portal_catalog')
-            bcats = catalog(
-                path='/'.join(weblog.getPhysicalPath()),
-                portal_type=['Folder','Large Plone Folder'],
-            )
-            wbpath = '/'.join(weblog.getPhysicalPath())
-            bcats = filter(lambda b:not b.getPath() == wbpath, bcats)
-            cats = [{'title':b.Title or b.getId, 'url':b.getURL} for b in bcats]
-        return cats
-
-
-class AddForm(NullAddForm):
-    form_fields = form.Fields(IWeblogCategoriesPortlet)
-    label = _(u'add-portlet', default=u"Add ${portlet-name} Portlet", 
-              mapping={u'portlet-name': PORTLET_TITLE})
-    description = PORTLET_DESC
-
-    def create(self):
-        return Assignment()
-
-
-class EditForm(base.EditForm):
-    form_fields = form.Fields(IWeblogCategoriesPortlet)
-    label = _(u'edit-portlet', default=u"Edit ${portlet-name} Portlet", mapping={u'portlet-name': PORTLET_TITLE})
-    description = PORTLET_DESC
Index: /quintagroup.quills.extras/trunk/quintagroup/quills/extras/browser/configure.zcml
===================================================================
--- /quintagroup.quills.extras/trunk/quintagroup/quills/extras/browser/configure.zcml	(revision 641)
+++ /quintagroup.quills.extras/trunk/quintagroup/quills/extras/browser/configure.zcml	(revision 642)
@@ -57,16 +57,3 @@
         />
 
-  <include package="plone.app.portlets" />
-
-  <plone:portlet
-      name="quintagroup.quills.extras.Categories"
-      interface=".categories.IWeblogCategoriesPortlet"
-      assignment=".categories.Assignment"
-      view_permission="zope2.View"
-      edit_permission="cmf.ManagePortal"
-      renderer=".categories.Renderer"
-      addview=".categories.AddForm"
-      editview=".categories.EditForm"
-      />
-
 </configure>
Index: /quintagroup.quills.extras/trunk/quintagroup/quills/extras/browser/overrides.zcml
===================================================================
--- /quintagroup.quills.extras/trunk/quintagroup/quills/extras/browser/overrides.zcml	(revision 641)
+++ /quintagroup.quills.extras/trunk/quintagroup/quills/extras/browser/overrides.zcml	(revision 642)
@@ -29,13 +29,3 @@
         name="weblog_view" />
 
-
-    <plone:portlet
-	name="quills.app.portlets.WeblogAdmin"
-	interface=".weblogadmin.IWeblogAdminPortlet"
-	assignment=".weblogadmin.Assignment"
-	renderer=".weblogadmin.CustomRenderer"
-	addview=".weblogadmin.AddForm"
-	editview=".weblogadmin.EditForm"
-	/>
-     
 </configure>
Index: intagroup.quills.extras/trunk/quintagroup/quills/extras/browser/weblogadmin.pt
===================================================================
--- /quintagroup.quills.extras/trunk/quintagroup/quills/extras/browser/weblogadmin.pt	(revision 641)
+++ 	(revision )
@@ -1,45 +1,0 @@
-<dl class="portlet portletWeblogAdmin"
-    i18n:domain="quills.app">
-
-    <dt class="portletHeader">
-        <span class="portletTopLeft"></span>
-        <span class="tile"
-              tal:content="view/title">_title_</span>
-        <span class="portletTopRight"></span>
-    </dt>
-
-    <dd class="portletItem odd">
-       <form method="get" action="http://localhost:10232/www/blog">
-	 <select class="form-element" 
-           onchange="javascript:location.href='blog/'+this.options[this.selectedIndex].value+'/createObject?type_name=Document'"
-           name=":action"
-           tal:attributes="onchange string:javascript:location.href='${view/weblog_url}/'+this.options[this.selectedIndex].value+'${view/create_url}'">
-           <option value="">..where to add..</option>
-	   <option value="">To blog's root</option>
-           <tal:loop-options repeat="option view/options">
-	   <option value="blogging"
-                   tal:attributes="value option"
-                   tal:content="string:To $option">To blogging/google</option>
-           </tal:loop-options>
-	 </select>
-       </form>
-
-    </dd>
-    <dd class="portletItem even">
-       <a title="Manage Comments" href="#"
-        i18n:translate="portlet_blogadmin_manage_comments"
-        i18n:attributes="title"
-        tal:attributes="href view/manage_comments_url">
-        Manage Comments
-       </a>
-    </dd>
-    <dd class="portletItem odd">
-       <a title="Configure Blog" href="#"
-        i18n:translate="portlet_blogadmin_configure_blog"
-        i18n:attributes="title"
-        tal:attributes="href view/config_view_url">
-        Configure Blog
-       </a>
-    </dd>
-
-</dl>
Index: intagroup.quills.extras/trunk/quintagroup/quills/extras/browser/weblogadmin.py
===================================================================
--- /quintagroup.quills.extras/trunk/quintagroup/quills/extras/browser/weblogadmin.py	(revision 641)
+++ 	(revision )
@@ -1,35 +1,0 @@
-from Products.CMFCore.utils import getToolByName
-from quills.app.portlets.weblogadmin import *
-
-class CustomRenderer(Renderer):
-
-    _template = ViewPageTemplateFile('weblogadmin.pt')
-
-
-    @property
-    def weblog_url(self):
-        weblog_content = self.getWeblogContentObject()
-        return weblog_content.absolute_url()
-
-    @property
-    def create_url(self):
-        weblog_content = self.getWeblogContentObject()
-        try:
-            config = IWeblogEnhancedConfiguration(weblog_content)
-            type_name = config.default_type
-        except TypeError: # Could not adapt, so fall back to default.
-            type_name = 'WeblogEntry'
-        return "/createObject?type_name=%s" % type_name
-
-    @property
-    def options(self):
-        weblog_content = self.getWeblogContentObject()
-        catalog = getToolByName(self.context, 'portal_catalog')
-        bfolders = catalog(
-            path='/'.join(weblog_content.getPhysicalPath()),
-            portal_type=['Folder','Large Plone Folder'],
-        )
-        wc_path_len = len('/'.join(weblog_content.getPhysicalPath()))
-        cats = [b.getPath()[wc_path_len+1:] for b in bfolders if not len(b.getPath())==wc_path_len ]
-        return cats
-                
Index: /quintagroup.quills.extras/trunk/quintagroup/quills/extras/configure.zcml
===================================================================
--- /quintagroup.quills.extras/trunk/quintagroup/quills/extras/configure.zcml	(revision 641)
+++ /quintagroup.quills.extras/trunk/quintagroup/quills/extras/configure.zcml	(revision 642)
@@ -7,4 +7,6 @@
 
   <include package=".browser" />
+
+  <include package=".portlets" />
 
   <cmf:registerDirectory name="quills_extras"/>
Index: /quintagroup.quills.extras/trunk/quintagroup/quills/extras/overrides.zcml
===================================================================
--- /quintagroup.quills.extras/trunk/quintagroup/quills/extras/overrides.zcml	(revision 641)
+++ /quintagroup.quills.extras/trunk/quintagroup/quills/extras/overrides.zcml	(revision 642)
@@ -4,3 +4,7 @@
     <include zcml:condition="installed quills.app"
              package=".browser" file="overrides.zcml" />
+
+    <include zcml:condition="installed quills.app"
+             package=".portlets" file="overrides.zcml" />
+
 </configure>
Index: /quintagroup.quills.extras/trunk/quintagroup/quills/extras/portlets/__init__.py
===================================================================
--- /quintagroup.quills.extras/trunk/quintagroup/quills/extras/portlets/__init__.py	(revision 642)
+++ /quintagroup.quills.extras/trunk/quintagroup/quills/extras/portlets/__init__.py	(revision 642)
@@ -0,0 +1,1 @@
+#
Index: /quintagroup.quills.extras/trunk/quintagroup/quills/extras/portlets/categories.pt
===================================================================
--- /quintagroup.quills.extras/trunk/quintagroup/quills/extras/portlets/categories.pt	(revision 642)
+++ /quintagroup.quills.extras/trunk/quintagroup/quills/extras/portlets/categories.pt	(revision 642)
@@ -0,0 +1,28 @@
+<dl class="portlet portletWeblogCategories"
+    i18n:domain="quills.app">
+
+    <dt class="portletHeader">
+        <span class="portletTopLeft"></span>
+        <span class="tile"
+              tal:content="view/title">_title_</span>
+        <span class="portletTopRight"></span>
+    </dt>
+
+    <tal:loop repeat="cat view/getCategories">
+    <dd class="portletItem odd"
+	tal:attributes="class python:repeat['cat'].even() and 'portletItem even' or 'portletItem odd'">
+       <a title="Category" href="http://"
+          tal:content="cat/title|default"
+          tal:attributes="title cat/title;
+                          href cat/url">
+          Blog Category
+        </a>
+    </dd>
+    </tal:loop>
+
+    <dd class="portletFooter">
+        <span class="portletBottomLeft"></span>
+        <span class="portletBottomRight"></span>
+    </dd>
+
+</dl>
Index: /quintagroup.quills.extras/trunk/quintagroup/quills/extras/portlets/categories.py
===================================================================
--- /quintagroup.quills.extras/trunk/quintagroup/quills/extras/portlets/categories.py	(revision 642)
+++ /quintagroup.quills.extras/trunk/quintagroup/quills/extras/portlets/categories.py	(revision 642)
@@ -0,0 +1,81 @@
+# Zope imports
+from zope.formlib import form
+from zope.interface import implements
+from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile
+
+# CMF imports
+from Products.CMFCore.utils import getToolByName
+
+# Plone imports
+from plone.app.portlets.portlets import base
+from plone.app.portlets.browser.formhelper import NullAddForm
+from plone.memoize.instance import memoize
+from plone.portlets.interfaces import IPortletDataProvider
+
+# Quills imports
+from quills.app import QuillsAppMessageFactory as _
+
+# Local imports
+from quills.app.portlets.base import BasePortletRenderer
+
+
+PORTLET_TITLE = _(u"Weblog Categories")
+PORTLET_DESC = _(u"This portlet provides list of weblog categories.")
+
+
+class IWeblogCategoriesPortlet(IPortletDataProvider):
+    """A weblog administration portlet.
+    """
+
+
+class Assignment(base.Assignment):
+    implements(IWeblogCategoriesPortlet)
+
+    @property
+    def title(self):
+        return PORTLET_TITLE
+
+
+class Renderer(BasePortletRenderer, base.Renderer):
+
+    _template = ViewPageTemplateFile('categories.pt')
+
+    @property
+    def available(self):
+        return 1 or self.getCategories() and True or False
+
+    @property
+    def title(self):
+        return PORTLET_TITLE
+
+    @memoize
+    def getCategories(self):
+        cats = []
+        weblog = self.getWeblogContentObject()
+        #import pdb;pdb.set_trace()
+        if weblog:
+            catalog = getToolByName(self.context, 'portal_catalog')
+            bcats = catalog(
+                path='/'.join(weblog.getPhysicalPath()),
+                portal_type=['Folder','Large Plone Folder'],
+            )
+            wbpath = '/'.join(weblog.getPhysicalPath())
+            bcats = filter(lambda b:not b.getPath() == wbpath, bcats)
+            cats = [{'title':b.Title or b.getId, 'url':b.getURL} for b in bcats]
+        return cats
+
+
+class AddForm(NullAddForm):
+    form_fields = form.Fields(IWeblogCategoriesPortlet)
+    label = _(u'add-portlet', default=u"Add ${portlet-name} Portlet", 
+              mapping={u'portlet-name': PORTLET_TITLE})
+    description = PORTLET_DESC
+
+    def create(self):
+        return Assignment()
+
+
+class EditForm(base.EditForm):
+    form_fields = form.Fields(IWeblogCategoriesPortlet)
+    label = _(u'edit-portlet', default=u"Edit ${portlet-name} Portlet", mapping={u'portlet-name': PORTLET_TITLE})
+    description = PORTLET_DESC
Index: /quintagroup.quills.extras/trunk/quintagroup/quills/extras/portlets/configure.zcml
===================================================================
--- /quintagroup.quills.extras/trunk/quintagroup/quills/extras/portlets/configure.zcml	(revision 642)
+++ /quintagroup.quills.extras/trunk/quintagroup/quills/extras/portlets/configure.zcml	(revision 642)
@@ -0,0 +1,45 @@
+<configure
+    xmlns="http://namespaces.zope.org/zope"
+    xmlns:plone="http://namespaces.plone.org/plone"
+    i18n_domain="elaw.webresults">
+
+    <!-- Ensure Plone's portlets ZCML has already been processed;
+         without this, we may get a permission lookup error
+      -->
+    <include package="plone.app.portlets" />
+
+    <!-- -*- extra stuff goes here -*- -->
+
+  <plone:portlet
+      name="quintagroup.quills.extras.MostCommented"
+      interface=".mostcommented.IMostCommented"
+      assignment=".mostcommented.Assignment"
+      view_permission="zope2.View"
+      edit_permission="cmf.ManagePortal"
+      renderer=".mostcommented.Renderer"
+      addview=".mostcommented.AddForm"
+      editview=".mostcommented.EditForm"
+      />
+
+  <plone:portlet
+      name="quintagroup.quills.extras.ResentPosts"
+      interface=".recententries.IRecentWeblogEntriesPortlet"
+      assignment=".recententries.Assignment"
+      renderer=".recententries.Renderer"
+      addview=".recententries.AddForm"
+      editview=".recententries.EditForm"
+      />
+
+  <plone:portlet
+      name="quintagroup.quills.extras.Categories"
+      interface=".categories.IWeblogCategoriesPortlet"
+      assignment=".categories.Assignment"
+      view_permission="zope2.View"
+      edit_permission="cmf.ManagePortal"
+      renderer=".categories.Renderer"
+      addview=".categories.AddForm"
+      editview=".categories.EditForm"
+      />
+
+
+</configure>
Index: /quintagroup.quills.extras/trunk/quintagroup/quills/extras/portlets/mostcommented.pt
===================================================================
--- /quintagroup.quills.extras/trunk/quintagroup/quills/extras/portlets/mostcommented.pt	(revision 642)
+++ /quintagroup.quills.extras/trunk/quintagroup/quills/extras/portlets/mostcommented.pt	(revision 642)
@@ -0,0 +1,36 @@
+<dl class="portlet portletMostCommented"
+    i18n:domain="elaw.theme.webresults.portlets">
+
+    <dt class="portletHeader">
+        <span class="portletTopLeft"></span>
+        <span>
+           Most commented
+        </span>
+        <span class="portletTopRight"></span>
+    </dt>
+
+    <tal:items tal:repeat="data view/mostCommented">
+    <dd class="portletItem"
+        tal:define="oddrow repeat/data/odd;
+                    num_comm python:data[0];
+                    brain python:data[1];
+                    wf_state brain/review_state;
+                    wf_state_class python:'state-' + wf_state;"
+        tal:attributes="class python:oddrow and  'portletItem even' or 'portletItem odd'">
+        <a href=""
+            tal:attributes="href brain/getURL;
+                            title brain/Description;
+                            class string:$wf_state_class tile">
+            <tal:title content="string:${brain/Title} ($num_comm)">
+                Title (3)
+            </tal:title>
+        </a>
+    </dd>
+    </tal:items>
+
+    <dd class="portletFooter">
+        <span class="portletBottomLeft"></span>
+        <span class="portletBottomRight"></span>
+    </dd>
+
+</dl>
Index: /quintagroup.quills.extras/trunk/quintagroup/quills/extras/portlets/mostcommented.py
===================================================================
--- /quintagroup.quills.extras/trunk/quintagroup/quills/extras/portlets/mostcommented.py	(revision 642)
+++ /quintagroup.quills.extras/trunk/quintagroup/quills/extras/portlets/mostcommented.py	(revision 642)
@@ -0,0 +1,146 @@
+from zope.interface import Interface
+from zope.interface import implements
+from zope.component import getMultiAdapter
+
+from plone.app.portlets.portlets import base
+from plone.portlets.interfaces import IPortletDataProvider
+
+from zope import schema
+from zope.formlib import form
+from plone.memoize.instance import memoize
+from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile
+from DateTime.DateTime import DateTime
+
+from quintagroup.quills.extras import quintagroupQuillsMessageFactory as _
+
+class IMostCommented(IPortletDataProvider):
+    """A portlet
+
+    It inherits from IPortletDataProvider because for this portlet, the
+    data that is being rendered and the portlet assignment itself are the
+    same.
+    """
+
+    # TODO: Add any zope.schema fields here to capture portlet configuration
+    # information. Alternatively, if there are no settings, leave this as an
+    # empty interface - see also notes around the add form and edit form
+    # below.
+
+    blog = schema.TextLine(
+        title=_(u"Path to Blog"),
+        description=_(u"Physical path to blog, from the plone object 'blog'"),
+        required=True)
+
+    period = schema.Int(
+        title=_(u"Actual Period"),
+        description=_(u"Actual period in days"),
+        default = 30,
+        required=True)
+
+    limit = schema.Int(
+        title=_(u"Actual Period"),
+        default = 5,
+        description=_(u"Actual period in days"),
+        required=True)
+
+
+class Assignment(base.Assignment):
+    """Portlet assignment.
+
+    This is what is actually managed through the portlets UI and associated
+    with columns.
+    """
+
+    implements(IMostCommented)
+
+    # TODO: Set default values for the configurable parameters here
+
+    # some_field = u""
+
+    # TODO: Add keyword parameters for configurable parameters here
+    # def __init__(self, some_field=u"):
+    #    self.some_field = some_field
+
+    def __init__(self, blog='/www/blog', period=30, limit=5):
+        self.blog = blog
+        self.period = period
+        self.limit = limit
+
+    @property
+    def title(self):
+        """This property is used to give the title of the portlet in the
+        "manage portlets" screen.
+        """
+        return "Most Commented"
+
+class Renderer(base.Renderer):
+    """Portlet renderer.
+
+    This is registered in configure.zcml. The referenced page template is
+    rendered, and the implicit variable 'view' will refer to an instance
+    of this class. Other methods can be added and referenced in the template.
+    """
+
+    render = ViewPageTemplateFile('mostcommented.pt')
+
+    @property
+    def days(self):
+        return self.data.period
+
+    @property
+    @memoize
+    def mostCommented(self):
+        catalog = getMultiAdapter((self.context, self.request), name=u'plone_tools').catalog()
+        pstate = getMultiAdapter((self.context, self.request), name=u'plone_portal_state')
+        portal_id = pstate.portal().getId()
+        brains = catalog(path='/%s/%s' % (portal_id, self.data.blog),
+                         portal_type='Discussion Item',
+                         review_state='published',
+                         created={'query':DateTime() - self.data.period, 
+                                  'range':'min'}
+                        )
+        # count comments per blogpost
+        comments = {}
+        for b in brains:
+            bep = '/'.join(b.getPath().split('/')[:-2])
+            comments.setdefault(bep, 0)
+            comments[bep] = comments[bep] + 1
+        # sort blogpost_pathes by comment number
+        sorted_dict = list(comments.iteritems())
+        sorted_dict.sort(lambda i1, i2: cmp(i1[1], i2[1]))
+        sorted_dict.reverse()
+        mcpathes = [k for k,v in sorted_dict[:self.data.limit]]
+        # get mostcommented blogpost brains
+        mostcommented = catalog(path={'query':mcpathes, 'depth':0})
+        mcomm_dict = dict([(b.getPath(),b) for b in mostcommented])
+        # associate comment number with appropriate blogpost brain
+        res = [(n,mcomm_dict[p]) for p,n in sorted_dict if p in mcomm_dict.keys()]
+        return res
+
+# NOTE: If this portlet does not have any configurable parameters, you can
+# inherit from NullAddForm and remove the form_fields variable.
+
+class AddForm(base.AddForm):
+    """Portlet add form.
+
+    This is registered in configure.zcml. The form_fields variable tells
+    zope.formlib which fields to display. The create() method actually
+    constructs the assignment that is being added.
+    """
+    form_fields = form.Fields(IMostCommented)
+
+    def create(self, data):
+        return Assignment(**data)
+
+
+# NOTE: IF this portlet does not have any configurable parameters, you can
+# remove this class definition and delete the editview attribute from the
+# <plone:portlet /> registration in configure.zcml
+
+class EditForm(base.EditForm):
+    """Portlet edit form.
+
+    This is registered with configure.zcml. The form_fields variable tells
+    zope.formlib which fields to display.
+    """
+    form_fields = form.Fields(IMostCommented)
Index: /quintagroup.quills.extras/trunk/quintagroup/quills/extras/portlets/overrides.zcml
===================================================================
--- /quintagroup.quills.extras/trunk/quintagroup/quills/extras/portlets/overrides.zcml	(revision 642)
+++ /quintagroup.quills.extras/trunk/quintagroup/quills/extras/portlets/overrides.zcml	(revision 642)
@@ -0,0 +1,15 @@
+<configure
+    xmlns="http://namespaces.zope.org/zope"
+    xmlns:plone="http://namespaces.plone.org/plone"
+    i18n_domain="quintagroup.quills.extras">
+
+    <plone:portlet
+        name="quills.app.portlets.WeblogAdmin"
+        interface=".weblogadmin.IWeblogAdminPortlet"
+        assignment=".weblogadmin.Assignment"
+        renderer=".weblogadmin.CustomRenderer"
+        addview=".weblogadmin.AddForm"
+        editview=".weblogadmin.EditForm"
+        />
+
+</configure>
Index: /quintagroup.quills.extras/trunk/quintagroup/quills/extras/portlets/recententries.pt
===================================================================
--- /quintagroup.quills.extras/trunk/quintagroup/quills/extras/portlets/recententries.pt	(revision 642)
+++ /quintagroup.quills.extras/trunk/quintagroup/quills/extras/portlets/recententries.pt	(revision 642)
@@ -0,0 +1,27 @@
+<dl class="portlet portletRecentEntries">
+    <dt class="portletHeader">
+        <span class="portletTopLeft"></span>
+        <span class="tile"
+              tal:content="view/title">_title_</span>
+        <span class="portletTopRight"></span>
+    </dt>
+
+    <tal:block repeat="entry view/getEntries">
+
+      <dd class="portletItem odd"
+          tal:attributes="class python:repeat['entry'].odd() and 'portletItem odd' or 'portletItem even'">
+
+        <a href="#"
+           tal:attributes="href python:view.getArchiveURLFor(entry)"
+           tal:content="entry/getTitle">_title_</a>
+
+      </dd>
+
+    </tal:block>
+
+    <dd class="portletFooter">
+        <span class="portletBottomLeft"></span>
+        <span class="portletBottomRight"></span>
+    </dd>
+
+</dl>
Index: /quintagroup.quills.extras/trunk/quintagroup/quills/extras/portlets/recententries.py
===================================================================
--- /quintagroup.quills.extras/trunk/quintagroup/quills/extras/portlets/recententries.py	(revision 642)
+++ /quintagroup.quills.extras/trunk/quintagroup/quills/extras/portlets/recententries.py	(revision 642)
@@ -0,0 +1,83 @@
+from zope import schema
+from zope.formlib import form
+from zope.interface import implements
+from zope.component import getMultiAdapter
+
+from plone.memoize.instance import memoize
+from plone.app.portlets.portlets import base
+from plone.memoize.compress import xhtml_compress
+from plone.portlets.interfaces import IPortletDataProvider
+
+from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile
+
+# Quills imports
+from quills.core.interfaces import IWeblog
+from quills.core.interfaces import IWeblogLocator
+from quills.app.browser.baseview import BaseView
+from quills.app.portlets.base import BasePortletRenderer
+
+from quintagroup.quills.extras import quintagroupQuillsMessageFactory as _
+
+PORTLET_TITLE = _(u"Recent Posts")
+PORTLET_DESC = _(u"This portlet lists recent posts for specified weblog.")
+
+class IRecentWeblogEntriesPortlet(IPortletDataProvider):
+
+    blog = schema.TextLine(
+        title=_(u"Path to Blog"),
+        description=_(u"Physical path to blog, from the plone object, 'blog' for ex."),
+        required=True)
+
+    max_entries = schema.Int(
+        title=_(u'Maximum entries'),
+        description=_(u"What's the maximum number of entries to list?"),
+        required=True,
+        default=5)
+
+class Assignment(base.Assignment):
+
+    implements(IRecentWeblogEntriesPortlet)
+
+    def __init__(self, blog='blog', max_entries=5):
+        self.blog = blog
+        self.max_entries = max_entries
+
+    @property
+    def title(self):
+        return PORTLET_TITLE
+
+
+class Renderer(BasePortletRenderer, base.Renderer, BaseView):
+
+    _template = ViewPageTemplateFile('recententries.pt')
+
+    @property
+    def title(self):
+        return PORTLET_TITLE
+
+    @memoize
+    def getWeblog(self):
+        pstate = getMultiAdapter((self.context, self.request), name=u'plone_portal_state')
+        portal = pstate.portal()
+        weblog = portal.restrictedTraverse(self.data.blog)
+        return IWeblog(weblog)
+
+    @property
+    def getEntries(self):
+        weblog = self.getWeblog()
+        return weblog.getEntries(maximum=self.data.max_entries)
+
+
+class AddForm(base.AddForm):
+    form_fields = form.Fields(IRecentWeblogEntriesPortlet)
+    label = _(u'add-portlet', default=u"Add ${portlet-name} Portlet", mapping={u'portlet-name': PORTLET_TITLE})
+    description = PORTLET_DESC
+
+    def create(self, data):
+        return Assignment(blog='blog', max_entries=5)
+
+
+class EditForm(base.EditForm):
+    form_fields = form.Fields(IRecentWeblogEntriesPortlet)
+    label = _(u'edit-portlet', default=u"Edit ${portlet-name} Portlet", mapping={u'portlet-name': PORTLET_TITLE})
+    description = PORTLET_DESC
Index: /quintagroup.quills.extras/trunk/quintagroup/quills/extras/portlets/weblogadmin.pt
===================================================================
--- /quintagroup.quills.extras/trunk/quintagroup/quills/extras/portlets/weblogadmin.pt	(revision 642)
+++ /quintagroup.quills.extras/trunk/quintagroup/quills/extras/portlets/weblogadmin.pt	(revision 642)
@@ -0,0 +1,45 @@
+<dl class="portlet portletWeblogAdmin"
+    i18n:domain="quills.app">
+
+    <dt class="portletHeader">
+        <span class="portletTopLeft"></span>
+        <span class="tile"
+              tal:content="view/title">_title_</span>
+        <span class="portletTopRight"></span>
+    </dt>
+
+    <dd class="portletItem odd">
+       <form method="get" action="http://localhost:10232/www/blog">
+	 <select class="form-element" 
+           onchange="javascript:location.href='blog/'+this.options[this.selectedIndex].value+'/createObject?type_name=Document'"
+           name=":action"
+           tal:attributes="onchange string:javascript:location.href='${view/weblog_url}/'+this.options[this.selectedIndex].value+'${view/create_url}'">
+           <option value="">..where to add..</option>
+	   <option value="">To blog's root</option>
+           <tal:loop-options repeat="option view/options">
+	   <option value="blogging"
+                   tal:attributes="value option"
+                   tal:content="string:To $option">To blogging/google</option>
+           </tal:loop-options>
+	 </select>
+       </form>
+
+    </dd>
+    <dd class="portletItem even">
+       <a title="Manage Comments" href="#"
+        i18n:translate="portlet_blogadmin_manage_comments"
+        i18n:attributes="title"
+        tal:attributes="href view/manage_comments_url">
+        Manage Comments
+       </a>
+    </dd>
+    <dd class="portletItem odd">
+       <a title="Configure Blog" href="#"
+        i18n:translate="portlet_blogadmin_configure_blog"
+        i18n:attributes="title"
+        tal:attributes="href view/config_view_url">
+        Configure Blog
+       </a>
+    </dd>
+
+</dl>
Index: /quintagroup.quills.extras/trunk/quintagroup/quills/extras/portlets/weblogadmin.py
===================================================================
--- /quintagroup.quills.extras/trunk/quintagroup/quills/extras/portlets/weblogadmin.py	(revision 642)
+++ /quintagroup.quills.extras/trunk/quintagroup/quills/extras/portlets/weblogadmin.py	(revision 642)
@@ -0,0 +1,35 @@
+from Products.CMFCore.utils import getToolByName
+from quills.app.portlets.weblogadmin import *
+
+class CustomRenderer(Renderer):
+
+    _template = ViewPageTemplateFile('weblogadmin.pt')
+
+
+    @property
+    def weblog_url(self):
+        weblog_content = self.getWeblogContentObject()
+        return weblog_content.absolute_url()
+
+    @property
+    def create_url(self):
+        weblog_content = self.getWeblogContentObject()
+        try:
+            config = IWeblogEnhancedConfiguration(weblog_content)
+            type_name = config.default_type
+        except TypeError: # Could not adapt, so fall back to default.
+            type_name = 'WeblogEntry'
+        return "/createObject?type_name=%s" % type_name
+
+    @property
+    def options(self):
+        weblog_content = self.getWeblogContentObject()
+        catalog = getToolByName(self.context, 'portal_catalog')
+        bfolders = catalog(
+            path='/'.join(weblog_content.getPhysicalPath()),
+            portal_type=['Folder','Large Plone Folder'],
+        )
+        wc_path_len = len('/'.join(weblog_content.getPhysicalPath()))
+        cats = [b.getPath()[wc_path_len+1:] for b in bfolders if not len(b.getPath())==wc_path_len ]
+        return cats
+                
Index: /quintagroup.quills.extras/trunk/quintagroup/quills/extras/profiles/default/portlets.xml
===================================================================
--- /quintagroup.quills.extras/trunk/quintagroup/quills/extras/profiles/default/portlets.xml	(revision 641)
+++ /quintagroup.quills.extras/trunk/quintagroup/quills/extras/profiles/default/portlets.xml	(revision 642)
@@ -13,3 +13,15 @@
    />
 
+   <portlet
+     addview="quintagroup.quills.extras.MostCommented"
+     title="Most Commented"
+     description="Render Most Commented Blog Posts"
+   />
+
+   <portlet
+     addview="quintagroup.quills.extras.ResentPosts"
+     title="Resent Posts"
+     description="Render Resent Blog Posts"
+   />
+
 </portlets>
