Index: qPloneGoogleSitemaps/trunk/Extensions/Install.py
===================================================================
--- qPloneGoogleSitemaps/trunk/Extensions/Install.py	(revision 3713)
+++ qPloneGoogleSitemaps/trunk/Extensions/Install.py	(revision 1)
@@ -1,19 +1,97 @@
+import string
+from cStringIO import StringIO
 from Products.CMFCore.utils import getToolByName
+from Products.CMFCore.DirectoryView import addDirectoryViews
+from Products.qPloneGoogleSitemaps import qPGS_globals
 
-PROFILE = "profile-Products.qPloneGoogleSitemaps:default"
+try:
+    from Products.CMFCore.CMFCorePermissions import ManagePortal
+except ImportError:
+    from Products.CMFCore.permissions import ManagePortal
 
-def install(self, reinstall=False):
-    """ Install skin with GenericSetup install profile
-    """
-    ps = getToolByName(self, 'portal_setup')
-    mtool = getToolByName(self, 'portal_migration')
-    plone_version = mtool.getFileSystemVersion()
+from OFS.ObjectManager import BadRequestException
 
-    if plone_version.startswith('3'):
-        # if this is plone 3.x
-        (ps.aq_base).__of__(self).runAllImportStepsFromProfile(PROFILE)
-    else:
-        active_context_id = ps.getImportContextID()
-        ps.setImportContext(PROFILE)
-        ps.runAllImportSteps()
-        ps.setImportContext(active_context_id)
+configlets = ({'id':'qPloneGoogleSitemaps',
+    'name':'Google Sitemaps',
+    'action':'string:${portal_url}/prefs_gsm_overview',
+    'condition':'',
+    'category':'Products',
+    'visible':1,
+    'appId':'qPloneGoogleSitemaps',
+    'permission':ManagePortal,
+    'imageUrl':'qplonegooglesitemaps.gif'},)
+
+def setupSkin(self, out, skinFolder):
+    skinstool=getToolByName(self, 'portal_skins')
+
+    addDirectoryViews(skinstool, 'skins', qPGS_globals)
+
+    for skin in skinstool.getSkinSelections():
+        path = skinstool.getSkinPath(skin)
+        path = map( string.strip, string.split( path,',' ) )
+
+        if not skinFolder in path:
+            try:
+                path.insert( path.index( 'custom')+1, skinFolder )
+            except ValueError:
+                path.append(skinFolder)
+            path = string.join( path, ', ' )
+            skinstool.addSkinSelection( skin, path )
+            out.write('  %s layer sucessfully installed into skin %s.\n' % (skinFolder, skin))
+        else:
+            out.write('  %s layer was already installed into skin %s.\n' % (skinFolder, skin))
+
+def install(self):
+    """ Install qPloneGoogleSitemaps """
+    out = StringIO()
+    if not hasattr(self.portal_properties, 'googlesitemap_properties'):
+        self.portal_properties.addPropertySheet('googlesitemap_properties', 'Google SiteMap properties')
+
+    props = self.portal_properties.googlesitemap_properties
+    portalTypes = ('Plone Folder', 'ATFolder')
+    new_portalTypes = ['Document', ]
+    sitemap_properties = (
+		('portalTypes', 'lines', new_portalTypes),
+		('states', 'lines', ['published', ]),
+    		('blackout_list', 'lines',[]),
+                ('reg_exp', 'lines',[]),
+		('urls', 'lines',[]),
+		('verification_filename','string','')
+	)
+        
+    types = self.portal_types.listContentTypes( by_metatype=1 )
+    for prop_id, prop_type, prop_value in sitemap_properties:
+        if not hasattr(props, prop_id):
+            props._setProperty(prop_id, prop_value, prop_type)
+
+    configTool = getToolByName(self, 'portal_controlpanel', None)
+    if configTool:
+        for conf in configlets:
+            configTool.registerConfiglet(**conf)
+            out.write('Added configlet %s\n' % conf['id'])
+
+    out.write('Call setupSkin... \n')
+    setupSkin(self, out, 'qPloneGoogleSitemaps')
+
+    return out.getvalue()
+
+def uninstall(self):
+    """ Uninstall qPloneGoogleSitemaps """
+    out = StringIO()
+
+    props = getToolByName(self,'portal_properties')
+    try:
+        props.manage_delObjects(['googlesitemap_properties',])
+    except BadRequestException: pass
+
+    configTool = getToolByName(self, 'portal_controlpanel', None)
+    if configTool:
+        for conf in configlets:
+            try:
+                configTool.unregisterConfiglet(conf['id'])
+            except BadRequestException,KeyError:
+                portal_icons = getToolByName(self,'portal_actionicons')
+                portal_icons.manage_removeActionIcon(conf['category'],conf['id'])
+            out.write('Removed configlet %s\n' % conf['id'])
+
+    return out.getvalue()
Index: qPloneGoogleSitemaps/trunk/Extensions/ping_googlesitemap.py
===================================================================
--- qPloneGoogleSitemaps/trunk/Extensions/ping_googlesitemap.py	(revision 3713)
+++ qPloneGoogleSitemaps/trunk/Extensions/ping_googlesitemap.py	(revision 1)
@@ -1,9 +1,7 @@
-from zope.event import notify
-from Products.qPloneGoogleSitemaps.events import AfterTransitionEvent
-
-def pingGoogleSitemap(stch):
-    notify(AfterTransitionEvent(stch.object,
-           stch.workflow, stch.old_state, stch.new_state,
-           stch.transition, stch.status, stch.kwargs))
-    return 0
-
+from Products.qPloneGoogleSitemaps.utils import ping_google
+from Products.CMFCore.utils import getToolByName
+def  ping_googlesitemap(state_change):
+    """ping sitemap to Google when document has published"""
+    plone_home = getToolByName(state_change.object, 'portal_url').getPortalObject().absolute_url()
+    ping_google(plone_home)
+    return 0 
Index: qPloneGoogleSitemaps/trunk/HISTORY.txt
===================================================================
--- qPloneGoogleSitemaps/trunk/HISTORY.txt	(revision 3713)
+++ qPloneGoogleSitemaps/trunk/HISTORY.txt	(revision 1)
@@ -1,43 +1,2 @@
-0.8.6 (unreleased)
-------------------
-
-- Nothing yet changed.
-
-
-0.8.5 (16-03-2009)
-------------------
-
-- Refuse from using hasMobileContent index, but 
-  object_provides one and marking mobile content
-  with IMobile interface from
-  quintagroup.mobileextender.interfaces module.
-
-
-0.8.4 Add canonical_path support from
-      quintagroup.canonicalpath package
-
-0.8.3 Fix profile name bug      
-
-0.8.2 Fix bug of qPGSMs breakage on object creation
-      in plone-3      
-
-0.8.1 Prevetn QuickInstaller confuse in <= plone-2.5
-
-  *Added Install.py external script
-
-0.8 Multiple Sitemap type support
-
-  * Added support for content, mobile, news sitemap
-
-  * Implement Sitemap XML protocol version 0.9
-
-  * Many verification files can be added to site
-
-  * Update tests
-
-0.6 Plone-3.0 compatibility
-
-  * Added plone-3 compatibility.
-
 0.5 Added tests
 
Index: qPloneGoogleSitemaps/trunk/INSTALL.txt
===================================================================
--- qPloneGoogleSitemaps/trunk/INSTALL.txt	(revision 3713)
+++ 	(revision )
@@ -1,26 +1,0 @@
-Plone Google Sitemaps Installation
-==================================
-
-qPloneGoogleSitemaps can be installed as an old-type Plone product.
-
-  1. Download product archive from  http://plone.org/products/qplonegooglesitemaps/
-  
-  2. Unpack it to get "qPloneGoogleSitemaps" folder. 
-
-  3. If you are using buildout-based instance - put "qPloneGoogleSitemaps" folder into the 
-     "products" folder of your instance, re-run buildout and restart Zope server.
-
-     If you are using traditional instance - put "qPloneGoogleSitemaps" folder into the "Products" 
-     folder of your instance and restart Zope server.
-
-  4. Go to your Plone Site "Site Setup" area 
-  
-  5. Choose "Add/Remove Products" item in the Plone Configuration list
-  
-  6. Select "Plone Google Sitemaps" product among products available for installation
-  
-  7. Press the Install button below the table
-  
-  8. Make sure the product appeared in the right column of installed products and "Google Sitemaps" 
-     appeared under Add-on Products Configuration.
-
Index: qPloneGoogleSitemaps/trunk/README.txt
===================================================================
--- qPloneGoogleSitemaps/trunk/README.txt	(revision 3713)
+++ qPloneGoogleSitemaps/trunk/README.txt	(revision 1)
@@ -1,59 +1,32 @@
-Quintagroup Plone Google Sitemaps (qPloneGoogleSitemaps)
-========================================================
+Quintagroup Plone Google Sitemaps
 
-Plone Google Sitemaps product allows Plone websites to get better visibility for Google search engine by providing it with complete listing of URLs to website content.
+  The product allows Plone websites to get better visibility for
+  Google search engine by providing it with complete listing of 
+  URLs to website content. See 
+  "Google Sitemaps":https://www.google.com/webmasters/sitemaps
+  website for more information.
+
+  "Product Homepage":http://quintagroup.com/services/plone-development/products/google-sitemaps |
+  "Download":http://sourceforge.net/projects/quintagroup
   
-Plone Google Sitemaps allows you to enable different kinds of Google Sitemaps on your Plone website. Such Sitemaps help Google to identify site URLs and the data under each site section. With Google Sitemaps enabled, search engines could track your Plone site URLs faster and more efficiently, optimizing their search by placing all the information on one page.
 
-With Plone Google Sitemaps product you can enable following Sitemap types on your Plone website:
+  (c) "Quintagroup":http://quintagroup.com/ , 2005. 
 
-  * Content Sitemap - is a regular list of pages on your website. Creating and submitting such a Sitemap lets Google know about all the pages on your Plone web site, including URLs that may not be discoverable by Google's normal crawling process.
-  * Mobile Sitemap - is a specific type of Sitemap, that indexes all site URLs that serve content for mobile devices.
-  * News Sitemap - is different from regular Sitemaps, since it is specific to Google News only. 
-
- Different Sitemap types index their own content and do not depend on other Sitemaps.
+  support@quintagroup.com * quintessence of modern business
 
 Usage
