Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 12-13-2007, 08:07 AM
mjname mjname is offline
 
Join Date: Jan 2007
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Custom Feilds when posting new thread, questionaire

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/newt...=newthread&f=3
Reply With Quote
  #2  
Old 12-13-2007, 10:53 AM
UberMensch UberMensch is offline
 
Join Date: Jun 2006
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Do you mean something like this?



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.
Reply With Quote
  #3  
Old 12-14-2007, 12:19 AM
mjname mjname is offline
 
Join Date: Jan 2007
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #4  
Old 12-14-2007, 08:06 AM
UberMensch UberMensch is offline
 
Join Date: Jun 2006
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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:
Code:
		<!-- message area -->
		<div class="smallfont">$vbphrase[message]:</div>		
		$messagearea
		<!-- / message area -->


		$posticons
Replace With:
Code:
<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.
Reply With Quote
  #5  
Old 12-20-2007, 08:47 AM
awdawd awdawd is offline
 
Join Date: Jun 2007
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

no work
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:27 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04059 seconds
  • Memory Usage 2,202KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (5)postbit
  • (5)postbit_onlinestatus
  • (5)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete