Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Form Hack Details »»
Form Hack
Version: 4.1, by Abe1 Abe1 is offline
Developer Last Online: Jun 2010 Show Printable Version Email this Page

Category: New Posting Features - Version: 3.6.x Rating:
Released: 09-14-2006 Last Update: 04-23-2008 Installs: 1216
Uses Plugins Template Edits
 
No support by the author.

Form Hack 4.1


Features:

Ever wanted an online form that a user can fill out, which when submitted gets:
  • Posted into a new thread in a forum of your choice
  • Create a new poll in the new thread with options of your choice
  • Posted as a reply in an existing thread of your choice
  • PMed to you or someone else
  • Emailed to an email address you specify
  • Choose to redirect to the post, thread or forum, or a custom thank you message
  • Choose to redirect to edit post
  • See a preview before they submit

Or any combination or all of the above?

Well, this is the hack for you!

You can use this for:
  • Moderator Applications
  • Quiz Submit Form which gets PMed to a moderator
  • Contact Form that goes to PM, email or thread
  • Guests to apply to be members
  • Report a Moderator form that goes as a PM to you
  • Guests can PM you for whatever reason
  • Order form to buy things
  • Donation form
  • News or Articles submissions that can go straight to a thread

Or anything you like - this hack is totally customizable via the AdminCP.

The beauty of this hack is that once you install this hack, to make a new form all you need to do is copy the main hook, rename it to whatever you want, edit the variables in the hook, and you have a totally new form!!! You do not need to touch the templates again, but can always create new ones and use different templates for different forms.

Format of the form:
  • One main input question
  • 3 Radio buttons Choice questions
  • 3 Normal text input questions
  • 1 Drop down menu
  • 3 Check boxes
  • 1 Long answer question
  • 1 VB message editor text box question
  • Upload attachments

This is customizable via the hook.

Also:
  • You can set the usergroups you want access to this form.
  • Depending on your forum permissions, if the new thread is in a public forum, members can reply to it. This hack allows a form to submit the new thread or post wherever you want it to go.
  • Force the user to answer all questions.

INSTALLATION
Easy - takes only a few minutes:
  • Import the XML into products. (admin cp -> Plug-in System -> Manage Products -> Add/Import Product)
  • Edit the main plug-in - the instructions are all inside the hook itself, in the top half. Follow the instructions carefully!
  • To get to the form, go to: /newthread.php?do=form (change "form" to the name of your form if you have few)

Done!

Use this hack to make as many forms as you like!

Enjoy!

Updates:

Version 4.0: (09/15/2006)
  • Ported over for vb3.6
  • Send to multiple emails.
  • Send multiple PMs.
  • Parse emails for BBCode
  • And finally, ATTACHMENTS!

Version 4.1: (04/24/2008)
  • Fixed for vb 3.6.10
  • Small bug fixed.
  • List of the 2 quick edits are in the zip file so you don't have to start making a form from scratch.

MAKE SURE YOU CLICK INSTALL!
You will get an email when a new version is released.

Abe1 with rights from Dr Erwin Loh

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #942  
Old 03-21-2008, 06:34 AM
trevanh trevanh is offline
 
Join Date: Dec 2007
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I set up 4 forms and got them all working beautifully. Then after a few weeks, they stopped working. Now, even logged in as admin01, I get the following error (when I try to simply access any of the forms):

you do not have permission to access this page. This could be due to one of several reasons:

Your user account may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.


I'm not sure what happened. They only thing I can think of is that I installed vBAdvanced CMPS, passiveVid, and GTUserCP since the forms were working.

Does anybody know what the cause of this problem may be? Is it a conflict with one of the other programs? I don't know where to go from here...

Help!
Reply With Quote
  #943  
Old 03-21-2008, 06:20 PM
Brundlefly Brundlefly is offline
 
Join Date: Oct 2007
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by trevanh View Post
I set up 4 forms and got them all working beautifully. Then after a few weeks, they stopped working. Now, even logged in as admin01, I get the following error (when I try to simply access any of the forms):

you do not have permission to access this page. This could be due to one of several reasons:

Your user account may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.


I'm not sure what happened. They only thing I can think of is that I installed vBAdvanced CMPS, passiveVid, and GTUserCP since the forms were working.

Does anybody know what the cause of this problem may be? Is it a conflict with one of the other programs? I don't know where to go from here...

Help!
This looks like what you'd get if you have garbage in your $formforumid variable. Verify the forum ids you have the forms posting into.
Reply With Quote
  #944  
Old 03-21-2008, 06:58 PM
trevanh trevanh is offline
 
Join Date: Dec 2007
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here's what I see in the plugin manager for each and every form I've created:

$formforumid = "34";

That forum does exist, and functions normally.

Is that what you were referring to? Not sure where else to look for garbage...

This is a forum that only admins are allowed to view, but I do want users from specified groups to be able to post in that forum. So, in the plugin, I added the usergroups that I want to have access to the form, and for that forum, I allowed those usergroups permission to post but not view.

What am I missing?

So, to reiterate, even admin01 cannot so much as VIEW these forms- permissions errors every time.
Reply With Quote
  #945  
Old 03-21-2008, 07:43 PM
Deepdog009's Avatar
Deepdog009 Deepdog009 is offline
 
Join Date: Dec 2004
Location: Almost out of PHP TZone
Posts: 485
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by trevanh View Post
Here's what I see in the plugin manager for each and every form I've created:

$formforumid = "34";

That forum does exist, and functions normally.

Is that what you were referring to? Not sure where else to look for garbage...

This is a forum that only admins are allowed to view, but I do want users from specified groups to be able to post in that forum. So, in the plugin, I added the usergroups that I want to have access to the form, and for that forum, I allowed those usergroups permission to post but not view.