------
 
-To enable Google Sitemaps on your site:
+  1. Install with Quick Installer. 
+  
+  2. Go to https://www.google.com/webmasters/sitemaps and
+     add http://your.site/google-sitemaps.
 
-  * Add Sitemap(s) at Google Sitemap "Settings" tab (Add-on Products Configuarion -> Google Sitemaps). You can add any of the Sitemap types: content, mobile or news. 
-  * Let Google know about your Sitemap(s) by adding your Sitemap to Google Sitemaps.
-
-  See more detailed instructions on Plone Google Sitemaps usage at http://projects.quintagroup.com/products/wiki/qPloneGoogleSitemaps
-
-Screencast
-----------
-
-Watch Plone Google Sitemaps Screencasts at http://quintagroup.com/cms/screencasts/qplonegooglesitemaps to see how to use this products on your Plone instance. Learn about how to install and configure Sitemaps on your Plone instance, how to create new Google Sitemaps, and how to let Google know about them.
-  
-Installation
-------------
-
-See INSTALL.txt for instructions
-  
-Requirements
-------------
-
-  * Plone 2.5
-  * Plone 3.x 
-
-Links
------
-
-  * See "Google Sitemaps": https://www.google.com/webmasters/sitemaps website for more information.
-  * "Product Homepage": http://quintagroup.com/services/plone-development/products/google-sitemaps
-  * "Documentation Area": http://projects.quintagroup.com/products/wiki/qPloneGoogleSitemaps
-  * "Repository": http://svn.quintagroup.com/products/qPloneGoogleSitemaps
-  * "Releases": http://plone.org/products/qplonegooglesitemaps/releases
-  * Watch "Plone Google Sitemeps" Screencast at http://quintagroup.com/cms/screencasts/qplonegooglesitemaps
+  3. Should be working without any intervention.
 
 Authors
--------
 
   * Myroslav Opyr
-  * Andriy Mylenkyi
-  * Nazar Ilchuk 
+
+  * Nazar Ilchuk
+  
   * Mykola Kharechko
-  
Index: qPloneGoogleSitemaps/trunk/__init__.py
===================================================================
--- qPloneGoogleSitemaps/trunk/__init__.py	(revision 3713)
+++ qPloneGoogleSitemaps/trunk/__init__.py	(revision 1)
@@ -9,50 +9,2 @@
 allow_module('Products.qPloneGoogleSitemaps.utils.py')
 allow_module('Products.qPloneGoogleSitemaps.config.py')
-
-from zope.i18nmessageid import MessageFactory
-from Products.qPloneGoogleSitemaps import config
-
-from Products.Archetypes import atapi
-from Products.CMFCore.utils import ContentInit
-from Products.CMFCore.permissions import setDefaultRoles
-
-# Define a message factory for when this product is internationalised.
-# This will be imported with the special name "_" in most modules. Strings
-# like _(u"message") will then be extracted by i18n tools for translation.
-
-qPloneGoogleSitemapsMessageFactory = MessageFactory('qPloneGoogleSitemaps')
-
-def initialize(context):
-    """Initializer called when used as a Zope 2 product.
-
-    This is referenced from configure.zcml. Regstrations as a "Zope 2 product"
-    is necessary for GenericSetup profiles to work, for example.
-
-    Here, we call the Archetypes machinery to register our content types
-    with Zope and the CMF.
-    """
-
-    # Retrieve the content types that have been registered with Archetypes
-    # This happens when the content type is imported and the registerType()
-    # call in the content type's module is invoked. Actually, this happens
-    # during ZCML processing, but we do it here again to be explicit. Of
-    # course, even if we import the module several times, it is only run
-    # once.
-
-    content_types, constructors, ftis = atapi.process_types(
-        atapi.listTypes(config.PROJECTNAME),
-        config.PROJECTNAME)
-
-    # Now initialize all these content types. The initialization process takes
-    # care of registering low-level Zope 2 factories, including the relevant
-    # add-permission. These are listed in config.py. We use different
-    # permissions for each content type to allow maximum flexibility of who
-    # can add which content types, where. The roles are set up in rolemap.xml
-    # in the GenericSetup profile.
-
-    for atype, constructor in zip(content_types, constructors):
-        ContentInit('%s: %s' % (config.PROJECTNAME, atype.portal_type),
-            content_types      = (atype,),
-            permission         = config.ADD_PERMISSIONS[atype.portal_type],
-            extra_constructors = (constructor,),
-            ).initialize(context)
Index: qPloneGoogleSitemaps/trunk/config.py
===================================================================
--- qPloneGoogleSitemaps/trunk/config.py	(revision 3713)
+++ qPloneGoogleSitemaps/trunk/config.py	(revision 1)
@@ -1,27 +1,1 @@
-"""Common configuration constants
-"""
-
-PROJECTNAME = 'qPloneGoogleSitemaps'
-
-ADD_PERMISSIONS = {
-    # -*- extra stuff goes here -*-
-    'Sitemap': 'qPloneGoogleSitemaps: Add Sitemap',
-}
-
-SITEMAPS_VIEW_MAP = {
-    'content'   : 'sitemap.xml',
-    'mobile'    : 'mobile-sitemap.xml',
-    'news'      : 'news-sitemap.xml'
-}
-
-ping_googlesitemap = 'pingGoogleSitemap'
-testing = 0
-
-AVAILABLE_WF_SCRIPTS = [ping_googlesitemap, '']
-
-try:
-    from Products.DCWorkflow.events import AfterTransitionEvent
-except ImportError:
-    IS_PLONE_3 = False
-else:
-    IS_PLONE_3 = True
+ping_googlesitemap = 'ping_googlesitemap'
Index: qPloneGoogleSitemaps/trunk/configure.zcml
===================================================================
--- qPloneGoogleSitemaps/trunk/configure.zcml	(revision 3713)
+++ 	(revision )
@@ -1,24 +1,0 @@
-<configure
-    xmlns="http://namespaces.zope.org/zope"
-    xmlns:five="http://namespaces.zope.org/five"
-    xmlns:genericsetup="http://namespaces.zope.org/genericsetup"
-    i18n_domain="Products.qPloneGoogleSitemaps">
-
-    <!-- Include the sub-packages that use their own configure.zcml files. -->
-    <include package=".browser" />
-    <include package=".content" />
-
-    <!-- Register the installation GenericSetup extension profile -->
-    <genericsetup:registerProfile
-      name="default"
-      title="Plone Google Sitemaps"
-      directory="profiles/default"
-      description=""
-      provides="Products.GenericSetup.interfaces.EXTENSION"
-      />
-
-    <!-- -*- extra stuff goes here -*- -->
-
-    <subscriber handler=".handlers.pingGoogle"/>
-
-</configure>
Index: qPloneGoogleSitemaps/trunk/events.py
===================================================================
--- qPloneGoogleSitemaps/trunk/events.py	(revision 3713)
+++ 	(revision )
@@ -1,22 +1,0 @@
-try:
-    from Products.DCWorkflow.events import AfterTransitionEvent
-except ImportError:
-    # Copy AfterTransitionEvent from Plone-3/Products.DCWorkflow.events
-    from zope.interface import implements
-    from zope.app.event.objectevent import ObjectEvent
-    from Products.qPloneGoogleSitemaps.interfaces import *
-
-    class TransitionEvent(ObjectEvent):
-        implements(ITransitionEvent)
-
-        def __init__(self, obj, workflow, old_state, new_state, transition, status, kwargs):
-            ObjectEvent.__init__(self, obj)
-            self.workflow = workflow
-            self.old_state = old_state
-            self.new_state = new_state
-            self.transition = transition
-            self.status = status
-            self.kwargs = kwargs
-
-    class AfterTransitionEvent(TransitionEvent):
-        implements(IAfterTransitionEvent)
Index: qPloneGoogleSitemaps/trunk/handlers.py
===================================================================
--- qPloneGoogleSitemaps/trunk/handlers.py	(revision 3713)
+++ 	(revision )
@@ -1,26 +1,0 @@
-from zope.component import adapter
-from Products.CMFCore.utils import getToolByName
-#from Products.qPloneGoogleSitemaps.events import AfterTransitionEvent
-from Products.qPloneGoogleSitemaps.interfaces import IAfterTransitionEvent
-from Products.qPloneGoogleSitemaps.utils import ping_google
-
-@adapter(IAfterTransitionEvent)
-def pingGoogle(event):
-    tr_id = getattr(event.transition,'id','')
-    if not tr_id:
-        # object under creation
-        return 0
-
-    object = event.object
-    catalog = getToolByName(object, 'portal_catalog')
-
-    sitemaps = [b.getObject() for b in catalog(portal_type='Sitemap')]
-    if sitemaps:
-        plone_home = getToolByName(object, 'portal_url').getPortalObject().absolute_url()
-        wftrans_name = "%s#%s" % (event.workflow.id, tr_id)
-        obj_ptype = object.portal_type
-        for sm in sitemaps:
-            if wftrans_name in sm.getPingTransitions() \
-               and obj_ptype in sm.getPortalTypes():
-                ping_google(plone_home, sm.id)
-    return 0
Index: qPloneGoogleSitemaps/trunk/interfaces.py
===================================================================
--- qPloneGoogleSitemaps/trunk/interfaces.py	(revision 3713)
+++ 	(revision )
@@ -1,36 +1,0 @@
-from zope import schema
-from zope.interface import Interface
-
-from zope.app.container.constraints import contains
-from zope.app.container.constraints import containers
-
-from Products.qPloneGoogleSitemaps import qPloneGoogleSitemapsMessageFactory as _
-
-# -*- extra stuff goes here -*-
-
-class ISitemap(Interface):
-    """Search engine Sitemap content type"""
-
-try:
-    from Products.DCWorkflow.interfaces import IAfterTransitionEvent
-except ImportError:
-    # Copy IAfterTransitionEvent from Plone-3/Products.DCWorkflow.interfaces
-    from zope.interface import Interface, Attribute
-    from zope.app.event.interfaces import IObjectEvent
-
-    class ITransitionEvent(IObjectEvent):
-        """An event that's fired upon a workflow transition.
-        """
-
-        workflow = Attribute(u"The workflow definition triggering the transition")
-        old_state = Attribute(u"The state definition of the workflow state before the transition")
-        new_state = Attribute(u"The state definition of the workflow state before after transition")
-        transition = Attribute(u"The transition definition taking place. "
-                                "May be None if this is the 'transition' to the initial state.")
-        status = Attribute(u"The status dict of the object.")
-        kwargs = Attribute(u"Any keyword arguments passed to doActionFor() when the transition was invoked")
-
-    class IAfterTransitionEvent(ITransitionEvent):
-
-        """An event that's fired after a workflow transition.
-        """
Index: qPloneGoogleSitemaps/trunk/skins/qPloneGoogleSitemaps/getNotAddableTypes.py
===================================================================
--- qPloneGoogleSitemaps/trunk/skins/qPloneGoogleSitemaps/getNotAddableTypes.py	(revision 3713)
+++ 	(revision )
@@ -1,12 +1,0 @@
-## Script (Python) "getNotAddableTypes"
-##bind container=container
-##bind context=context
-##bind namespace=
-##bind script=script
-##bind subpath=traverse_subpath
-##parameters=
-##title=
-##
-# customize this script to filter addable portal types based on
-# context, the current user or other criteria
-return ('Favorite','Sitemap')
Index: qPloneGoogleSitemaps/trunk/skins/qPloneGoogleSitemaps/google-sitemaps.pt
===================================================================
--- qPloneGoogleSitemaps/trunk/skins/qPloneGoogleSitemaps/google-sitemaps.pt	(revision 1)
+++ qPloneGoogleSitemaps/trunk/skins/qPloneGoogleSitemaps/google-sitemaps.pt	(revision 1)
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+<urlset xmlns="http://www.google.com/schemas/sitemap/0.84"
+        xmlns:tal="http://xml.zope.org/namespaces/tal"
+        xmlns:metal="http://xml.zope.org/namespaces/metal"
+        tal:define="path python:'/'.join(here.getPhysicalPath());
+                    results python:container.searchForGoogleSitemapObjects(path);
+		    dummy python:request.RESPONSE.setHeader('Content-Type', 'text/xml');
+                    compress nocall:here/enableHTTPCompression | nothing;
+                    dummy python:compress and compress(request=request);
+		    additionalURLs python:modules['Products.qPloneGoogleSitemaps.utils'].additionalURLs"> 
+  <url tal:condition="results"
+       tal:repeat="result python:results.items()">
+    <loc tal:content="python:result[0]">http://www.yoursite.com/</loc>
+    <lastmod tal:content="python: DateTime(result[1].ModificationDate).HTML4()">2005-01-01</lastmod>
+  </url>
+  <url tal:define="URLs python:additionalURLs(context)"
+       tal:condition="URLs"
+       tal:repeat="URL URLs">
+    <loc tal:content="URL">http://www.yoursite.com/</loc>
+  </url>
+</urlset>
Index: qPloneGoogleSitemaps/trunk/skins/qPloneGoogleSitemaps/gsm_create_verify_file.cpy
===================================================================
--- qPloneGoogleSitemaps/trunk/skins/qPloneGoogleSitemaps/gsm_create_verify_file.cpy	(revision 3713)
+++ qPloneGoogleSitemaps/trunk/skins/qPloneGoogleSitemaps/gsm_create_verify_file.cpy	(revision 1)
@@ -17,9 +17,7 @@
 except BadRequestException:
     pass
