PDA

View Full Version : Custom forms mod


ascroft
07-15-2010, 11:05 AM
Hi there.

I am looking for some assistance to control thread postings and replies in forums.

I want to control what is entered to be placed in to certain fields ( relates to houses so say type, # of bedrooms, etc.), and what people can comment on depending on what user group they belong to.... (if std user all responses in controlled fields, if trusted user, field plus free from text)

I have a document on requirements available.

Thank you.

Mark

midnz
07-27-2010, 08:11 AM
Try this addon, it's awesome!

Easy Forms v4.x - Create a form or multiple forms without php or html knowledge (https://vborg.vbsupport.ru/showthread.php?t=234385)

Here's a copy of my New Thread Button redirects to Forms plugin which compliments bananalive (https://vborg.vbsupport.ru/member.php?u=223075)'s Easy Forms hack. Hopefully it might give you some ideas to work with.

Selecting the New Thread button in forums 21 & 89 causes Form 2 to generate.
Selecting the New Thread button in forum 96 causes Form 5 to generate.
Selecting the New Thread button in forum 95 causes Form 9 to generate.

You might need to have separate forms & forums (controlled by usergroup permissions) to achieve what you want. All of your forms can be outputted to a single forum or thread if you wanted that. Each form asks you where you want the results posted to or the results can be stored in your database for viewing.


Title: Redirect New Thread to Form (or whatever title helps you remember what it is for)
Hook Location: newthread_start
Execution Order: 5
Plugin PHP Code:
if (in_array($forumid, array(21,89))) {
header( 'Location: http://www.vcclan.org/forums/misc.php?do=form&fid=2' ) ;
}
if ($forumid==96)
{
header( 'Location: http://www.vcclan.org/forums/misc.php?do=form&fid=5' ) ;
}
if ($forumid==95)
{
header( 'Location: http://www.vcclan.org/forums/misc.php?do=form&fid=9' ) ;
}

ascroft
07-31-2010, 07:03 AM
Thanks - will be looking at shortly. I def need to something to handle both postings and replies to postings in certain forums with custom forms.

BarracodE
09-15-2010, 05:29 PM
Thank you Midnz. Exactly what I was trying to do.

Chuck