Skip to content. | Skip to navigation

Personal tools

Navigation

You are here: Home / Tips / Configuration Settings

Configuration Settings

Site Setup 和 Management Interface 是 Plone 管理系統設定值的介面。

圖檔縮放尺寸設定

Python Package Index (PyPI)

Plone Products Directory

OpenComparison

broken products

Time Zone 時區設定的說明

Wiki Support: Plone 4 Plone 5 Wiki Comparison

如何在程式碼裡寄送信件 建立 Maildir

自動新增內容 collective.recipe.plonesite

Change Password from a SubSite

Create Folders Automatically When Members Login collective.logbook: Advanced Exception Logging 討論是否成為核心功能

collective.mass_subscriptions: Batch Adding Users via CSV Form

collective.cron: based on plone.app.async and plone.app.registry

Task Scheduling for Plone 4

Purging Old CMFEditions Versions

Configlet Icon for Dexterity: missing before Plone 4.0.2

Adding Test Users Porgrammatically Using collective.recipe.plonesite

parts =
    ...
    plonesite

[plonesite]
recipe = collective.recipe.plonesite
profiles = my.project:default
post-extras = ${buildout:directory}/acceptance-tests/add_test_users.py
# add_test_users.py

import logging
logger = logging.getLogger('collective.recipe.plonesite')

test_users = [
    # (username, password, group),
    ('username1', 'password1', 'group1'),
    ('username2', 'password2', 'group2'),
    ('username3', 'password3', 'group3'),
    ]

for username, password, group in test_users:
    if username not in portal.acl_users.getUserIds():
        try:
            portal.portal_registration.addMember(username, password)
            portal.portal_groups.addPrincipalToGroup(username, group)
        except ValueError:
            logger.warn('The login name "%s" is not valid.' % username)
        except KeyError:
            logger.warn('The group "%s" is not valid.' % group)

z3c.autoinclude: includeDependencies

在 configure.zcml 裡指定 <includeDependencies package="." /> 後,會自動引入 setup.py 裡的 install_requires 所列的模組,像 plone.app.transmogrifier 範例,這行為是 z3c.autoinclude 的功能,在 Plone 3.3 之後內建,另一種方式,是使用 <include package="plone.app.dexterity" /> 之類的設定方式,逐行加進相依關係。在安全程度要求高的場合,使用 <five:registerPackage package="." /> 會比較好。新版 mr.migrator 也納入 autoinclude.zcml。

先利用 <grok:grok package="." /> 來註冊 schemata, view, form 資訊,

再註冊 GenericSetup profile 讓 type installable

Cleanup Left Over Interfaces

要讓新的設定值生效,需要遵守下列的原則:

* 想要在 Shell 環境馬上看到執行效果,

plone.reload

http://plone.org/documentation/manual/theme-reference

http://plone.org/documentation/kb/working-with-resourceregistries

http://pypi.python.org/pypi/plone.app.jquerytools

http://plone.org/documentation/kb/how-to-create-a-plone-3-theme-product-on-the-filesystem

Plone 4.3 and Plone 5 both use the master branch of plone.app.upgrade, so you don't need to cherrypick anything.

http://plone.org/documentation/kb/customization-for-developers

http://plone.org/documentation/kb/benefit-now-from-using-genericsetup-and-zope-3-technologies

所謂「請神容易送神難」,安裝 theme 比較容易,但是解除安裝的工作較複雜,多數的 theme 模組未必準備好 uninstall profile 內容,造成解除安裝之後,仍有後遺症要處理,同樣的,反覆安裝模組的過程,也可能造成 GenericSetup 錯誤。

https://weblion.psu.edu/trac/weblion/wiki/PloneThreeThemeUninstallProfile

http://plone.org/documentation/kb/genericsetup/creating-an-uninstall-profile  講到 property 還未支援 uninstall,這代表自行放 properties.xml 到 uninstall 目錄裡無效嗎? 初步測試結果是如此。

http://plone.org/products/quintagroup.themetemplate

http://www.sixfeetup.com/blog/tips-for-writing-a-solid-plone-theme

http://www.google.com.tw/search?q=content+item+default+view

disable Mail Server SMTP Postfix Ubuntu 16.04: 自備 Domain Name 可選 Internet 轉寄情況可選 Smarthost

$ sudo dpkg-reconfigure postfix