-else:
-    props = getToolByName(context,'portal_properties').googlesitemap_properties
-    vfiles = list(props.getProperty('verification_filenames',[]))
-    vfiles.append(verify_filename)
-    props.manage_changeProperties(verification_filenames = vfiles)
+props = getToolByName(context,'portal_properties').googlesitemap_properties
+props.manage_changeProperties(verification_filename = verify_filename)
+
 
 return state.set(portal_status_message = 'Plone Google Sitemap updated.')
Index: qPloneGoogleSitemaps/trunk/skins/qPloneGoogleSitemaps/gsm_delete_verify_file.cpy
===================================================================
--- qPloneGoogleSitemaps/trunk/skins/qPloneGoogleSitemaps/gsm_delete_verify_file.cpy	(revision 1)
+++ qPloneGoogleSitemaps/trunk/skins/qPloneGoogleSitemaps/gsm_delete_verify_file.cpy	(revision 1)
@@ -0,0 +1,23 @@
+## Script (Python) "create_verify_file"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=Create file for verification
+##
+
+from Products.CMFCore.utils import getToolByName
+props = getToolByName(context,'portal_properties').googlesitemap_properties
+
+portal = getToolByName(context,'portal_url').getPortalObject()
+try:
+    if portal[props.verification_filename].CreatedBy == 'qPloneGoogleSitemaps':
+        portal.manage_delObjects(props.verification_filename)
+except:
+    pass
+
+props.manage_changeProperties(verification_filename = '')
+
+return state.set(portal_status_message = 'Plone Google Sitemap updated.')
Index: qPloneGoogleSitemaps/trunk/skins/qPloneGoogleSitemaps/gsm_delete_verify_file.cpy.metadata
===================================================================
--- qPloneGoogleSitemaps/trunk/skins/qPloneGoogleSitemaps/gsm_delete_verify_file.cpy.metadata	(revision 1)
+++ qPloneGoogleSitemaps/trunk/skins/qPloneGoogleSitemaps/gsm_delete_verify_file.cpy.metadata	(revision 1)
@@ -0,0 +1,14 @@
+#
+# $$
+#
+[default]
+title=Delete verify file
+
+[security]
+View=0:Authenticated
+
+[validators]
+
+[actions]
+action.success=traverse_to:string:prefs_gsm_verification
+action.failure=traverse_to:string:prefs_gsm_verification
Index: qPloneGoogleSitemaps/trunk/skins/qPloneGoogleSitemaps/gsm_edit_pinging.cpy
===================================================================
--- qPloneGoogleSitemaps/trunk/skins/qPloneGoogleSitemaps/gsm_edit_pinging.cpy	(revision 1)
+++ qPloneGoogleSitemaps/trunk/skins/qPloneGoogleSitemaps/gsm_edit_pinging.cpy	(revision 1)
@@ -0,0 +1,20 @@
+## Script (Python) "gsm_edit_pinging"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=transitions=[]
+##title=Configure Plone Google Sitemap
+##
+
+from Products.qPloneGoogleSitemaps.utils import setWorkflowTransitions
+from Products.CMFCore.utils import getToolByName
+
+if not transitions:
+    w_tool = getToolByName(context, "portal_workflow")
+    transitions = [w + "#" for w in w_tool.listWorkflows()]
+
+setWorkflowTransitions(context, transitions)
+
+return state.set(portal_status_message = "Plone Google Sitemap updated.")
Index: qPloneGoogleSitemaps/trunk/skins/qPloneGoogleSitemaps/gsm_edit_pinging.cpy.metadata
===================================================================
--- qPloneGoogleSitemaps/trunk/skins/qPloneGoogleSitemaps/gsm_edit_pinging.cpy.metadata	(revision 1)
+++ qPloneGoogleSitemaps/trunk/skins/qPloneGoogleSitemaps/gsm_edit_pinging.cpy.metadata	(revision 1)
@@ -0,0 +1,14 @@
+#
+# $$
+#
+[default]
+title= Save Propertiest
+
+[security]
+View=0:Authenticated
+
+[validators]
+
+[actions]
+action.success=traverse_to:string:prefs_gsm_pinging
+action.failure=traverse_to:string:prefs_gsm_pinging
Index: qPloneGoogleSitemaps/trunk/skins/qPloneGoogleSitemaps/gsm_edit_settings.cpy
===================================================================
--- qPloneGoogleSitemaps/trunk/skins/qPloneGoogleSitemaps/gsm_edit_settings.cpy	(revision 3713)
+++ qPloneGoogleSitemaps/trunk/skins/qPloneGoogleSitemaps/gsm_edit_settings.cpy	(revision 1)
@@ -5,64 +5,16 @@
 ##bind script=script
 ##bind subpath=traverse_subpath
-##bind state=state
-##parameters=
+##parameters=states, portalTypes, blackout_list, reg_exp, urls
 ##title=Configure Plone Google Sitemap
 ##
 
 from Products.CMFCore.utils import getToolByName
-from Products.qPloneGoogleSitemaps.utils import ping_google
+from Products.qPloneGoogleSitemaps.utils import setWorkflowTransitions
+import Products.qPloneGoogleSitemaps.config as config
 
-portal_url = getToolByName(context,'portal_url')
-portalURL = portal_url()
-portal = portal_url.getPortalObject()
-req = context.REQUEST
-message = ""
+props = getToolByName(context,'portal_properties').googlesitemap_properties
+props.manage_changeProperties( states=states, portalTypes=portalTypes,
+                               blackout_list=blackout_list, reg_exp = reg_exp,
+                               urls = urls)
 
