あおばす

hero1.gif

This is quintagroup.theme.schools top portlets manager
パーソナルツール
ログイン
現在位置: ホーム 管理人備忘録 anonymousにコメント追加を許可

anonymousにコメント追加を許可

| タグ:

ログインユーザでない不特定者にコメントを許可する。

ploneは記事毎に許可を与える事が出来るが、一括で出来たような記憶があるが現在は分からない。

コメント入力時、不要なパスワード卵があるのでスクリプトとフォームを修正する。

/portal_skins/plone_form_scripts

パスワードチェックカットと、ユーザー名をそのまま取得。

#if username or password:
#   # The user username/password inputs on on the comment form were used,
#    # which might happen when anonymous commenting is enabled. If they typed
#   # something in to either of the inputs, we send them to 'logged_in'.
#    # 'logged_in' will redirect them back to this script if authentication
#    # succeeds with a query string which will post the message appropriately
#    # and show them the result.  if 'logged_in' fails, the user will be
#    # presented with the stock login failure page.  This all depends
#    # heavily on cookiecrumbler, but I believe that is a Plone requirement.
#    came_from = '%s?subject=%s&body_text=%s' % (req['URL'], subject, body_text)
#    came_from = url_quote_plus(came_from)
#    portal_url = context.portal_url()
#    return req.RESPONSE.redirect(
#        '%s/logged_in?__ac_name=%s'
#        '&__ac_password=%s'
#        '&came_from=%s' % (portal_url,
#                               url_quote_plus(username),
#                               url_quote_plus(password),
#                               came_from,
#                               )
#        )
# if (the user is already logged in) or (if anonymous commenting is enabled and
# they posted without typing a username or password into the form), we do
# the following
#creator = mtool.getAuthenticatedMember().getId()
creator = username

 

 

 

/portal_skins/plone_forms

パスワード部分をコメントアウト。

 

<!--

<dl class="portalMessage warning">

<dt i18n:translate="">

Info

</dt>

<dd i18n:translate="legend_note_reply_anonymous">

You are not logged in. You may optionally enter your

username and password below. If you don't enter anything,

this comment will be posted as 'Anonymous User'.

</dd>

</dl>

-->

<!--

<div class="field">

<label for="password" i18n:translate="label_password">Password</label>

<input type="password"

id="password"

name="password"

value="" alt="Password" title="Password"

size="40"

i18n:attributes="title label_password; alt label_password;" />

</div>

-->