Changeset 439
- Timestamp:
- 08/03/06 08:39:23
- Files:
-
- qPingTool/trunk/Extensions/Install.py (modified) (1 diff)
- qPingTool/trunk/PingTool.py (modified) (7 diffs)
- qPingTool/trunk/__init__.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
qPingTool/trunk/Extensions/Install.py
r438 r439 45 45 safeEditProperty(np,'metaTypesNotToList', meta_types, 'lines') 46 46 47 sp = getattr(pp,'site_properties') 48 sp.typesUseViewActionInListings += ('PingInfo',) 47 49 48 49 50 print >> out, "\nSuccessfully installed %s." % PROJECTNAME 50 51 return out.getvalue() qPingTool/trunk/PingTool.py
r438 r439 9 9 from Products.CMFCore.CMFCorePermissions import ManageProperties 10 10 from Acquisition import aq_base 11 11 from Products.CMFCore.utils import _getViewFor 12 from Products.PageTemplates.PageTemplateFile import PageTemplateFile 12 13 from Products.XMLRPCMethod.XMLRPCMethod import RPCThread, XMLRPCMethod 13 14 from Products.CMFCore.utils import getToolByName … … 15 16 16 17 _marker = [] 18 17 19 def modify_fti(fti): 18 20 fti['title'] = 'Portal Ping Tool' … … 20 22 fti['filter_content_types'] = 1 21 23 fti['icon'] = 'tool.gif' 24 fti['immediate_view'] = 'view' 25 fti['default_view'] = 'view' 26 22 27 actions = ( 23 28 { 'id': 'view', … … 27 32 'category':'object', 28 33 }, ) 29 fti['actions']=tuple(actions) 34 aliases ={'(Default)':'folder_listing','view': 'folder_contents'} 35 36 fti['aliases'] = aliases 37 fti['actions'] = tuple(actions) 30 38 31 32 class PingTool(BaseFolder, PloneFolder, ActionProviderBase): #, BaseFolder): 39 class PingTool(BaseFolder, PloneFolder, ActionProviderBase): 33 40 """This tool serve for operation with ActionInfo objects 34 41 """ … … 36 43 schema = BaseSchema 37 44 filter_content_types = 1 38 allowed_content_types = ['PingInfo']45 allowed_content_types = ('PingInfo',) 39 46 global_allowed = 0 40 47 41 48 meta_type = archetype_name = portal_type = 'PingTool' 42 43 49 44 50 __implements__ = (IOrderedContainer,) … … 53 59 , category='folder' 54 60 , visible=1 55 ) 56 , 61 ), 57 62 ) 58 59 63 60 64 def pingFeedReader(self,context): … … 69 73 #return "failure", "Please setup 'canonical_url' property for your Plone site" 70 74 url = context.portal_url.getRelativeContentURL(blog) 71 url = canonical_url + url 75 url = canonical_url + url 72 76 else: 73 77 url = blog.absolute_url() qPingTool/trunk/__init__.py
r438 r439 4 4 from Products.CMFCore.DirectoryView import registerDirectory 5 5 import os, os.path 6 import PingInfo, PingTool 6 import PingInfo, PingTool 7 7 from config import * 8 8 … … 15 15 16 16 def initialize(context): 17 18 17 utils.ToolInit("PingTool", tools=tools, product_name=PROJECTNAME, icon=TOOL_ICON, 19 18 ).initialize(context) 20 19 21 20 content_types, constructors, ftis = process_types(listTypes(PROJECTNAME), PROJECTNAME) 22 21