-def addSMByType(parent, sm_type, sm_id):
-    new_id = portal.invokeFactory(id=sm_id, type_name="Sitemap", sitemapType=sm_type)
-    sm = getattr(portal, new_id)
-    if sm:
-        sm.markCreationFlag()
-        return new_id
-    return None
-
-if req.get('form.button.AddContent', False):
-    new_id = addSMByType(portal, 'content', 'sitemap.xml')
-    if new_id:
-        return req.RESPONSE.redirect("%s/%s/edit" % (portalURL, new_id))
-    else:
-        message = "Can't create content sitemap"
-elif req.get('form.button.AddMobile', False):
-    new_id = addSMByType(portal, 'mobile', 'mobile-sitemap.xml')
-    if new_id:
-        return req.RESPONSE.redirect("%s/%s/edit" % (portalURL, new_id))
-    else:
-        message = "Can't create mobile sitemap"
-elif req.get('form.button.AddNews', False):
-    new_id = addSMByType(portal, 'news', 'news-sitemap.xml')
-    if new_id:
-        return req.RESPONSE.redirect("%s/%s/edit" % (portalURL, new_id))
-    else:
-        message = "Can't create news sitemap"
-else:
-    smselected = req.get('smselected', [])
-
-    if req.get('form.button.Delete', False):
-        portal.manage_delObjects(ids=smselected[:])
-        message = "Succesfully deleted: %s" % smselected
-
-    elif req.get('form.button.Ping', False):
-        pinged = []
-        message = "Google pinged. It will review your sitemap as soon as it will be able to. Processed: %s"
-        for sm_id in smselected:
-            try:
-                ping_google(portalURL, sm_id)
-            except:
-                message = "Cannot contact Google. Try again in a while. But pinged for: %s"
-                break
-            else:
-                pinged.append(sm_id)
-        message = message % pinged
-
-return state.set(next_action='traverse_to:string:prefs_gsm_settings',
-                 portal_status_message = message)
+return state.set(portal_status_message = 'Plone Google Sitemap updated.')
Index: qPloneGoogleSitemaps/trunk/skins/qPloneGoogleSitemaps/gsm_edit_settings.cpy.metadata
===================================================================
--- qPloneGoogleSitemaps/trunk/skins/qPloneGoogleSitemaps/gsm_edit_settings.cpy.metadata	(revision 1)
+++ qPloneGoogleSitemaps/trunk/skins/qPloneGoogleSitemaps/gsm_edit_settings.cpy.metadata	(revision 1)
@@ -0,0 +1,14 @@
+#
+# $$
+#
+[default]
+title= Save Propertiest
+
+[security]
+View=0:Authenticated
+
+[validators]
+
+[actions]
+action.success=traverse_to:string:prefs_gsm_settings
+action.failure=traverse_to:string:prefs_gsm_settings
Index: qPloneGoogleSitemaps/trunk/skins/qPloneGoogleSitemaps/ping_googlesitemaps.cpy
===================================================================
--- qPloneGoogleSitemaps/trunk/skins/qPloneGoogleSitemaps/ping_googlesitemaps.cpy	(revision 1)
+++ qPloneGoogleSitemaps/trunk/skins/qPloneGoogleSitemaps/ping_googlesitemaps.cpy	(revision 1)
@@ -0,0 +1,23 @@
+## Script (Python) "ping_googlesitemaps.cpy"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=Ping information to Google
+##
+
+from Products.CMFCore.utils import getToolByName
+from Products.qPloneGoogleSitemaps.utils import ping_google
+
+url = getToolByName(context, 'portal_url')()
+
+portal_msg = "Google pinged. It will review your sitemap as soon as it will be able to."
+
+try:
+    ping_google(url)
+except:
+    portal_msg = "Cannot contact Google. Try again in a while."
+    
+return state.set(portal_status_message = portal_msg)
Index: qPloneGoogleSitemaps/trunk/skins/qPloneGoogleSitemaps/ping_googlesitemaps.cpy.metadata
===================================================================
--- qPloneGoogleSitemaps/trunk/skins/qPloneGoogleSitemaps/ping_googlesitemaps.cpy.metadata	(revision 1)
+++ qPloneGoogleSitemaps/trunk/skins/qPloneGoogleSitemaps/ping_googlesitemaps.cpy.metadata	(revision 1)
@@ -0,0 +1,13 @@
+#
+# $$
+#
+[default]
+title=Google Sitemap Ping
+
+[security]
+View=0:Authenticated
+
+[validators]
+
+[actions]
+action.success=traverse_to:string:prefs_gsm_pinging
Index: qPloneGoogleSitemaps/trunk/skins/qPloneGoogleSitemaps/prefs_gsm_overview.cpt
===================================================================
--- qPloneGoogleSitemaps/trunk/skins/qPloneGoogleSitemaps/prefs_gsm_overview.cpt	(revision 3713)
+++ qPloneGoogleSitemaps/trunk/skins/qPloneGoogleSitemaps/prefs_gsm_overview.cpt	(revision 1)
@@ -30,4 +30,10 @@
             </li>
 
+            <li class="">
+               <a href=""
+                  tal:attributes="href string: prefs_gsm_pinging"
+                  i18n:translate="label_logs">Pinging</a>
+            </li>
+
         </ul>
 
@@ -57,62 +63,27 @@
 
 <!--              -->
-            <dl tal:define="view here/@@sitemap_settings;
-                            sitemaps view/sitemapsURLByType;
-                            all sitemaps/all | nothing">
+            <dl>
             <dt>First step</dt>
-            <dd>To enable Google Sitemaps on your site, add a sitemap at 
-            <a href="prefs_gsm_settings"
-                tal:attributes="href string:$portal_url/prefs_gsm_settings">Google Sitemap settings</a> tab.
-            You can add one of the following sitemap types: <strong>content, mobile or news</strong>.
-            Different sitemap types index their own content and do not depend on other sitemaps.
+            <dd>Your site is Google Sitemaps enabled already. Check 
+            <a href="google-sitemaps"
+                tal:attributes="href string:$portal_url/google-sitemaps">sitemap XML</a> 
+            to see generated sitemap document of your website. It should contain URLs of 
+            all published objects. If you see something that should not be indexed by 
+            Google, retract objects or exclude sections with robots.txt (that GoogleBot 
+            obey).
             </dd>
             <dt>Second step</dt>
-            <dd>
-            <tal:condition-true condition="all">
-            Your site is already Google Sitemaps enabled. Check 
-            <tal:loop repeat="smdata all">
-            <a href="google-sitemaps"
-               tal:attributes="href smdata/url"
-               tal:content="smdata/id">sitemap id</a>
-            <span tal:omit-tag=""
-                  tal:condition="not: repeat/smdata/end">,</span>
-            </tal:loop>
-            to see generated sitemap document(s) of your website. 
-            </tal:condition-true>
-            <tal:condition-false condition="not:all">
-            After adding Google Sitemap(s), check whether they where generated correctly.
-            </tal:condition-false>
-
-            They should contain URLs of all published objects. If you see
-            something that should not be indexed by Google, retract objects or
-            exclude sections with robots.txt (that GoogleBot obeys).
-            </dd>
-            <dt>Third step</dt>
-            <dd>Make Google know about your sitemap(s):
+            <dd>Make Google know of your sitemap:
             <ol>
                 <li>go to <a href="https://www.google.com/webmasters/sitemaps">Google 
                 Sitemaps Central</a> (logging in / signing up as necessary)</li>
-                <tal:condition-true condition="all">
-
-                <li>add your sitemap URL(s): 
-                  <ul>
-                    <tal:loop repeat="smdata all">
-                    <li>
-                      <code tal:content="smdata/url">http://example.com/sitemaps.xml</code>
-                    </li>
-                    </tal:loop>
-                  </ul>
-                </tal:condition-true>
-
-                <tal:condition-false condition="not:all">
-                <li>This step will display urls to your sitemap(s) after adding it(them) in previous step(s)</li>
-                </tal:condition-false>
-
+                <li>add your sitemap URL: 
+                <code tal:content="string:$portal_url/google-sitemaps">http://example.com/google-sitemaps</code>
             </ol>
             It takes a while for your sitemap to be processed by Google. 
-            It usually processes the sitemap within 24 hours so do not expect your 
+            Usually within 24 hours it processes hte sitemap so do not expect your 
             submission to be processed instantly.
             </dd>
-            </dl>
+            <dl>
             <h2>Helpful resources</h2>
             <dl>
@@ -126,9 +97,4 @@
             <dd>Stay tuned. We are preparing new and fresh releases. Product page will 
             help you to keep informed about them.</dd>
-            <dt><a href="http://projects.quintagroup.com/products/wiki/qPloneGoogleSitemaps">Plone Google Sitemaps documentation area.</dt>
-            <dd>Visit product's documentation area to familiarize yourself with qPloneGoogleSitemaps product in
-            more details.
-            </dd>
-
             </dl>
         </div>
