[Silva-general] SilvaForum: preview comment problem

Marc Petitmermet petitmermet at mat.ethz.ch
Wed Dec 30 11:18:44 CET 2009


On 30. Dez 2009, at 30. Dez 2009|10:19 Uhr, Kit BLAKE wrote:

> On 30 Dec 2009, at 09:39, Marc Petitmermet wrote:
> 
>> Dear all
>> 
>> For an internal project i'm using SilvaForum. I have a problem that  
>> once previewed comments cannot be edited again because they are  
>> simply gone as soon as one clicks on the "edit comment" button; it's  
>> like the Forum is just reloaded. To reproduce:
>> 
>> 1. click on "add comment" button
>> 2. add some text
>> 3. click "preview" button
>> 4. click "edit comment" button
>> 5. the comment is gone and we are back at 1.
> 
> Could you look in the source at step 4? Before you click. You should  
> find a textarea, containing the content, in the source. When you click  
> on "edit comment" you actually go back, but the content should be there.

yep:

<textarea class="store" name="text" id="text" rows="10" cols="68"
   onfocus="window.focussed_form_field = this">this is a test comment
</textarea>

after clicking on the "edit comment" the information "this is a test comment" is nowhere in the source.


>> I think that this problem has something to do with my layout because  
>> when I don't use any layout, i.e. default Silva layout, there is no  
>> such problem.
> 
> In the html of the forum, you should find the this for the edit  
> comment button:
> onclick="history.go(-1);return false;"

yes.

> Although, there is some weird trick with wrapping the button in a href  
> to make it non-js compatible. But if you see an empty textarea, that's  
> not the problem.
> 
>> What I noted is that when I click on the "preview" button in my  
>> layout, the "Post a new comment" section below the Forum gets closed  
>> (which I is quite nice;-). This is not the case when using the  
>> default layout; the "Post a new comment" remains open.
> 
> That's doable, good idea.
> 
>> This is on SilvaForum 0.3.2, Silva 2.1.7. I've followed the  
>> INSTALL.txt to the core but is seems that I still miss something.  
>> Any suggestions from anybody?
> 
> Which browser?

All of them (FF, IE, Safari, always latest version). It seems that the "add comment" action is not registered, therefore, "history.go(-1)" does not work and goes back to the forum page.

If I can't get this working properly, do you have some nice css-hacks to just make the preview button disappear? I've already made the emoticons disappear with css because they are not appropriate for this forum (#emoticons {display:none;}).

Another note: adding a topic has also a preview feature. But there is no "edit topic" but a "clear" button and the "Post a new topic" section below the table remains open with the added text so that one can just change the same topic again. So it seems that there are two different procedures for the more or less same task (but only one works for me).

(BTW, I also have problems styling the "Author | Comment" row in a topic; the background color is linked with the border color of the table. I rather like to have white background and black borders. It would be nice to be able to style it individually like the "Author | Topic" row.)

Regards,
Marc

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2429 bytes
Desc: not available
Url : http://lists.infrae.com/pipermail/silva-general/attachments/20091230/23cfc43f/attachment.bin 


More information about the silva-general mailing list