mini
bb
®
Fight the automated spam - protect your miniBB-forums,
getting the Captcha addon!
Click here to read more
.
Community Forum
|
Forums
|
File Bank
|
Sign Up
|
Reply
|
Search
|
Statistics
|
Manual
|
miniBB Community Forum
/
Master Class
/
Building a custom message form
Anonymous
Guest
#1
|
Posted: 21 Sep 2006 02:28
Reply
I want to replace the new topic form with a custom form that has several input fields other than just the $postText. I want those fields to be output in the post where $postText is now. Any ideas on how to get started on this?
Paul
CEO
#2
|
Posted: 21 Sep 2006 07:14
Reply
Try to look at templates/main_post_form.html variable. Probably, this is the file you need to edit and add your new fields. Don't forget that you also need to parse these fields on input; use handlers in bb_plugins.php.
Anonymous
Guest
#3
|
Posted: 22 Sep 2006 21:03
Reply
Thanks. But I want this to be a custom form that is different from the main_post_form. So in other words, one form for new topics and the current one for replies. Unfortunately it appears that main_post_form serves both functions now. Any thoughts on how to change this or if anyone else has tried something similar?
Anonymous
Guest
#4
|
Posted: 22 Sep 2006 21:10
Reply
Scratch that last post - I figured out how to do it using the 1st page & separate topic form addon. But I am having trouble parsing the new form elements when they come in - how do I do that?
Paul
CEO
#5
|
Posted: 24 Sep 2006 03:19
Reply
What do you mean exactly by "having trouble"?
Anonymous
Guest
#6
|
Posted: 24 Sep 2006 20:50
Reply
Sorry, let me re-phrase: I am able to have a custom form with an additional field called "var1". I am able to display the "var1" field on the form and manipulate the code so that the value in the form gets inserted into a new column in the _posts table. But I am having trouble getting that new "var1" column to display in the post itself. Guessing I have somehow use the db_simpleSelect function?
Paul
CEO
#7
|
Posted: 25 Sep 2006 03:31
Reply
Take a look at some of our addons (Avatars, for example), and you will notice here is a function called parseMessage(). You can use this function for parsing addional message results.
Alternatively, if you want to destroy the core, edit bb_func_vthread.php file and paste additional fields in DB request. Assign them to variables like any others, and paste them as variables into main_posts_cell.html template. This will display fields in the thread listing.
Your reply
»
Username
»
Password
You are welcome to post anonymously by entering a nickname with no password (if that nickname has not been taken by another member) or by leaving both fields empty. If you have a forums membership account, you can also sign in from this page without posting a message, or sign in and post at once.
Before posting, be sure your message is compliant with our
forum posting rules
. If not, it may be locked or deleted with no explanation.
News & Announcements
FAQ
How To
Bugs
Other
Official Addons and Solutions
Custom Tutorials and Modifications
Master Class
Specific
Re-cycled
Suggestions
Testimonials
qwerty
Online now: Guests - 32
Members - 0
Most users ever online: 191 [24 Dec 2007 14:33]
Guests - 191 / Members - 0
Forums are powered by
miniBB
®