Skip to content. | Skip to navigation

Personal tools
Sections
You are here: Home Topics rules
Navigation
 

rules

Nov 18, 2009

Deliverance, tips and tricks

by Irene Capatti — last modified Nov 18, 2009 08:00 AM

When to use regular expressions and "abort".

The attempt to use Deliverance on a Plone site which must also provide users all the functionality of the backend could be more difficult than expected.
Should be evaluated each case involving the opening of a popup or overlay javascript, because without the appropriate rules of match would get a beautiful Internal Server Error or a very nice "zoom effect" (in the popup will be reloaded the entire site) .

How to solve the problem?

Putting on top of our file rules.xml the match for all addresses that should not be filtered by Deliverance.

For the popup Related Items:

<match path="regex:^(.*/VirtualHostRoot|)/.*referencebrowser_popup$" abort="1" /> <match path="regex:^(.*/VirtualHostRoot|)/.*referencebrowser_popup$" abort="1" />


To view in a news  the image in original size:

<match path="regex:^(.*/VirtualHostRoot|)/.+/image_view_fullscreen" abort="1" /> <match path="regex:^(.*/VirtualHostRoot|)/.+/image_view_fullscreen" abort="1" />


For some of the basic tools of TinyMCE, including uploading files and images:

<match path="regex:^(.*/VirtualHostRoot|)/tinymce-upload$" abort="1" />

<match path="regex:^(.*/VirtualHostRoot|)/.+/plone(image|link)\.htm$" abort="1" />

<match path="regex:^(.*/VirtualHostRoot|)/.*/plugins/table/(table|row|cell|merge_cells)\.htm$" abort="1" />

<match path="regex:^(.*/VirtualHostRoot|)/.+/advanced/(source_editor|anchor)\.htm$" abort="1" />


Every time a new TinyMCE tool is enabled not forget to make sure it works properly ;)

Understood the principle, is easy to customize and improve the regular expression to fit our needs!