Changeset 601

Show
Ignore:
Timestamp:
10/24/06 02:24:54
Author:
mylan
Message:

Add 'overview' tab in ZMI to add/update canonical_url property for portal.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • qPingTool/branches/plone-2.5/Extensions/Install.py

    r600 r601  
    2525                                        action='string:${portal_url}/'+TOOL_ID+'/folder_contents', 
    2626                                        appId=PROJECTNAME,  permission=ManagePortal, imageUrl='group.gif') 
    27     controlpanel_tool.unregisterConfiglet('prefs_set_canonical') 
    28     controlpanel_tool.registerConfiglet(id="prefs_set_canonical", name='Canonical URL setting' \ 
    29         ,category='Products', action='string:${portal_url}/prefs_set_canonical' \ 
    30         ,appId=PROJECTNAME,  permission=ManagePortal, imageUrl='group.gif') 
    3127 
    3228    # Add 'portal_actionstool' to action provider list, if not yet exist 
     
    6359    controlpanel_tool = getToolByName(portal, 'portal_controlpanel') 
    6460    controlpanel_tool.unregisterConfiglet(TOOL_ID) 
    65     controlpanel_tool.unregisterConfiglet('prefs_set_canonical') 
    6661 
    6762    removeSkin(portal, ('ping_tool.pt',)) 
  • qPingTool/branches/plone-2.5/PingTool.py

    r600 r601  
    11#from Globals import InitializeClass 
     2import os 
    23from Products.CMFCore.ActionProviderBase import ActionProviderBase 
    34from Products.CMFPlone.PloneFolder import PloneFolder 
     
    7677    ) 
    7778 
     79    manage_options =  ( 
     80            {'label' : 'Overview', 'action' : 'manage_overview'}, 
     81        ) + ATFolder.manage_options 
     82 
     83    manage_overview = PageTemplateFile(os.path.join('www','overview'), globals()) 
     84    manage_overview.__name__ = 'manage_overview' 
     85    manage_overview._need__name__ = 0 
    7886 
    7987    def pingFeedReader(self,context): 
     
    9098        canonical_url = getCanonicalURL(context) 
    9199        if canonical_url: 
    92             #return "failure", "Please setup 'canonical_url' property for your Plone site" 
    93100            url = context.portal_url.getRelativeContentURL(blog) 
    94101            url = canonical_url + url 
    95102        else: 
    96             url = blog.absolute_url()   
     103            return status, 'Ping is impossible.See portal_pingtool.' 
     104 
    97105        ps = getToolByName(context,'portal_syndication') 
    98106        rss_templates = {'Blog':'','RSS1':'/RSS','RSS2':'/RSS2'}