What am I missing?

So, to reiterate, even admin01 cannot so much as VIEW these forms- permissions errors every time.
trevanh its probably another MOD that is affecting your forms...

Did U recently add anything new 2 your products???

Several folks had the same issue and unistalling permission MODs fixed it...

Also could be your usergroup permissions,,, maybe...

Im still recovering from a vehicle accident and haven't done much vbulletin troubleshooting,,, but if time permits and my back getts better, I will post more...

Good Luck 2 ya
Reply With Quote
  #946  
Old 03-21-2008, 08:39 PM
trevanh trevanh is offline
 
Join Date: Dec 2007
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for your reply, Deepdog009.

Besides this Form Hack, I have the following mods installed:

passiveVid
vBAdvanced CMPS
GTUserCP

I just made them inactive but the problem remains.

Perhaps there's something that I need to run in diagnostics or maintenance to get the changes to take?
Reply With Quote
  #947  
Old 03-27-2008, 03:05 PM
vbuser99 vbuser99 is offline
 
Join Date: Jul 2004
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice work. This is what I was looking for.
Reply With Quote
  #948  
Old 03-27-2008, 03:27 PM
trevanh trevanh is offline
 
Join Date: Dec 2007
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by trevanh View Post
Thanks for your reply, Deepdog009.

Besides this Form Hack, I have the following mods installed:

passiveVid
vBAdvanced CMPS
GTUserCP

I just made them inactive but the problem remains.

Perhaps there's something that I need to run in diagnostics or maintenance to get the changes to take?
OK, we found the problem:

We had to modify each Form we'd created in vBulletin with the following change (first the original code, then the new code):

ORIGINAL CODE
////////////////////////////////////////////////////////////////////////////////////////////////////
//USERGROUPS ALLOWED
//You can add or remove usegroups that are ALLOWED to use this form by changing the numbers below in the array.
//To enable this feature, remove the '//' before the 'if'.
////////////////////////////////////////////////////////////////////////////////////////////////////

if (!in_array($vbulletin->userinfo['11'], array(5,6,7,11))) print_no_permission();



NEW CODE
////////////////////////////////////////////////////////////////////////////////////////////////////
//USERGROUPS ALLOWED
//You can add or remove usegroups that are ALLOWED to use this form by changing the numbers below in the array.
//To enable this feature, remove the '//' before the 'if'.
////////////////////////////////////////////////////////////////////////////////////////////////////

// Use the line below to customize the allowed groups access to this form
$allowed_group_ids = array(6,7,11,12,13);

$form_view_permission = false;
$member_group_id_array = explode(',', $vbulletin->userinfo['membergroupids']);
if (in_array($vbulletin->userinfo['usergroupid'], $allowed_group_ids)) {
$form_view_permission = true;
}
foreach ($member_group_id_array as $membergroupid){
if(in_array($membergroupid, $allowed_group_ids)){
$form_view_permission = true;
}
}
if ($form_view_permission == false) print_no_permission();

This change allows users to access the Forms if their primary or member group ids match the list specified in the $form_view_permission array.
Reply With Quote
  #949  
Old 03-30-2008, 07:27 AM
Deepdog009's Avatar
Deepdog009 Deepdog009 is offline
 
Join Date: Dec 2004
Location: Almost out of PHP TZone
Posts: 485
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by trevanh View Post
OK, we found the problem:

We had to modify each Form we'd created in vBulletin with the following change (first the original code, then the new code):

ORIGINAL CODE
////////////////////////////////////////////////////////////////////////////////////////////////////
//USERGROUPS ALLOWED
//You can add or remove usegroups that are ALLOWED to use this form by changing the numbers below in the array.
//To enable this feature, remove the '//' before the 'if'.
////////////////////////////////////////////////////////////////////////////////////////////////////

if (!in_array($vbulletin->userinfo['11'], array(5,6,7,11))) print_no_permission();



NEW CODE
////////////////////////////////////////////////////////////////////////////////////////////////////
//USERGROUPS ALLOWED
//You can add or remove usegroups that are ALLOWED to use this form by changing the numbers below in the array.
//To enable this feature, remove the '//' before the 'if'.
////////////////////////////////////////////////////////////////////////////////////////////////////

// Use the line below to customize the allowed groups access to this form
$allowed_group_ids = array(6,7,11,12,13);

$form_view_permission = false;
$member_group_id_array = explode(',', $vbulletin->userinfo['membergroupids']);
if (in_array($vbulletin->userinfo['usergroupid'], $allowed_group_ids)) {
$form_view_permission = true;
}
foreach ($member_group_id_array as $membergroupid){
if(in_array($membergroupid, $allowed_group_ids)){
$form_view_permission = true;
}
}
if ($form_view_permission == false) print_no_permission();

This change allows users to access the Forms if their primary or member group ids match the list specified in the $form_view_permission array.
*********************************************

That's great you found the issue and resolved it...

Its usually something that U missed or overlooked that's causing the problems...

I will be posting more and troubleshooting more in the near future...

Good Luck 2 U


*********************************************
Reply With Quote
  #950  
Old 03-30-2008, 04:31 PM
ionian ionian is offline
 
Join Date: Mar 2008
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you very much for this usefull hack
Reply With Quote
  #951  
Old 03-31-2008, 07:18 PM
Haltech Haltech is offline
 
Join Date: Mar 2008
Location: Ca
Posts: 68
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I don't quite understand this step:
#
# Edit the main plug-in - the instructions are all inside the hook itself, in the top half. Follow the instructions carefully!

where do I go?

Thanks
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 08:11 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.05377 seconds
  • Memory Usage 2,330KB
  • Queries Executed 26 (?)
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
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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_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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete