Kung FuKung Fu

Fujian White Crane Kung Fu

ZopeZope

What I have and am doing with Zope

PhotosPhotos

Photoalbum, both old and new.

ReceptsamlingenReceptsamlingen

In Swedish only. About my "Collection of Recipes" website.

Contact meContact me

My contact details and how to contact me.

  Mobile version of this page Mobile version of this page


 

You're viewing blogs from Plone only.

View all different categories

2nd of August

Interesting lesson learnt on shortcut taking in usability

In Plone 2.1 (don't know about other versions) the default date input used by the CalendarWidget uses 5 dropdowns (year, month, day, hour, minute) plus a little popup calendar which you can use to avoid flipping the dropdowns. When the underlying value is not set the dropdowns look like this:

 2007/--/-- [#] --:--

where the little [#] is the popup calendar widget. The year 2007 is preselected because they assume that most of the cases you'll just be selecting a month and a day since is highly likely that the year will be that of today's year. So far so good.


>Read the whole text (193 more words)

22nd of March

Learning about ATFolder's security

I just learned something interesting about ATFolders in Plone. For the non-Plone readers, an ATFolder is Plone's take on a normal Zope Folder but based on Archetypes instead. To begin with, Plone overrides the function manage_addFolder which means that if you do context.portal_url.getPortalObject().manage_addFolder(...) in Plone you get an ATFolder instead of a normal Folder. Fair enough.

The problem I had was that ATFolders override the manage_delObjects() function not only is it's security defined in the container, it also does a security check within. I don't know why but I'm sure there's a reason. What this means is that you can't use some_at_folder.manage_delObjects([...]) in External Methods and expect no Unauthorized errors.

I solved this security problem I had by instead creating a normal Zope folder by doing it this way instead:

 portal_root = self.portal_url.getPortalObject()
 adder = portal_root.manage_addProduct['OFSP'].manage_addFolder
 adder('PlainZopeFolder')

6th of March

Lukasz Lakomy's new website

http://www.llakomy.com/ 

Lukasz Lakomy is the latest fulltime addition to Fry-IT, my company. Lukasz is a kickass Plone and Zope developer and has just launched his own little website which is done in Plone.

The content is still a bit on the light side but he's already managed to start hosting his wonderful little ZPTDebugger which has now reached a 1.0 release. This product wasn't created because it was possible but because he actually needed it. Applications that come from that kind of motivation always end up being much more useful.

Keep up the good work colleague!

28th of April

TAL here hack in Plone

Had to do a very useful and ugly but also smart hack in Plone today.

In the portal root I have a Document with Id index_html that the client is changing with the WYSIWYG editor. What I wanted to do was to change some METAL calls in the <head> tag of that one document. In fact, what I wanted to do was to cover up the left hand column which is done this way:

   <head>
        <metal:override fill-slot="column_one_slot" />
  </head>

The problem was that the index_html Document is a Document so I can't edit it's TAL. I could have customized document_view.pt but that would have applied for all Document objects in the site. Here's how I solved it:


>Read the whole text (177 more words)