Setting up ssl-cert (1.0.37) ...
Setting up postfix (3.1.0-3) ...
Adding group `postfix' (GID 118) ...
Done.
Adding system user `postfix' (UID 112) ...
Adding new user `postfix' (UID 112) with group `postfix' ...
Not creating home directory `/var/spool/postfix'.
Creating /etc/postfix/dynamicmaps.cf
Adding group `postdrop' (GID 119) ...
Done.
setting myhostname: cmc-studies
setting alias maps
setting alias database
changing /etc/mailname to cmcstudies.org
setting myorigin
setting destinations: $myhostname, cmcstudies.org, cmc-studies, localhost.localdomain, localhost
setting relayhost:
setting mynetworks: 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
setting mailbox_size_limit: 0
setting recipient_delimiter: +
setting inet_interfaces: all
setting inet_protocols: all
/etc/aliases does not exist, creating it.
WARNING: /etc/aliases exists, but does not have a root alias.

Postfix is now set up with a default configuration.  If you need to make changes, edit
/etc/postfix/main.cf (and others) as needed.  To view Postfix configuration
values, see postconf(1).

After modifying main.cf, be sure to run '/etc/init.d/postfix reload'.

Running newaliases
Processing triggers for libc-bin (2.23-0ubuntu3) ...
Processing triggers for systemd (229-4ubuntu7) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for ufw (0.35-0ubuntu2) ...

Gmail Bouncing Postfix Mail Reverse PTR Record Alias

Member Default Folder

Turn on/off Folder Creation and Change Folder Name

角色: 系統管理員 內容管理員 程式設計員 視覺設計員

ZODB read-only

z3c.baseregistry to create a registry specific to one add-on.

Dexterity Developer Manual

Plone 的 type 分成兩種,一是 container,一是 item,前者又稱為 folderish,後者又稱為 non-folderish,在 one-to-many (一對多) 的關係裡,通常會設計成 container (也就是 "one") 包含 item (也就是 "many") 的型式。

mr.developer 協助管理程式碼專案 (how?) (有了它,就不必指定 develop = src/* ?)

buildout.dumppickedversions 協助追蹤 buildout 挑選的版本

<!-- The personal bar -->
<browser:viewlet
name="plone.personal_bar"
manager="plone.app.layout.viewlets.interfaces.IPortalFooter"
class=".viewlets.PersonalBarViewlet"
layer=".interfaces.IThemeSpecific"
permission="zope2.View"
/>

Plone3_Theming p.138

<!-- The personal bar -->

<browser:viewlet

name="plone.personal_bar"

manager="plone.app.layout.viewlets.interfaces.IPortalFooter"

class=".viewlets.PersonalBarViewlet"

layer=".interfaces.IThemeSpecific"

permission="zope2.View"/>

這表示使用自製模組的 PersonalBarViewlet 類別,再編輯 browser/viewlets.py 檔案。

https://code.3ca.org.uk/browser/plone/communitythings

http://plone.293351.n2.nabble.com/wysiwyg-editor-not-showed-in-plone-app-jquerytools-overlay-tp6401361p6401361.html

SchoolTool 有實作 "學年"

http://svn.quintagroup.com/products/quintagroup.blog.star/trunk/quintagroup/blog/star/browser/  實作"依照時間尋找 blogitem"

http://svn.quintagroup.com/products/SimpleBlog/trunk/skins/SimpleBlog/simpleblog_portlet_macros.pt 實作"依照時間顯示 blog"

Package Upgrading

-from zope.component.exceptions import ComponentLookupError
+try:
+ from zope.component.interfaces import ComponentLookupError
+except ImportError:
+ # Zope < 2.10
+ from zope.component.exceptions import ComponentLookupError
-from zope.app.event.interfaces import IObjectEvent
+from zope.component.interfaces import IObjectEvent

memcache

eggs = python-memcached lovely.memcached
python-memcached==1.44, lovely.memcached==0.1.4, zope.app.intid==3.7.1, zope.intid==3.7.2, zope.keyreference==3.6.2,

validation

-from Products.validation.interfaces import ivalidator
+from Products.validation import validation
+from Products.validation.interfaces.IValidator import IValidator
-__implements__ = (ivalidator,)
+__implements__ = IValidator

example 1: https://trac.bubblenet.be/changeset/1176

example 2: http://dev.plone.org/collective/changeset/56087

from Products.ATContentTypes.content.base import updateAliases

http://svn.plone.org/svn/collective/PloneRSSPortlet/trunk/ not Plone 4 compatible?

http://www.mail-archive.com/openplans-svn-commits@lists.openplans.org/msg12291.html example for Extensions/setup.py and GenericSetup

http://hinatokouki.blog.ocn.ne.jp/blog/2010/06/zope_no5_cmfcon.html

from Products.CMFPlone.migrations.migration_util import safeEditProperty
ImportError: No module named migrations.migration_util

-from Products.CMFPlone.migrations.migration_util import safeEditProperty
+from plone.app.upgrade.utils import safeEditProperty

Member Default Folder/p

plone.reloadeggs = python-memcached lovely.memcached

manager="plone.app.layout.viewlets.interfaces.IPortalFooter"

不能使用的 ID: local, search