This week's book giveaway is in the Reactive Progamming forum.
We're giving away four copies of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams and have Adam Davis on-line!
See this thread for details.
Win a copy of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams this week in the Reactive Progamming forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

starting a new topic or a user is posting a reply

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hm, good thing to have. Just edit the file templates/default/post_form.htm. There, take a look in how I manage to know when is a reply and when is a new topic, and use some freemarker expression to write the proper message to the user.

Just to make your job more easy, you can use variable "isNewPost" or check if some instance of a topic exists. Something like



or



Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to tell if the user is starting a new topic or a user is posting a reply

Which java file I should modify ?

Thanks
[originally posted on jforum.net by Anonymous]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have done it in my site. Thanks to Rafael's guide(and fix the bug).
Here's the steps:
1.edit the file templates/default/post_form.htm, find the following:

change it into

2.add a new key "PostForm.replyTopic" in jforum_xx_XX.properties
3.restart Tomcat

BTW. If you want to do more, you can add a PrivateMessage.replyTopic for distinguish starting or replying a Private Message and follow the same step to finish it.
[originally posted on jforum.net by andowson]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply.

What I want is,

1 . registered users have different rights to do different things. I need to add another database table.

2. an Anonymous can post a reply, but no rights to start up a new topic.

�?� think I need to change the source code. which java file is for this ?

Thanks
[originally posted on jforum.net by Anonymous]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, you can start from net/jforum/view/forum/PostAction.java,
read the edit(boolean preview, Post p) as a start.
[originally posted on jforum.net by Anonymous]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Anonymous wrote:

1 . registered users have different rights to do different things. I need to add another database table.



This is a quite vague question ;)

Anonymous wrote:
2. an Anonymous can post a reply, but no rights to start up a new topic.



There is support for this in the CVS version ( which may be unstable, of course ).

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, I have 2 simple questions (bare with me, I am new to this):

a) Where do i find which version of the Jforum is installed on our site?
b) We have disabled anonymous posts because of the huge spam traffic... However, when a visitor without an account reads a post, there is no "post reply" button at the bottom. If they wish to reply, they need to figure out that they must select the register tab on the top, etc...
  • Can we enable the appearance of the button down below that would then lead users to the registration page right away?
  • Is there another way to keep anonymous posts and avoid spam?


  • Thanks for your help!
    [originally posted on jforum.net by jiji]
     
    F is for finger. Can you stick your finger in your nose? Doesn't that feel nice? Now try this tiny ad:
    Java file APIs (DOC, XLS, PDF, and many more)
    https://products.aspose.com/total/java
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!