Index: qPloneGoogleSitemaps/trunk/skins/qPloneGoogleSitemaps/prefs_gsm_pinging.cpt
===================================================================
--- qPloneGoogleSitemaps/trunk/skins/qPloneGoogleSitemaps/prefs_gsm_pinging.cpt	(revision 1)
+++ qPloneGoogleSitemaps/trunk/skins/qPloneGoogleSitemaps/prefs_gsm_pinging.cpt	(revision 1)
@@ -0,0 +1,115 @@
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"
+      xmlns:metal="http://xml.zope.org/namespaces/metal"
+      xmlns:tal="http://xml.zope.org/namespaces/tal"
+      lang="en-US"
+      metal:use-macro="here/prefs_main_template/macros/master"
+      i18n:domain="qPloneGoogleSitemaps"> 
+<body>
+    <div metal:fill-slot="prefs_configlet_main"
+        tal:define="errors python:request.get('errors', {})">
+
+        <div class="documentEditable">
+            <ul class="contentViews">
+                <li class="">
+                    <a href=""
+                    tal:attributes="href string: prefs_gsm_overview"
+                    i18n:translate="label_properties">Overview</a>
+                </li>
+
+                <li class="">
+                    <a href=""
+                    tal:attributes="href string:prefs_gsm_verification"
+                    i18n:translate="label_properties">Verification</a>
+                </li>
+
+                <li class="">
+                <a href=""
+                    tal:attributes="href string: prefs_gsm_settings">
+                    Settings</a>
+                </li>
+
+                <li class="selected">
+                <a href=""
+                    tal:attributes="href string: ${template/id}"
+                    i18n:translate="label_logs">Pinging</a>
+                </li>
+
+            </ul>
+
+            <div class="contentActions">
+            &nbsp;
+            </div>
+            <div class="documentContent">
+                <h1 i18n:translate="heading_plonegooglesitemaps">Plone Google Sitemaps</h1>
+                <a href=""
+                class="link-parent"
+                tal:attributes="href string: $portal_url/plone_control_panel"
+                i18n:translate="label_up_to_plone_setup">
+                Up to Plone Setup
+                </a>
+                <form>
+                    <fieldset>
+                        <legend>Google Ping</legend>
+                        <p>By pressing "Ping Google" button you inform Google that it
+                        should reread your sitemap as you did some modification on 
+                        the site. Google usually rereads your sitemap with it's 
+                        own schedule but you have possibility to hint it about best
+                        time to do that.</p>
+                        <div class="formControls">
+                            <input class="context"
+                                tabindex=""
+                                type="submit"
+                                name="form.button.Ping"
+                                value="Ping Google"
+                                i18n:attributes="value"
+                                tal:attributes="tabindex tabindex/next;" />
+                        </div>
+                    </fieldset>
+                    <div class="field"
+                         tal:define="portal_workflow portal/portal_workflow;
+                                     getWorkflowTransitions python:modules['Products.qPloneGoogleSitemaps.utils'].getWorkflowTransitions">
+                            <label for= "portal_workflow">
+                                        Workflows to ping
+                            </label>
+                            <div class="formHelp">
+                                        Transitions after which Google have been pinged
+                            </div>
+                            <fieldset class="workflow"
+                                      tal:repeat="workflow portal_workflow/listWorkflows">
+                                <legend tal:content="workflow">Workflow title (and id)</legend>
+                                <div class="field"
+                                    tal:repeat="transition python:getWorkflowTransitions(context,workflow)">
+                                <tal:transition define="enabled python:transition.after_script_name in ['', 'ping_googlesitemap'];
+                                    name string:${workflow}#${transition/id}">
+                                    <input type="checkbox"
+                                           name="transitions:list"
+                                           tal:attributes=" id name;
+                                                            value name;
+                                                            checked python:enabled and transition.after_script_name;
+                                                            disabled not:enabled"/>
+                                    <label tal:content="string:${transition/getId}: ${transition/title_or_id}"
+                                           tal:attributes="for name; class python:test(enabled, None, 'discreet')">Transition id
+                                    </label>
+                                    <span  class="discreet"
+                                            tal:condition="not:enabled"
+                                            tal:content="string:(${transition/after_script_name})" />
+                                </tal:transition>
+                            </div>
+                        </fieldset>
+                        <div class="formControls">
+                            <input class="context"
+                                tabindex=""
+                                type="submit"
+                                name="form.button.Save"
+                                value="Save"
+                                i18n:attributes="value"
+                                tal:attributes="tabindex tabindex/next;" />
+                        </div>
+                    </div>
+                    <input type="hidden" name="form.submitted" value="1" />
+                </form>
+            </div>
+        </div>
+    </div>
+</body>
+</html>
Index: qPloneGoogleSitemaps/trunk/skins/qPloneGoogleSitemaps/prefs_gsm_pinging.cpt.metadata
===================================================================
--- qPloneGoogleSitemaps/trunk/skins/qPloneGoogleSitemaps/prefs_gsm_pinging.cpt.metadata	(revision 1)
+++ qPloneGoogleSitemaps/trunk/skins/qPloneGoogleSitemaps/prefs_gsm_pinging.cpt.metadata	(revision 1)
@@ -0,0 +1,15 @@
+#
+# $$
+#
+[default]
+title=Plone Google Sitemap Configuration
+
+[security]
+View=0:Authenticated
+
+[validators]
+
+[actions]
+action.success..Ping=traverse_to:string:ping_googlesitemaps
+action.success..Save=traverse_to:string:gsm_edit_pinging
+action.failure=traverse_to:string:prefs_gsm_pinging
Index: qPloneGoogleSitemaps/trunk/skins/qPloneGoogleSitemaps/prefs_gsm_settings.cpt
===================================================================
--- qPloneGoogleSitemaps/trunk/skins/qPloneGoogleSitemaps/prefs_gsm_settings.cpt	(revision 3713)
+++ qPloneGoogleSitemaps/trunk/skins/qPloneGoogleSitemaps/prefs_gsm_settings.cpt	(revision 1)
@@ -26,4 +26,9 @@
                    Settings</a>
                 </li>
+                <li class="">
+                <a href=""
+                   tal:attributes="href string: prefs_gsm_pinging">
+                   Pinging</a>
+                </li>
             </ul>
             <div class="contentActions">
@@ -38,7 +43,4 @@
                    Up to Plone Setup
                 </a>
-
-                
-
                 <form name="edit_form"
                     action="."
@@ -47,109 +49,122 @@
                     tal:attributes="action string:${here_url}/${template/getId}" >
 
-                <fieldset tal:define="view here/@@sitemap_settings;
-                                      sitemaps view/sitemapsDict;">
+                <fieldset tal:define="props portal/portal_properties/googlesitemap_properties;
+                                      portal_types portal/portal_types;">
                     <legend i18n:translate="legend_plonesitemap_configuration_details">
-                        Google SiteMaps configuration
+                        Google SiteMap configuration
                     </legend>
-
-                    <table class="listing"
-                           summary="Sitemaps management"
-                           i18n:attributes="summary summary_sitemaps_management;"
-                           tal:condition="sitemaps">
-                        <thead>
-                            <tr>
-                            <th></th>
-                            <th>Type</th>
-                            <th>Edit Sitemap</th>
-                            <th>Size (bytes)</th>
-                            <th>Entries</th>
-                            </tr>
-                        </thead>
-                        <tbody>
-                            <tal:items tal:repeat="data sitemaps">
-                            <tr tal:define="oddrow repeat/data/odd;"
-                                tal:attributes="class python:test(oddrow, 'even', 'odd')" >
-                                <td>
-                                <input type="checkbox" class="noborder"
-                                        name="smselected:list" id="#" value="#" tabindex=""
-                                        tal:attributes="value    data/sm_id;
-                                                        id       string:cb_${data/sm_id};
-                                                        alt      data/sm_type;
-                                                        title    data/sm_type;
-                                                        tabindex tabindex/next;" />
-                                </td>
-                                <td>
-                                <strong tal:content="data/sm_type"> Sitemap type </strong>
-                                </td>
-                                <td>
-                                <a alt="" title="" href="http://"
-                                    tal:attributes="href string:${data/sm_url}/edit;
-                                                    title data/sm_id;
-                                                    alt string:${data/sm_id}"
-                                    tal:content="data/sm_id">Edit default sitemap type </a>
-                                </td>
-                                <td tal:content="string:${data/sm_size}"> 10 000 in bytes
-                                </td>
-                                <td tal:content="string:${data/sm_entries}"> 50 000 items
-                                </td>
-                            </tr>
-                            </tal:items>
-                            <tr>
-                            <th colspan="3"><strong>Limitations:</strong></th>
-                            <th><strong>10,485,760</strong></th>
-                            <th><strong>50,000</strong></th>
-                            </tr>
-                        </tbody>
-                        </table>
-
-                        <div class="formControls"
-                            tal:define="process_creation request/process_creation|nothing;"
-                            i18n:domain="plone">
-                            <input class="context"
-                                tabindex=""
-                                type="submit"
-                                name="form.button.AddContent"
-                                value="Add Content Sitemap"
-                                i18n:attributes="value"
-                                tal:condition="not:view/hasContentSM"
-                                tal:attributes="tabindex tabindex/next;" />
-                            <input class="context"
-                                tabindex=""
-                                type="submit"
-                                name="form.button.AddMobile"
-                                value="Add Mobile Sitemap"
-                                i18n:attributes="value"
-                                tal:condition="not:view/hasMobileSM"
-                                tal:attributes="tabindex tabindex/next;" />
-                            <input class="context"
-                                tabindex=""
-                                type="submit"
-                                name="form.button.AddNews"
-                                value="Add News Sitemap"
-                                i18n:attributes="value"
-                                tal:condition="not:view/hasNewsSM"
-                                tal:attributes="tabindex tabindex/next;" />
-                            <tal:block condition="sitemaps">
-                            <input class="context"
-                                tabindex=""
-                                type="submit"
-                                name="form.button.Delete"
-                                value="Delete"
-                                i18n:attributes="value"
-                                tal:attributes="tabindex tabindex/next;" />
-                            <input class="context"
-                                tabindex=""
-                                type="submit"
-                                name="form.button.Ping"
-                                value="Ping"
-                                i18n:attributes="value"
-                                tal:attributes="tabindex tabindex/next;" />
-                            </tal:block>
+                    <div class="field" 
+                        tal:define="portalTypes props/portalTypes;">
+                        <label for="portalTypes ">
+                            Define the types
+                        </label>
+                        <div class="formHelp">
+                            Define the types to be included in sitemap.
                         </div>
 
-                    <tal:block condition="sitemaps">
-                    <p><strong>Note</strong>: Ping button allows you to make additional ping (apart from automatic one).</p>
-                    </tal:block>
+                        <select multiple="multiple"
+                                name="portalTypes"
+                                id="portalTypes"
+                                tal:attributes="tabindex tabindex/next;">
 
+                        <tal:contenttypes repeat="type python:portal_types.listContentTypes()">
+                            <option tal:define="type python:portal_types.getTypeInfo(type);
+                                                type_name type/Title;
+                                                portal_type type/getId"
+                                    tal:attributes="value portal_type;
+                                                    selected python: test(portal_type in portalTypes, 'selected', None)"
+                                    tal:content="type_name">
+                                Article
+                            </option>
+                        </tal:contenttypes>
+                        </select>
+                    </div>
+
+                    <div class="field" 
+                        tal:define="states props/states;">
+                        <label for="states ">
+                            Review status
+                        </label>
+
+                        <div class="formHelp">
+                            You may include items in sitemap depend of their review state.
+                        </div>
+
+                        <textarea name="states:lines" 
+                                id="states"
+                                cols="20"
+                                rows="8"
+                                tabindex=""
+                                tal:attributes="tabindex tabindex/next;"
+                                tal:define="content python:modules['string'].join(states,'\n');"
+                                tal:content="content">
+                        </textarea>
+                    </div>
+                    <div class="field" 
+                        tal:define="blackout_list props/blackout_list;">
+                        <label for="blackout_list ">
+                            Blackout entries
+                        </label>
+                        <div class="formHelp">
+                            The objects with the given ids will not be included in sitemap.
+                        </div>
+                        <textarea name="blackout_list:lines" 
+                                id="reg_exp"
+                                cols="20"
+                                rows="8"
+                                tabindex=""
+                                tal:attributes="tabindex tabindex/next;"
+                                tal:define="content python:modules['string'].join(blackout_list ,'\n');"
+                                tal:content="content">
+                        </textarea>
+                    </div>
+                    <div class="field" 
+                        tal:define="reg_exp props/reg_exp;">
+                        <label for="reg_exp">
+                            URL processing Regular Expressions
+                        </label>
+                        <div class="formHelp">
+                            Provide regular expressions (in Perl syntax), one per line to be applied to URLs before including them into Sitemap. For instance, "s/\/index_html//" will remove /index_html from URLs representing default documents.
+                        </div>
+
+                        <textarea name="reg_exp:lines" 
+                                id="reg_exp"
+                                cols="20"
+                                rows="8"
+                                tabindex=""
+                                tal:attributes="tabindex tabindex/next;"
+                                tal:define="content python:modules['string'].join(reg_exp ,'\n');"
+                                tal:content="content">
+                        </textarea>
+                    </div>
+                    <div class="field" 
+                        tal:define="urls props/urls;">
+                        <label for="urls"> Additional URLs
+                        </label>
+                        <div class="formHelp">
+                            Define additional URLs that are not objects and that should be included in sitemap.
+                        </div>
+                        <textarea name="urls:lines" 
+                                id="urls"
+                                cols="20"
+                                rows="8"
+                                tabindex=""
+                                tal:attributes="tabindex tabindex/next;"
+                                tal:define="content python:modules['string'].join(urls ,'\n');"
+                                tal:content="content">
+                        </textarea>
+                    </div>
+
+                    <div class="formControls"
+                        tal:define="process_creation request/process_creation|nothing;"
+                        i18n:domain="plone">
+                        <input class="context"
+                            tabindex=""
+                            type="submit"
+                            name="form.button.Save"
+                            value="Save"
+                            i18n:attributes="value"
+                            tal:attributes="tabindex tabindex/next;" />
+                    </div>
                     </fieldset>
                     <input type="hidden" name="form.submitted" value="1" />
Index: qPloneGoogleSitemaps/trunk/skins/qPloneGoogleSitemaps/prefs_gsm_settings.cpt.metadata
===================================================================
--- qPloneGoogleSitemaps/trunk/skins/qPloneGoogleSitemaps/prefs_gsm_settings.cpt.metadata	(revision 3713)
+++ qPloneGoogleSitemaps/trunk/skins/qPloneGoogleSitemaps/prefs_gsm_settings.cpt.metadata	(revision 1)
@@ -11,9 +11,5 @@
 
 [actions]
-action.success..AddContent=traverse_to:string:gsm_edit_settings
-action.success..AddMobile=traverse_to:string:gsm_edit_settings
-action.success..AddNews=traverse_to:string:gsm_edit_settings
-action.success..Delete=traverse_to:string:gsm_edit_settings
-action.success..Ping=traverse_to:string:gsm_edit_settings
+action.success..Save=traverse_to:string:gsm_edit_settings
 action.success=traverse_to:string:gsm_edit_settings
-action.failure=redirect_to:string:prefs_gsm_settings
+action.failure=traverse_to:string:prefs_gsm_settings
Index: qPloneGoogleSitemaps/trunk/skins/qPloneGoogleSitemaps/prefs_gsm_verification.cpt
===================================================================
--- qPloneGoogleSitemaps/trunk/skins/qPloneGoogleSitemaps/prefs_gsm_verification.cpt	(revision 3713)
+++ qPloneGoogleSitemaps/trunk/skins/qPloneGoogleSitemaps/prefs_gsm_verification.cpt	(revision 1)
@@ -8,5 +8,5 @@
     <div metal:fill-slot="prefs_configlet_main"
         tal:define="errors python:request.get('errors', {});
-                    view here/@@sitemap_settings;">
+                    props portal/portal_properties/googlesitemap_properties">
 
         <div class="documentEditable">
@@ -30,4 +30,10 @@
                 </li>
 
+                <li class="">
+                <a href=""
+                    tal:attributes="href string: prefs_gsm_pinging"
+                    i18n:translate="label_logs">Pinging</a>
+                </li>
+
             </ul>
 
@@ -44,7 +50,7 @@
                 </a>
 
-                <form tal:define="vfiles view/getVerificationFiles;
-                                  step1 python:test(vfiles, 'discreet', '');
-                                  step2 python:test(not vfiles, 'discreet', '')">
+                <form tal:define="file_provided props/verification_filename;
+                                  step1 python:test(file_provided, 'discreet', '');
+                                  step2 python:test(not file_provided, 'discreet', '')">
                     <ol>
                         <li tal:attributes="class step1">
@@ -55,8 +61,12 @@
                         </li>
                         <li tal:attributes="class step1">Provide verification file name:
-                            <p><input name="verify_filename" id="verify_filename" type="text"></p>
+                            <p><input name="verify_filename" id="verify_filename" type="text"
+                                tal:attributes="value props/verification_filename;
+                                                disabled step1"
+                            ></p>
                         </li>
                         <li tal:attributes="class step1">
-                                <input name="form.button.CreateFile" id="create_file" type="submit" value="Create verification file"/>
+                                <input name="form.button.CreateFile" id="create_file" type="submit" value="Create verification file"
+                                tal:attributes="disabled step1"/>
                                 <input type="hidden" name="form.submitted" value="1" />
                         </li>
@@ -68,10 +78,7 @@
                         </li>
                         <li class="discreet"
-                            tal:attributes="class step2"
-                            tal:condition="vfiles">
-                            <strong>Existent verification files:</strong>
-                            <ul><li tal:repeat="vf vfiles"
-                                    tal:content="vf">verification file id
-                            </li></ul>
+                            tal:attributes="class step2"><input name="form.button.DeleteFile" id="remove_file" type="submit" value="Remove verification file"
+                            tal:attributes="disabled step2;
+                                            value string:Remove ${file_provided} verifivation file"/>
                         </li>
                     </ol>
Index: qPloneGoogleSitemaps/trunk/skins/qPloneGoogleSitemaps/prefs_gsm_verification.cpt.metadata
===================================================================
--- qPloneGoogleSitemaps/trunk/skins/qPloneGoogleSitemaps/prefs_gsm_verification.cpt.metadata	(revision 3713)
+++ qPloneGoogleSitemaps/trunk/skins/qPloneGoogleSitemaps/prefs_gsm_verification.cpt.metadata	(revision 1)
@@ -12,3 +12,4 @@
 [actions]
 action.success..CreateFile=traverse_to:string:gsm_create_verify_file
+action.success..DeleteFile=traverse_to:string:gsm_delete_verify_file
 action.failure=traverse_to:string:prefs_gsm_verification
Index: qPloneGoogleSitemaps/trunk/skins/qPloneGoogleSitemaps/searchForGoogleSitemapObjects.py
===================================================================
--- qPloneGoogleSitemaps/trunk/skins/qPloneGoogleSitemaps/searchForGoogleSitemapObjects.py	(revision 1)
+++ qPloneGoogleSitemaps/trunk/skins/qPloneGoogleSitemaps/searchForGoogleSitemapObjects.py	(revision 1)
@@ -0,0 +1,30 @@
+## Script (Python) "searchForGoogleSitemapObjects"
+##bind container=
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=path=None
+##
+from Products.CMFCore.utils import getToolByName
+from Products.qPloneGoogleSitemaps.utils import applyOperations
+from string import find
+
+if not path:
+    path = '/'.join(context.getPhysicalPath())
+
+catalog = getToolByName(context, 'portal_catalog')
+try:
+    props = getToolByName(context, 'portal_properties').googlesitemap_properties
+    objects = catalog(path = path,
+                portal_type = props.portalTypes,
+                review_state = props.states,)
+except AttributeError:
+    # We are run without being properly installed, do default processing
+    return applyOperations(catalog(path = path,
+                                   review_state = ['published'],),
+                                   [])
+
+blackout_list = props.blackout_list
+return applyOperations([ob for ob in objects if (ob.getId not in blackout_list)],
+                    props.getProperty('reg_exp'))
Index: qPloneGoogleSitemaps/trunk/tests/testqPloneGoogleSitemaps.py
===================================================================
--- qPloneGoogleSitemaps/trunk/tests/testqPloneGoogleSitemaps.py	(revision 3713)
+++ qPloneGoogleSitemaps/trunk/tests/testqPloneGoogleSitemaps.py	(revision 1)
@@ -2,138 +2,15 @@
 # Tests for qPloneGoogleSitemaps
 #
-import re, sys
-from urllib import urlencode
-from StringIO import StringIO
+import os, sys
+if __name__ == '__main__':
+    execfile(os.path.join(sys.path[0], 'framework.py'))
 
-from Products.Five import zcml
-from Products.Five import fiveconfigure
 from Products.PloneTestCase import PloneTestCase
-
-from Products.CMFPlone.utils import _createObjectByType
-
-import Products.qPloneGoogleSitemaps
-from Products.qPloneGoogleSitemaps.config import ping_googlesitemap
-
 from XMLParser import parse, hasURL
-Products.qPloneGoogleSitemaps.config.testing = 1
 
 PRODUCT = 'qPloneGoogleSitemaps'
 PRODUCTS = (PRODUCT,)
-
-# Import configure.zcml for qPloneGoogleSitemaps
-fiveconfigure.debug_mode = True
-zcml.load_config('configure.zcml', Products.qPloneGoogleSitemaps)
-fiveconfigure.debug_mode = False
-
 PloneTestCase.installProduct(PRODUCT)
