Olá,

se não me engano existe um campo no discussion_reply_ form:

<input type="hidden" name="Creator" value=""
                   tal:attributes="value member/getUserName" />

altera por este:
<input name="Creator" id="Creator" value="" tal:attributes="value 
request/Creator|request/title_override|nothing;" />

Ai o usuário tera que preencher o campo com seu nome. Desta forma ele estará 
pegando o nome da pessoa que está comentando.

Se for da forma que entendi funcionará.

Atenciosamente, 

Jeferson Lelis.




________________________________
De: F.katia <fkat...@gmail.com>
Para: zope-pt@yahoogrupos.com.br
Enviadas: Segunda-feira, 1 de Fevereiro de 2010 16:34:10
Assunto: [zope-pt] Alteração no Comentário 

  
Boa tarde, 
Trabalho na Intranet Senado e Prodasen e preciso alterar o comentário do Plone, 
em vez de aparecer o login gostaria que aparecesse o nome de que fez o 
comentário.
Fui ao template discussion_reply_ form e troquei o fullname pelo displayName 
porém essa troca não funcionou.
Alguém poderia me auxiliar?

Utilizo  o Plone 2.5.5,  Zope (Zope 2.9.9-final, python 2.4.5)

Codigo fonte do discussion_reply_ form
<html xmlns:tal="http://xml.zope. org/namespaces/ tal"
xmlns:metal= "http://xml.zope. org/namespaces/ metal"
metal:use-macro= "here/main_ template/ macros/master"
i18n:domain= "plone">


<body>

<metal:block fill-slot="top_ slot"
tal:define=" dummy python:request. set('disable_ border',1) " />

<metal:block fill-slot="sub" />

<div metal:fill-slot= "main"
tal:define=" errors options/state/ getErrors;
thread python:putils. getDiscussionThr ead(here) ;
discussable python:thread[ 0];
replies python:thread[ 1:]">

<tal:discussable define="template python:getattr( here, discussable. getLayout( 
), None);
macros template/macros | nothing;
main_macro macros/main | nothing;
showDiscussable python:main_ macro;
template template_id"
>

<div class="comment" 
tal:condition= "showDiscussable "
tal:define=" here python:discussable" >
<div metal:use-macro= "main_macro" />
</div>
</tal:discussable>

<tal:thread tal:repeat=" reply replies">
<tal:block tal:define=" level repeat/reply/ index">
<div class="comment"
tal:attributes= "style python:'margin- left:'+str( (int(level) +1)*2)+'em' ">
<h3>
<tal:block replace="structure portal/discussionit em_icon.gif" />
<span tal:replace= "reply/pretty_ title_or_ id">Comment title</span>
</h3>
<div class="documentByLi ne"
tal:define=" creator reply/Creator;
anonymous_creator python:creator= ='Anonymous User';
mi python:not anonymous_creator and mtool.getMemberInfo (creator) ;
fullname python: mi and mi['fullname' ] or creator;" >
<span i18n:translate= "label_comment_ by">Posted by</span>
<span tal:content= "fullname"
tal:condition= "not:anonymous_ creator"> Poster Name</span>
<span i18n:translate= "label_anonymous _user"
tal:condition= "anonymous_ creator"> Anonymous User</span>
<span i18n:translate= "label_commented _at">at</ span> 
<span tal:replace= "python:toLocali zedTime(reply. ModificationDate (),
long_format= 1)">8/23/ 2001 12:40:44 PM</span>
</div>
<div class="commentBody"
tal:content= "structure reply/CookedBody" >
This is the body text of the comment.
</div>
</div> 

</tal:block>
</tal:thread>

<form name="edit_form"
method="post"
action="talkback"
tal:attributes= "action string:$here_ url/$template_ id">

<fieldset>

<legend i18n:translate= "legend_add_ comment"> Add comment</legend>
<p i18n:translate= "description_ add_comment" >
You can add a comment by filling out the form below. Plain text
formatting.
</p>

<input type="hidden" name="Creator" value=""
tal:attributes= "value member/getUserName" />

<div class="portalMessag e"
tal:condition= "isAnon">

<tal:block replace="structure here/info.gif" />

<p i18n:translate= "legend_note_ reply_anonymous" >
Note: you are not logged in. You may optionally enter your
username and password below. If you don't enter your
username and password below, this comment will be posted as
the 'Anonymous User'.
</p>

<div class="field" >

<label for="username" i18n:translate= "label_name" >Name</label>

<input name="username"
id="username"
value="" alt="Username" title="Name"
size="40"
tabindex=""
i18n:attributes= "title label_name; alt label_username; "
tal:attributes= "tabindex tabindex/next; " />

</div>

<div class="field" >

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

<input type="password"
id="password"
name="password"
tabindex=""
value="" alt="Password" title="Password"
size="40"
i18n:attributes= "title label_password; alt label_password; "
tal:attributes= "tabindex tabindex/next; " />

</div>

</div>

<div class="field"
tal:define=" error errors/subject| nothing;"
tal:attributes= "class python:test( error, 'field error', 'field')">

<label for="subject" i18n:translate= "label_subject" >Subject< /label>

<span class="fieldRequire d" title="Required"
i18n:attributes= "title title_required; "
i18n:translate= "label_required" >(Required) </span>

<div tal:content= "error">Validati on error output</div>

<input name="subject"
id="subject"
value=""
size="40"
tabindex=""
tal:attributes= "value request/subject| request/title_ override| nothing;
tabindex tabindex/next" />

</div>

<div class="field"
tal:define=" error errors/body_ text|nothing; "
tal:attributes= "class python:test( error, 'field error', 'field')">

<label for="body_text" i18n:translate= "label_comment" >Comment< /label>

<span class="fieldRequire d" title="Required"
i18n:attributes= "title title_required; "
i18n:translate= "label_required" >(Required) </span>

<div tal:content= "error">Validati on error output</div>

<textarea name="body_text"
id="body_text"
cols="40"
rows="8"
maxlength="1500" 
onkeyup="return ismaxlength( this)"
tabindex="" 
tal:content= "request/ body_text| request/text_ override | nothing"
tal:attributes= "tabindex tabindex/next" 
></textarea>

</div>

<div class="formControls ">

<input class="context"
tabindex=""
type="submit"
value="Save"
name="form.button. Save"
i18n:attributes= "value label_save;"
tal:attributes= "tabindex tabindex/next;
name string:discussion_ reply:method; " />

</div>
<input type="hidden" name="form.submitte d" value="1" />

</fieldset>

</form>

</div>

</body>
</html>


 


      
____________________________________________________________________________________
Veja quais são os assuntos do momento no Yahoo! +Buscados
http://br.maisbuscados.yahoo.com

Responder a