• GitHub
  • Documentation
  • Discord
  • Tip
search
  • chevron_right Threads
  • label Dev Development

Add fields to threads

cfchenr
Jan. 6, 2019
chat_bubble_outline 8
  • check_circle
  • link
    cfchenr
    Members 5 posts
    Jan. 6, 2019, 12:11 a.m. Jan. 6, 2019, 12:11 a.m.
    link

    Hello!

    How i can add fields to threads when any user create new thread?
    For example, i need that user choice one location through by a list of options.

  • link
    rafalp
    Project Lead 2027 posts
    Jan. 6, 2019, 12:24 a.m. Jan. 6, 2019, 12:24 a.m.
    link

    Hey,

    This is not possible in Misago. You would have to fork the project and implement this feature yourself.

    Is there a reason you can't use subcategories to let users do pick the location? Eg:

    • Used cars category
    • San Francisco
    • New York
    • Los Angeles

    cfchenr likes this.

    favorite 1

  • link
    cfchenr
    Members 5 posts
    Jan. 6, 2019, 12:29 a.m. Jan. 6, 2019, 12:29 a.m.
    link

    I plan to adapt the forum to a place where users can share sporting events with friends and through the forum can find people interested in participating.

    For example, when they create a new thread they would have to fill fields like: price, maximum number of people, location, etc.

    In this case the category would be the sport they intend to practice, for example, football, futsal, volleyball, etc.

  • link
    coco
    Members 53 posts
    Jan. 6, 2019, 11:10 a.m. Jan. 6, 2019, 11:10 a.m.
    link

    best way, make a plugin that hook on the page

    cfchenr likes this.

    favorite 1

  • link
    cfchenr
    Members 5 posts
    Jan. 6, 2019, 11:15 a.m. Jan. 6, 2019, 11:15 a.m.
    link

    Hello, and thank you for your reply!

    I have to create this directory (misago_docker/misago/theme/templates/misago/thread/thread.html) to replace the .html file, right?

  • link
    coco
    Members 53 posts
    Jan. 6, 2019, 11:32 a.m. Jan. 6, 2019, 11:32 a.m.
    link
    @cfchenr

    Hello, and thank you for your reply!

    I have to create this directory (misago_docker/misago/theme/templates/misago/thread/thread.html) to replace the .html file, right?

    maybe, but since you want store the sport type, so have to do more not only the html

    cfchenr likes this.

    favorite 1

  • link
    cfchenr
    Members 5 posts
    Jan. 6, 2019, 11:36 a.m. Jan. 6, 2019, 11:36 a.m.
    link

    In my case, the sport type is a category

    I just need add fields like price, max people, location

  • link
    rafalp
    Project Lead 2027 posts
    Jan. 6, 2019, 4:24 p.m. Jan. 6, 2019, 4:24 p.m.
    link
    check_box

    Marked as best answer by Jan. 7, 2019, 1:04 a.m..

    You'll need to fork Misago and do following:

    • extend JSON API to support additional fields.
    • add additional step to thread starting process that sets extra fields on thread.
    • modify UI (written in React.JS) to allow users to set and see those fields from new thread form.

    cfchenr likes this.

    favorite 1

  • link
    cfchenr
    Members 5 posts
    Jan. 7, 2019, 1:05 a.m. Jan. 7, 2019, 1:05 a.m.
    link

    I will try, but i do not know how to do some things. I'm going to spend some time trying to figure out how to do what you suggested

arrow_upward Go to top
  • This site uses cookies to gather statistical data for use in traffic analysis.
  • GitHub
  • Documentation
  • Discord
  • Tip
  • Terms of service
  • Privacy policy
powered by misago