• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Bug fix for deleting posts

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Rafael,
The 2.0.2 version has a bug on deleting more than 2 posts of 1 topic. It works well if I delete post from the last to the first. But if I delete from the first one. Then it will show a post not found error. According to your post https://coderanch.com/t/574454 , the code lack the check of setFirstPostId() and getMinPostId() in TopicModel.java.
I have fixed it up. Here is my work around.

:arrow: In net/jforum/model/TopicModel.java add two method declaraions

:arrow: In net/jforum/drivers/generic/TopicModel.java add two method implementations:

:arrow: in net/jforum/view/PostAction.java modify the delete() method:

:arrow: add two sql script to WEB-INF/classes/config/database/generic_queries.sql

That's all. Add this fix to the CVS please.
[originally posted on jforum.net by andowson]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok.. looks reasonable.
I'll put some new buttons in the end of the page ( as phpbb does ) for topic moving, deleting etc..

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks, I added the code to cvs.

Now, here is a conceptual question: I was thinking of removing the entire topic when the first message was deleted. It has pros and cons. What do you think?

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Rafael,
In my opinion, removing the entire topic when the first message was deleted this function could be assign to the forum administrator. Then he/she could clean up a thread more quickly and easily.

And for normal users, they should be restricted to only delete his posts.

Sometimes, there could be some good idea follow up the first post. For example, at the first, one guy say that how about have a web mail integration with private message in this forum. Then we could send private message through email or just leave it at the forum. In the following up discussion, there could be someone proposes a way to implement it or more improved idea, ex. integrate with SMS, maybe has commercial potential. If the first guy delete his post to keep his idea privately. Then the following posts should be kept. Maybe we cound just delete the text of his posts or just show "Post is deleted" on the original position. And the reader would know that there used to be a (first) post, but later deleted.

So, I suggest you implement them in two seperate button, like a deletePost and deleteTopic. Only admin user can use deleteTopic.
[originally posted on jforum.net by andowson]
 
PI day is 3.14 (march 14th) and is also einstein's birthday. And this is merely a tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic