Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Done: Saving custom inputs along with a post

edited January 2011 in Vanilla 2.0 - 2.8

By editing my theme I was able to extend the inputs with my custom inputs when creating a new post. Now I'd love to save the content of these inputs with the post.

I am submitting an array of inputs
(<input name="bla[]"><input name="bla[]"><input name="bla[]">)
and I guess it would be most effective to save it as a serialized string into a new row of the gdn_discussion-database.

Although I tried to get an overview of how class.postcontroller.php works I wasn't able to determine where and how the posted values are stored in the database. Could someone assist? ^_^

Kind regards.


Okay, I had a look into how the IP-Tracking-plugin works and there it was comprehensible very easily.


  • Options
    Dr_SommerDr_Sommer Dr. of tender Programing ;) ✭✭
    edited September 2013

    Hi... ääähh... Bitch.... :D:D

    Still there? I tried to examine the IP-Tracking-Plugin, but this is still to High for me... ;(

    I would like to add an Event Date to my "New Discussions"... I accomplished to add the necessary Fields as shown in the Picture, but how can i SAVE the DATE to the DB? Also how to READ it back FROM the DB?

    The Point of this would be to make a Calender with all Eventposts wich includes also a way to add yourself to the Event.

    It would be nice fore some Help here, that could show me the basics and I would try to move from there....

    Thanx in advance... ;)


    Dr. Sommer

  • Options
    R_JR_J Ex-Fanboy Munich Admin

    Take a look at that code I've started but never kept on working on that although I think an event calendar is a must have for a forum...

    If you keep on working on it and have questions, don't hesitate do ask them here or sent me a message. Gerne auch in Deutsch, wenn's mal schnell gehen soll ;-)

  • Options
    hgtonighthgtonight ∞ · New Moderator

    The basic idea is to hook in to the post controller and display your new form items. Then you hook in to appropriate model (discussion in the case) and validate/save your information to the db.

    If you look at the source of my Discussion Polls plugin, you can see an example of it.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • Options
    Dr_SommerDr_Sommer Dr. of tender Programing ;) ✭✭

    Ok, Thanx for the guides.... I'll try to look into it.. ;)

Sign In or Register to comment.