-PloneTestCase.setupPloneSite(extension_profiles=("Products.%s:default" % PRODUCT,))
-
-class TestqPloneGoogleSitemapsInstallation(PloneTestCase.PloneTestCase):
-
-    def afterSetUp(self):
-        self.loginAsPortalOwner()
-
-    def testType(self):
-        pt = self.portal.portal_types
-        self.assert_('Sitemap' in pt.objectIds(), 
-            'No "Sitemap" type after installation')
-        #Test views
-        views = pt.getTypeInfo('Sitemap').view_methods
-        self.assert_('sitemap.xml' in views, 
-            'No "sitemap.xml" view for Sitemap type')
-        self.assert_('mobile-sitemap.xml' in views, 
-            'No "mobile-sitemap.xml" view for Sitemap type')
-        self.assert_('news-sitemap.xml' in views, 
-            'No "news-sitemap.xml" view for Sitemap type')
-
-    def testGSMProperties(self):
-        pp = self.portal.portal_properties
-
-        # Test types_not_searched
-        self.assert_("Sitemap" in pp['site_properties'].getProperty('types_not_searched'), 
-            'No "Sitemap" added to types not searched on installation')
-        # Test metaTypesNotToList
-        self.assert_("Sitemap" in pp['navtree_properties'].getProperty('metaTypesNotToList'), 
-            'No "Sitemap" added to types not to list on installation')
-
-        # Test 'googlesitemap_properties'
-        self.assert_('googlesitemap_properties' in pp.objectIds(), 
-            'No "googlesitemap_properties" after installation')
-        qsmprops = pp['googlesitemap_properties']
-        self.assert_(qsmprops.hasProperty('verification_filenames'),
-            'No "verification_filenames" property added on installation')
-
-    def testSkins(self):
-        ps = self.portal.portal_skins
-        self.assert_('qPloneGoogleSitemaps' in ps.objectIds(), 
-            'No "qPloneGoogleSitemaps" skin layer in portal_skins')
-        self.assert_('qPloneGoogleSitemaps' in ps.getSkinPath(ps.getDefaultSkin()),
-            'No "qPloneGoogleSitemaps" skin layer in default skin')
-
-    def testConfiglet(self):
-        cp = self.portal.portal_controlpanel
-        self.assert_([1 for ai in cp.listActionInfos() if ai['id']=='qPloneGoogleSitemaps'], 
-            'No "qPloneGoogleSitemaps" configlet added to plone control panel')
-
-    def testCatalog(self):
-        catalog = self.portal.portal_catalog
-        self.assert_('hasMobileContent' in catalog.indexes(),
-            'No "hasMobileContent" index in portal_catalog')
-
-
-class TestSitemapType(PloneTestCase.FunctionalTestCase):
-
-    def afterSetUp(self):
-        self.loginAsPortalOwner()
-        self.auth = 'admin:admin'
-        self.contentSM = _createObjectByType('Sitemap', self.portal, id='google-sitemaps')
-        self.portal.portal_membership.addMember('admin', 'admin', ('Manager',), [])
-
-    def testFields(self):
-        field_ids = map(lambda x:x.getName(), self.contentSM.Schema().fields())
-        # test old Sitemap settings fields
-        self.assert_('id' in field_ids)
-        self.assert_('portalTypes' in field_ids)
-        self.assert_('states' in field_ids)
-        self.assert_('blackout_list' in field_ids)
-        self.assert_('urls' in field_ids)
-        self.assert_('pingTransitions' in field_ids)
-        # test new sitemap type field
-        self.assert_('sitemapType' in field_ids)
-
-    def testSitemapTypes(self):
-        sitemap_types = self.contentSM.getField('sitemapType').Vocabulary().keys()
-        self.assert_('content' in sitemap_types)
-        self.assert_('mobile' in sitemap_types)
-        self.assert_('news' in sitemap_types)
-
-    def testAutoSetLayout(self):
-        response = self.publish('/%s/createObject?type_name=Sitemap' % \
-                                self.portal.absolute_url(1), basic=self.auth)
-        location = response.getHeader('location')
-        newurl = location[location.find('/'+self.portal.absolute_url(1)):]
-
-        msm_id = 'mobile_sitemap'
-        form = {'id': msm_id,
-                'sitemapType':'mobile',
-                'portalTypes':['Document',],
-                'states':['published'],
-                'form_submit':'Save',
-                'form.submitted':1,
-                }
-        post_data = StringIO(urlencode(form))
-        response = self.publish(newurl, request_method='POST', stdin=post_data, basic=self.auth)
-        msitemap = getattr(self.portal, msm_id)
-
-        self.assertEqual(msitemap.defaultView(), 'mobile-sitemap.xml')
-
-    def txestPingSetting(self):
-        pwf = self.portal.portal_workflow['plone_workflow']
-        self.assertEqual(self.contentSM.getPingTransitions(), ())
-
-        self.contentSM.setPingTransitions(('plone_workflow#publish',))
-        self.assertEqual(self.contentSM.getPingTransitions(), ('plone_workflow#publish',))
-        self.assert_(ping_googlesitemap in pwf.scripts.keys(),"Not add wf script")
-
+PloneTestCase.setupPloneSite(products = PRODUCTS)
 
 class TestqPloneGoogleSitemaps(PloneTestCase.FunctionalTestCase):
@@ -142,10 +19,9 @@
         self.loginAsPortalOwner()
 
+        self.membership = self.portal.portal_membership
         self.workflow = self.portal.portal_workflow
         self.auth = 'admin:admin'
-        _createObjectByType('Sitemap', self.portal, id='google-sitemaps')
         self.sitemapUrl = '/'+self.portal.absolute_url(1) + '/google-sitemaps'
-        self.portal.portal_membership.addMember('admin', 'admin', ('Manager',), [])
-        self.gsm_props = self.portal.portal_properties['googlesitemap_properties']
+        self.membership.addMember('admin', 'admin', ('Manager',), [])
 
         # Add testing document to portal
@@ -154,5 +30,7 @@
         self.my_doc.edit(text_format='plain', text='hello world')
 
-
+    def testInstallation(self):
+        installed = self.portal.portal_quickinstaller.isProductInstalled(PRODUCT)
+        self.assert_(installed, 'Product not installed')
 
     def testSitemap(self):
@@ -178,59 +56,13 @@
         self.assert_(data[0] == self.my_doc.absolute_url(0), 'Incorect url')
 
-    def testVerificationFileCreation(self):
+    def testVerificationFile(self):
         self.portal.gsm_create_verify_file('verif_file')
-
+        
         vf_created = hasattr(self.portal, 'verif_file')
         self.assert_(vf_created, 'Verification file not created')
 
-    def testVerificationForm(self):
-        verifyConfigUrl = '/'+self.portal.absolute_url(1) + '/prefs_gsm_verification'
-        verif_config = self.publish(verifyConfigUrl, self.auth).getBody()
-        rexp_input_acitve = re.compile('<input\s+name="verify_filename"\s+([^>]*)>', re.I|re.S)
-        rexp_button_acitve = re.compile('<input\s+name="form.button.CreateFile"\s+([^>]*)>', re.I|re.S)
-        rexp_delete_button = re.compile('<input\s+name="form.button.DeleteFile"\s+[^>]*>', re.I|re.S)
-
-        input_acitve = rexp_input_acitve.search(verif_config)
-        button_acitve = rexp_button_acitve.search(verif_config)
-        delete_button = rexp_delete_button.match(verif_config)
-
-        self.assert_(input_acitve and not 'disabled' in input_acitve.groups(1))
-        self.assert_(button_acitve and not 'disabled' in button_acitve.groups(1))
-        self.assert_(not delete_button)
-
-        self.portal.gsm_create_verify_file('verif_file')
-
-        input_acitve = rexp_input_acitve.search(verif_config)
-        button_acitve = rexp_button_acitve.search(verif_config)
-        delete_button = rexp_delete_button.match(verif_config)
-
-        verif_config = self.publish(verifyConfigUrl, self.auth).getBody()
-        self.assert_(input_acitve and not 'disabled' in input_acitve.groups(1))
-        self.assert_(not delete_button)
-
-    def testMultiplyVerificationFiles(self):
-        verifyConfigUrl = '/'+self.portal.absolute_url(1) + '/prefs_gsm_verification'
-
-        form = {'verify_filename':'verif_file_1',
-                'form.button.CreateFile': 'Create verification file',
-                'form.submitted':1}
-        post_data = StringIO(urlencode(form))
-        response = self.publish(verifyConfigUrl, request_method='POST',
-                                stdin=post_data, basic=self.auth)
-        self.assertEqual(response.getStatus(), 200)
-        self.assert_('verif_file_1' in self.gsm_props.getProperty('verification_filenames',[]),
-                     self.gsm_props.getProperty('verification_filenames',[]))
-
-        form = {'verify_filename':'verif_file_2',
-                'form.button.CreateFile': 'Create verification file',
-                'form.submitted':1}
-        post_data = StringIO(urlencode(form))
-        response = self.publish(verifyConfigUrl, request_method='POST',
-                                stdin=post_data, basic=self.auth)
-        self.assertEqual(response.getStatus(), 200)
-        self.assert_([1 for vf in ['verif_file','verif_file_2'] \
-                      if vf in self.gsm_props.getProperty('verification_filenames',[])],
-                     self.gsm_props.getProperty('verification_filenames',[]))
-
+        self.portal.gsm_delete_verify_file()
+        vf_created = hasattr(self.portal, 'verif_file')
+        self.assert_(not vf_created, 'Verification file not removed')
 
 class TestSettings(PloneTestCase.FunctionalTestCase):
@@ -239,12 +71,11 @@
         self.loginAsPortalOwner()
 
+        self.membership = self.portal.portal_membership
         self.workflow = self.portal.portal_workflow
         self.gsm_props = self.portal.portal_properties['googlesitemap_properties']
         self.auth = 'admin:admin'
-        self.contentSM = _createObjectByType('Sitemap', self.portal, id='google-sitemaps')
-
         self.sitemapUrl = '/'+self.portal.absolute_url(1) + '/google-sitemaps'
 
-        self.portal.portal_membership.addMember('admin', 'admin', ('Manager',), [])
+        self.membership.addMember('admin', 'admin', ('Manager',), [])
 
         # Add testing document to portal
@@ -259,10 +90,10 @@
         self.assert_(hasURL(sitemap, self.my_doc_url))
 
-        self.contentSM.setPortalTypes([])
+        self.gsm_props.manage_changeProperties(portalTypes = [])
 
         sitemap = self.publish(self.sitemapUrl, self.auth).getBody()
         self.assert_(not hasURL(sitemap, self.my_doc_url))
 
-        self.contentSM.setPortalTypes(['Document'])
+        self.gsm_props.manage_changeProperties(portalTypes = ['Document'])
 
         sitemap = self.publish(self.sitemapUrl, self.auth).getBody()
@@ -271,10 +102,10 @@
     def testStates(self):
         self.workflow.doActionFor(self.my_doc, 'publish')
-        self.contentSM.setStates(['visible'])
+        self.gsm_props.manage_changeProperties(states = ['visible'])
 
         sitemap = self.publish(self.sitemapUrl, self.auth).getBody()
         self.assert_(not hasURL(sitemap, self.my_doc_url))
 
-        self.contentSM.setStates(['published'])
+        self.gsm_props.manage_changeProperties(states = ['published'])
 
         sitemap = self.publish(self.sitemapUrl, self.auth).getBody()
@@ -283,10 +114,9 @@
     def test_blackout_entries(self):
         self.workflow.doActionFor(self.my_doc, 'publish')
