• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

starting a new topic or a user is posting a reply

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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]
     
    Attractive, successful people love this tiny ad:
    a bit of art, as a gift, that will fit in a stocking
    https://gardener-gift.com
    reply
      Bookmark Topic Watch Topic
    • New Topic