MyBB Community Forums

Full Version: Predefined Post Form
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I am trying to find a plugin, failing this some code which will allow me to make a predefined posting form in some forums on my board to replace the normal 'Post a new thread' form. For example I want to be able to have text fields to make a link submission form with:

Website Name:
URL:
Category:
Description:

And shows up in the post as such with the above text in bold and the inserted text in normal font.

Also I want to be able to do this just for the thread submission and not subsequent posts however if possible I would also like to be able to have a form for subsequent posts with different options.

I already have xthreads if this helps?

Thanks,
Kyle
Then XThreads can do the first post - it can even do the second posts a bit, but not with drop down fields. if all you want is text, then try this thread on mybbhacks:

http://mybbhacks.zingaburga.com/showthread.php?tid=289

If you still struggle reply here.
I found that thread previously but quite simply just did not understand it and to be honest yes I do need a dropdown menu so that members can choose the category their link belongs in so we can move them into the correct sub-forum, failing this it would be even better if the threads can automatically go to the correct sub-forum from the selection in the dropdown menu.

Also it's not just a link submission system I want, there are other predefined forms I want in different forums.

Thanks
XThreads Custom fields work only on the FIRST POST of a given thread. The replies do not have the fields.

If you have something like a submissions forum (uploads/showcase whatever) then EACH submission must be a new thread, and the first post contains those details.

If that is all you want then it can be done with XThreads. If you want the replies to have access to custom fields then that is not really possible.

What part of the tutorial on MyBB Hacks were you struggling with?
I'm not understanding how I actually add the custom fields.
Still need help with this Smile.
You need to add the custom fields in the - Custom thread fields area in the ACP.

Assuming you have XThreads installed then you should see it on the left hand menu in ACP "Custom Thread Fields" - then just follow the tutorial I linked.
Oh ok I've now found that, it's good but not quite what I'm looking for.

What I'd like is a predefined form that replaces that current one and when the form is completed and submitted the information entered on the form is posted in the post.
You can build a form using XThreads, that is just an example, the contents of the field and template can be whatever you want it to be.

XThreads Custom Fields can be applied to forums and you can make template sets that are called by the settings in the forums tab.

Once installed there is a tab in the configuration panel of the ACP called Custom Thread Fields and in each forum in the manage forums tab there will be some extra options when you open a forum to edit it.

Custom Fields: This is where you set the type of field which the user will need to fill in. You say which forums it will show in and who can use it and view it.

Forum Settings: One of those is to set a prefix for a forum. If you set a prefix on a forum then you can apply specific templates to that forum. If you don't have a template that matches a prefix then the standard template for that theme will be used.

Templates: These go in your Global templates. An example of a prefix template is:

lee_forumdisplay_thread

This template would be used as the forumdisplay_thread template in any forum where I had set the XThreads prefix to lee. Lets say I did that on Forum 2.
If I set an XThreads field to display on Forum2 in the Custom Thread Fields settings and reference that field in the lee_forumdisplay_thread template then when I view Forum2 I will see that field - once it is filled in by a user.

This is where the postbit_first and editpost_first templates come in. An XThread custom field can only be used in the first post of a thread. You need to ensure that in the newthread the {$extra_threadfields} is in the template. Then, when you make a new post in Forum2 you should see your new field, you can fill it in and it will display.

I hope that helps.
Actually yes it does help, thanks Smile.

One thing now though and I'm even sure if there's anything I can do about it is that I really need to display a separate form for those replying to the thread (obviously quick reply will be removed on these threads) in certain forums, what are the chances of getting this to happen?
Pages: 1 2