PDA

View Full Version : Custom Feilds when posting new thread, questionaire


mjname
12-13-2007, 08:07 AM
I was wondering if anyone out there has had experience in customizing custom feilds so when people submit a new thread they are actually filling out a questionaire in a specific format that will create a sticky, sort of like the mod section of vb.org? Currently there is a hack thats called Custom Thread Feilds I have it installed and can't find url. Basically it loads a custom feilds section just under the message window in a new thread. It's actually very brilliant especially for when the thread is acting more like a questionaire.

However the hack is a little limited so I was wondering about actually just writting a custom form and having it call an include file when certain forums id call up a new thread. I think this would give me greator formatting control.

This will help with multiple people entering data in a forum that needs to be searchable by the keywords entered. Everyone seems to have their own spelling. It's for dive sites in Australia. I also want to make sure when people are talking about sharks they are all talking about the same thing. IE sharks (non-aggressive) or sharks (aggressive) big difference in planning the dive. :)

Here is a link that you can see what I'm talking aobut, it's a great hack but I need to make it much better does anyone have any down and dirty ideas? or have they done something like this already and they care to share?
http://au.2dogsdiving.com/forum/newthread.php?do=newthread&f=3

UberMensch
12-13-2007, 10:53 AM
Do you mean something like this?

http://www.cubeupload.com/files/dea466sample.png

That's the same hack, but I've edited the template with a conditional to see if the mod is enabled in that forum. If so, display the custom fields only. If not, display the usual message.

mjname
12-14-2007, 12:19 AM
Sort of! actually thats pretty brilliant and can see why you use it.

Actually I think that would work really well. Did you comment it well? Also are you on 3.6.8.pl2. Oh the 60 million dollare question, are you willing to share it? Even if you aren't willing to share it's still cool. I need to figure out how to basically do the same thing.

I just need to have it so I can do two or three optional forms not just one.

UberMensch
12-14-2007, 08:06 AM
I can certainly tell you how I did it.

I'm using a slightly modified (working!) version of the Custom Thread Fields mod, which I'll attach below.

First off, some template changes are needed. In the New Posting Templates > newthread:

Find:

<!-- message area -->
<div class="smallfont">$vbphrase[message]:</div>
$messagearea
<!-- / message area -->


$posticons


Replace With:

<if condition="$custom_form">
<br />
<table cellpadding="1" cellspacing="$stylevar[cellspacing]" border="0" width="100%">
$custom_form
</table>
<br />
<span style='font-size: x-small; color: #FF0000'>*</span> Required Field<br /><br />
<else />
<!-- message area -->
<div class="smallfont">$vbphrase[message]:</div>
$messagearea
<!-- / message area -->


$posticons
</if>


In the Custom Thread Field options (in the vBulletin Options list), set the "Template Changes" option to "No".

What all this does is creates a conditional which checks if the forum being posted to (new topic only) has any custom fields. If it does, the template shows ONLY the custom fields and not the original message box.

The product below also fixes the <br /> tags being inserted between each question, as this only works in HTML-enabled forums.

awdawd
12-20-2007, 08:47 AM
no work