-        self.contentSM.setBlackout_list((self.my_doc.getId(),))
-
+        self.gsm_props.manage_changeProperties(blackout_list = (self.my_doc.getId(),))
         sitemap = self.publish(self.sitemapUrl, self.auth).getBody()
         self.assert_(not hasURL(sitemap, self.my_doc_url))
 
-        self.contentSM.setBlackout_list([])
+        self.gsm_props.manage_changeProperties(blackout_list = [])
         sitemap = self.publish(self.sitemapUrl, self.auth).getBody()
         self.assert_(hasURL(sitemap, self.my_doc_url))
@@ -298,5 +128,5 @@
 
         regexp = "s/\/%s//"%self.my_doc.getId()
-        self.contentSM.setReg_exp([regexp])
+        self.gsm_props.manage_changeProperties(reg_exp = [regexp])
 
         sitemap = self.publish(self.sitemapUrl, self.auth).getBody()
@@ -304,5 +134,5 @@
 
     def test_add_urls(self):
-        self.contentSM.setUrls(['http://w1', 'w2', '/w3'])
+        self.gsm_props.manage_changeProperties(urls = ['http://w1', 'w2', '/w3'])
         w1_url = 'http://w1'
         w2_url = self.portal.absolute_url() + '/w2'
@@ -314,82 +144,9 @@
         self.assert_(hasURL(sitemap, w3_url))
 
-
-class TestPinging(PloneTestCase.FunctionalTestCase):
-
-    def afterSetUp(self):
-        self.loginAsPortalOwner()
-
-        self.workflow = self.portal.portal_workflow
-        self.gsm_props = self.portal.portal_properties['googlesitemap_properties']
-        self.auth = 'admin:admin'
-        self.portal.portal_membership.addMember('admin', 'admin', ('Manager',), [])
-        # Add sitemaps
-        self.contentSM = _createObjectByType('Sitemap', self.portal, id='google-sitemaps')
-        self.contentSM.setPingTransitions(('plone_workflow#publish',))
-        self.newsSM = _createObjectByType('Sitemap', self.portal, id='news-sitemaps')
-        self.newsSM.setPortalTypes(('News Item','Document'))
-        self.newsSM.setPingTransitions(('plone_workflow#publish',))
-        self.sitemapUrl = '/'+self.portal.absolute_url(1) + '/google-sitemaps'
-        # Add testing document to portal
-        my_doc = self.portal.invokeFactory('Document', id='my_doc')
-        self.my_doc = self.portal['my_doc']
-        my_news = self.portal.invokeFactory('News Item', id='my_news')
-        self.my_news = self.portal['my_news']
-
-    def testAutomatePinging(self):
-        # 1. Check for pinging both sitemaps
-        back_out, myout = sys.stdout, StringIO()
-        sys.stdout = myout
-        self.workflow.doActionFor(self.my_doc, 'publish')
-        myout.seek(0)
-        data = myout.read()
-        sys.stdout = back_out
-        self.assert_('Pinged %s sitemap to google' % self.contentSM.absolute_url() in data,
-                     "Not pinged %s: '%s'" % (self.contentSM.id, data))
-        self.assert_('Pinged %s sitemap to google' % self.newsSM.absolute_url() in data,
-                     "Not pinged %s: '%s'" % (self.newsSM.id, data))
-
-        # 2. Check for pinging only news-sitemap sitemaps
-        back_out, myout = sys.stdout, StringIO()
-        sys.stdout = myout
-        self.workflow.doActionFor(self.my_news, 'publish')
-        myout.seek(0)
-        data = myout.read()
-        sys.stdout = back_out
-
-        self.assert_('Pinged %s sitemap to google' % self.newsSM.absolute_url() in data,
-                     "Not pinged %s: '%s'" % (self.newsSM.id, data))
-        self.assert_(not 'Pinged %s sitemap to google' % self.contentSM.absolute_url() in data,
-                     "Pinged %s on news: '%s'" % (self.contentSM.id, data))
-
-    def testPingingWithSetupForm(self):
-        # Ping news and content sitemaps
-        formUrl = '/'+self.portal.absolute_url(1) + '/prefs_gsm_settings'
-        qs = 'smselected:list=%s&smselected:list=%s&form.button.Ping=1&form.submitted=1' % \
-             (self.contentSM.id, self.newsSM.id)
-
-        back_out, myout = sys.stdout, StringIO()
-        sys.stdout = myout
-        response = self.publish("%s?%s" % (formUrl, qs), basic=self.auth)
-        myout.seek(0)
-        data = myout.read()
-        sys.stdout = back_out
-
-        self.assert_('Pinged %s sitemap to google' % self.contentSM.absolute_url() in data,
-                     "Not pinged %s: '%s'" % (self.contentSM.id, data))
-        self.assert_('Pinged %s sitemap to google' % self.newsSM.absolute_url() in data,
-                     "Not pinged %s: '%s'" % (self.newsSM.id, data))
-
-
-
 def test_suite():
     from unittest import TestSuite, makeSuite
     suite = TestSuite()
-    suite.addTest(makeSuite(TestqPloneGoogleSitemapsInstallation))
-    suite.addTest(makeSuite(TestSitemapType))
     suite.addTest(makeSuite(TestqPloneGoogleSitemaps))
     suite.addTest(makeSuite(TestSettings))
-    suite.addTest(makeSuite(TestPinging))
-
     return suite
 
Index: qPloneGoogleSitemaps/trunk/utils.py
===================================================================
--- qPloneGoogleSitemaps/trunk/utils.py	(revision 3713)
+++ qPloneGoogleSitemaps/trunk/utils.py	(revision 1)
@@ -1,23 +1,108 @@
 from urllib2 import urlopen
 from urllib  import quote as urlquote
-
-from Globals import DevelopmentMode
+from Products.CMFCore.utils import getToolByName
+import re
+import Products.qPloneGoogleSitemaps.config as config
 from OFS.ObjectManager import BadRequestException
-
-from Products.qPloneGoogleSitemaps.config import testing
-
-def ping_google(url, sitemap_id):
+def ping_google(url):
     """Ping sitemap to Google"""
-    if DevelopmentMode:
-        #prevent pinging in debug mode
-        print "Pinging Google ...", url, sitemap_id
-        return 0
-
-    resurl = url + "/" + sitemap_id
-    sitemap_url = urlquote(resurl)
+    sitemap_url = urlquote(url + "/google-sitemaps")
     g = urlopen('http://www.google.com/webmasters/sitemaps/ping?sitemap='+sitemap_url)
     result = g.read()
     g.close()
-    if testing:
-        print "Pinged %s sitemap to google" % resurl
     return 0
+
+def searchAndReplace(string, what, with):
+    """Emulate sed command s/"""
+    res = re.sub(what,with,string)
+    return res
+
+OPERATORS = {'s': searchAndReplace,}
+
+def applyOperations(objects, operations):
+    """Parse Operations """
+    parse = re.compile(r"(.?[^\\])/(.*[^\\]|)/(.*[^\\]|)/")
+    operations=[parse.match(op).groups() for op in operations]
+    result={}
+    for ob in objects:
+        url = ob.getURL()
+        for operator, what, with in operations:
+            url = OPERATORS[operator](url, what, with.replace("\\", ""))
+        #TODO: Remove or replace following condition
+        #it is senseless in the case we need intelligent
+        #result set. Better condition would be to place
+        #freshest brain into result
+        if url in result.keys():
+            continue
+        #TODO: replace brain with only data necessary to 
+        #generate sitemap
+        result[url]=ob
+    return result
+
+def additionalURLs(self):
+    """Add URLs to sitemap that arn't objects"""
+    res = []
+    plone_home = getToolByName(self, 'portal_url').getPortalObject().absolute_url()
+    root = self.getPhysicalRoot().absolute_url()
+
+    props = getToolByName(self,'portal_properties')
+    try:
+        URLs = props.googlesitemap_properties.urls
+    except AttributeError:
+        URLs = []
+
+    add_zope = re.compile('^/')
+    add_plone= re.compile('^[^http://|https://|\\\]')
+    for url in URLs:
+        if add_zope.match(url):
+            res.append(root+url)
+        elif add_plone.match(url):
+            res.append(plone_home+'/'+url)
+        else:
+            res.append(url)
+    return res
+
+"""workflows & co"""
+def getWorkflowTransitions(self,workflow_id):
+    pw = getToolByName(self,'portal_workflow')
+    wf = pw.getWorkflowById(workflow_id)
+    if not wf:
+        return None
+    return wf.transitions.values()
+
+def setWorkflowTransitions(self,transitions):
+    """set workflow transitions properties"""
+    portal_workflow = getToolByName(self, 'portal_workflow')
+    transmap = {}
+    for key in transitions:
+        if key.find('#')>0:
+            ids = key.split('#')
+            wfid = ids[0]
+            if not wfid in transmap.keys():
+                transmap[wfid]=[]
+            transmap[wfid].append(ids[1])
+    for wfid in transmap.keys():
+        workflow = portal_workflow.getWorkflowById(wfid)
+        if config.ping_googlesitemap not in workflow.scripts.objectIds():
+            workflow.scripts.manage_addProduct['ExternalMethod'].manage_addExternalMethod(
+                                config.ping_googlesitemap,
+                                'Ping sitemap',
+                                'qPloneGoogleSitemaps.ping_googlesitemap',
+                                config.ping_googlesitemap)
+        transitions_set = transmap[wfid]
+        for transition in workflow.transitions.values():
+            trid = transition.id
+            tras = transition.after_script_name
+            if (tras == '') and (trid in transitions_set):
+                #set
+                after_script = config.ping_googlesitemap
+            elif (tras == config.ping_googlesitemap) and not (trid in transitions_set):
+                #reset
+                after_script = ''
+            else:
+                #avoid properties set
+                continue
+            transition.setProperties(title=transition.title,
+                                     new_state_id=transition.new_state_id,
+                                     after_script_name=after_script,
+                                     actbox_name=transition.actbox_name)
Index: qPloneGoogleSitemaps/trunk/version.txt
===================================================================
--- qPloneGoogleSitemaps/trunk/version.txt	(revision 3713)
+++ qPloneGoogleSitemaps/trunk/version.txt	(revision 1)
@@ -1,1 +1,1 @@
-0.8.6 dev
+0.5
