Enable Kupu for anonymous in Ploneboard
This article shows how to configure Plone to allow anonymous users use Kupu visual editor in Ploneboard.
About
Lets assume we have a Plone site with Kupu and Ploneboard. There is a forum and its workflow is set to be moderated or visible for all. This means that anybody can post there. But the problem is that now Plone doesn't have member record and cannot figure out default editor. And when it happens standard text area is visible. Ugly.
So lets make this look nicer in 3 easy steps.
1. Customize wysiwyg_support template
Go to portal_skins/kupu_plone and find wysiwyg_support template. Customize it and find a code snippet:
<div ="wysiwygEditorBox">
<tal:block define="macros here/kupu_library_tool/getWysiwygmacros;">
<metal:block ="macros/wysiwygEditorBox">
</metal:block>
</tal:block>
</div>
Replace with:
<div ="wysiwygEditorBox">
<metal:block ="here/portal_skins/kupu_plone/kupu_wysiwyg_support/macros/wysiwygEditorBox"/>
</div>
2. Customize contentUsesKupu script
Go to portal_skins/kupu_plone and find contentUsesKupu Python script. Customize it and find a code snippet:
if not tool.isKupuEnabled(REQUEST=REQUEST,
context=context,
fieldName=fieldname):
return False
Replace with:
if not tool.isKupuEnabled(allowAnonymous=True,
REQUEST=REQUEST,
context=context,
fieldName=fieldname):
return False
3. Update styles registry
Go to portal_css and edit Condition field for 3 CSS files:
- kupustyles.css,
- kupuplone.css,
- kupudrawerstyles.css
python:portal.kupu_library_tool.isKupuEnabled(
allowAnonymous=True,
REQUEST=request)
Top downloads
| My CV | 1224 |
| FlashVideo-0.8.2.tar.gz | 1034 |
| ZPTDebugger-1.1.2.tar.gz | 845 |
| ZProtx-1.0.tar.gz | 411 |
| TextIndexNG2-win-py2.4.zip | 25 |