vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   New Posting Features - Form Hack (https://vborg.vbsupport.ru/showthread.php?t=126676)

Abe1 09-14-2006 10:00 PM

Form Hack
 
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

flomsen 09-15-2006 06:43 AM

1000 thx, just what i have wating for :)


how can user set there owns Title: ? now it show Generic Form

and i need some help to add a form to set in picture link, and that will show pic in post.


sorry for my english


/Flomsen

Hornstar 09-15-2006 07:57 AM

Yeah i think i remember your old one of this, it was really good. Thanks.

Spinball 09-15-2006 08:18 AM

Thanks Abe.
Question, though. Despite uploading an attachment, it isn't appearing in the post. What can I do to track down the problem?

Lizard King 09-15-2006 10:37 AM

Nice hack Abe :)

Reece^B 09-15-2006 10:52 AM

Great Hack.

beduino 09-15-2006 11:43 AM

tks abe1!!!!!!!!
all the best
beduino
ps. why i can't 'nominated this hack' when i click in link? :(

Abe1 09-15-2006 11:44 AM

Quote:

Originally Posted by beduino
tks abe1!!!!!!!!
all the best
beduino
ps. why i can't 'nominated this hack' when i click in link? :(

You can only nominate once a month. Feel free to do it next month.

Abe1 09-15-2006 11:45 AM

Quote:

Originally Posted by Spinball
Thanks Abe.
Question, though. Despite uploading an attachment, it isn't appearing in the post. What can I do to track down the problem?

There are 2 template edits to make the attachements work. Make sure you did both. You can also test it by clicking 'preview'.

Snake 09-15-2006 12:39 PM

Just what I was looking for.

mschvili 09-15-2006 12:54 PM

Wow. You're the man, Abi. Now I can start up my support service. Been wating for this update first.

A question, I don't want to go through an update of our vBulletin yet. So, would v4.0 Form Hack work also on vBulletin v3.5?

Matti.

|oR|Greg 09-15-2006 01:04 PM

Important FYI - If you have "Guest Post Image Verification" turned on, posting to a thread will not work because the form hack doesn't integrate the Image Verification system.

|oR|Greg 09-15-2006 01:32 PM

Oh and attachments don't work for unregistered users.

Abe1 09-15-2006 01:55 PM

Quote:

Originally Posted by mschvili
Wow. You're the man, Abi. Now I can start up my support service. Been wating for this update first.

A question, I don't want to go through an update of our vBulletin yet. So, would v4.0 Form Hack work also on vBulletin v3.5?

Matti.

I'm not sure. The attachment structure may be differant.

|oR|Greg 09-15-2006 02:21 PM

Abe, How do I format the results of the form without allowing the use of HTML in threads? I want to bold the questions once it's posted to the thread and of course in the preview... but I can't use BBCode in a template, and HTML in the form doesn't display in the thread... ?

|oR|Greg 09-15-2006 02:57 PM

Also, when I turn on the variable to require that all questions are answered... even though I answer them all, it tells me I haven't.

Nuguru 09-15-2006 03:14 PM

Helly Everyone,

It's great to hear that Form Hack now has the ability to accept attachments on this new update but I am running vb 3.5.4. and intend on staying with this vb version for a while.

Can this updated version work on vb 3.5.4.? If not, can you update a version of Form Hack to work with vb 3.5.4. because I really like this mod but would like it to be able to allow attachments?



Thank You,


Nuguru :)

Abe1 09-15-2006 05:08 PM

Quote:

Originally Posted by |oR|Greg
Abe, How do I format the results of the form without allowing the use of HTML in threads? I want to bold the questions once it's posted to the thread and of course in the preview... but I can't use BBCode in a template, and HTML in the form doesn't display in the thread... ?

You can use BBCode in the answer template. Just make sure the end of a varable not is next to a bbcode.

Abe1 09-15-2006 05:10 PM

Quote:

Originally Posted by |oR|Greg
Also, when I turn on the variable to require that all questions are answered... even though I answer them all, it tells me I haven't.

If you removed any of the defaut test, you have to remove the varibles from the check also.

Also, the vb editor back automaticlly check to make sure you have the min. amount of car. in the box.

Abe1 09-15-2006 05:11 PM

Quote:

Originally Posted by Nuguru
Helly Everyone,

It's great to hear that Form Hack now has the ability to accept attachments on this new update but I am running vb 3.5.4. and intend on staying with this vb version for a while.

Can this updated version work on vb 3.5.4.? If not, can you update a version of Form Hack to work with vb 3.5.4. because I really like this mod but would like it to be able to allow attachments?



Thank You,


Nuguru :)

I'm not sure if the attahments work the same in vb3.5 as they do in vb3.6. You would have to copy the plug-in and template and test it out.

RMS-Chef 09-15-2006 06:39 PM

Thanks for the update Abe.
I have no use for attachments with my forms so I am sticking to the previous v3.5.x release with my v3.6.x forum. It's working fine.

dirtycrow 09-15-2006 07:08 PM

hmmm. . . what am i doing wrong?

i wanted to get rid of all the radio buttons and drop downs.

|oR|Greg 09-15-2006 07:19 PM

You have to edit the hook, and both templates in order to make it work.

dirtycrow 09-15-2006 07:23 PM

also, i was wondering, if i wanted to use this as a order form, where would I enter the code for a paypal button?

dirtycrow 09-15-2006 07:29 PM

Quote:

Originally Posted by |oR|Greg
You have to edit the hook, and both templates in order to make it work.

both templates? but what happens when i create more then one form?

i followed the directions "// To add more then one form, copy this whole text, and creat a new plug-in with the hook location 'newthread_start'.
// After, change the form name. You can't have 2 forms with the same name."

dirtycrow 09-15-2006 07:33 PM

wait. . . i have to change the templates for form and form answer? but then all my forms from the point would have to have the same lay out?

dirtycrow 09-15-2006 07:50 PM

never mind, i got it.

this is an EXCELLENT! mod, not the freindliest to create new forms, but it is perfect for what i needed. thank you!

Abe1 09-15-2006 08:09 PM

Quote:

Originally Posted by RMS-Chef
Thanks for the update Abe.
I have no use for attachments with my forms so I am sticking to the previous v3.5.x release with my v3.6.x forum. It's working fine.

There is an option in the plug-in to enable or disable attachments.

Wired1 09-15-2006 08:23 PM

I realize this may be out of the scope of this hack, or maybe in its future, but it can't hurt to ask:

Would it be possible to add on to this where there is an additional button on the postbit (say, net to reply) or maybe one on the threadbit (?) where a user (preferably the thread creator or the post creator) can hit a button (linked to the form) that passes the post id or thread id to the form so that it is passed on to the end recipient (in my case, it would be for emails only).

This way the recipient would be able to reference the post / thread id, which may contain more information than what is included in the form.

If this is something outside of the future scope of the form, or not to be included in an upgrade, would you mind if I created an add-on to your hack to enable this functionality?

Abe1 09-15-2006 08:46 PM

Quote:

Originally Posted by Wired1
I realize this may be out of the scope of this hack, or maybe in its future, but it can't hurt to ask:

Would it be possible to add on to this where there is an additional button on the postbit (say, net to reply) or maybe one on the threadbit (?) where a user (preferably the thread creator or the post creator) can hit a button (linked to the form) that passes the post id or thread id to the form so that it is passed on to the end recipient (in my case, it would be for emails only).

This way the recipient would be able to reference the post / thread id, which may contain more information than what is included in the form.

If this is something outside of the future scope of the form, or not to be included in an upgrade, would you mind if I created an add-on to your hack to enable this functionality?

Look at my sig. I have a hack that lets you edit the "new thread" link.

Wired1 09-15-2006 09:05 PM

Quote:

Originally Posted by Abe1
Look at my sig. I have a hack that lets you edit the "new thread" link.

sorry, I'm not seeing the link you mean.

Wongod 09-15-2006 09:07 PM

I just installed the hack but the attachments part of the form is failing. I found that it's failing this check: if ($forumperms & $vbulletin->bf_ugp_forumpermissions['canpostattachment'] AND $vbulletin->userinfo['userid'] AND !empty($vbulletin->userinfo['attachmentextensions']))

What do I need to configure in order to make that statement true? I am able to post attachments in a regular "newthread" so it seems that it should be configured correctly as far as that goes...

Abe1 09-15-2006 09:34 PM

Quote:

Originally Posted by Wired1
sorry, I'm not seeing the link you mean.

https://vborg.vbsupport.ru/showthread.php?t=102923

Abe1 09-15-2006 09:34 PM

Quote:

Originally Posted by Wongod
I just installed the hack but the attachments part of the form is failing. I found that it's failing this check: if ($forumperms & $vbulletin->bf_ugp_forumpermissions['canpostattachment'] AND $vbulletin->userinfo['userid'] AND !empty($vbulletin->userinfo['attachmentextensions']))

What do I need to configure in order to make that statement true? I am able to post attachments in a regular "newthread" so it seems that it should be configured correctly as far as that goes...

I'll have a look at the code.

Wired1 09-15-2006 09:35 PM

I see it now (was only looking under vB 3.6), however it's not what I'm looking for. I definitely want users to create threads and posts, but then once an admin has approved it (just a verbal OK in the thread, no need to check it in any fashion), they can hit a button and it will open a new form up and preferably pre-fill it out with the post or thread ID. There's some other stuff I'd want to pre-load, but that's something I'll have to modify on my own.

camuca 09-16-2006 03:50 AM

Hi, this is a very good work.

How would I implement a drop down box that would show list of the forums and allow user to post the form to.

//FORUM TO POST NEW THREAD IN
//You CAN make this number a variable. You can have a drop down menu or in the link like do=form&f=1. Make sure you add it the variables list.
$formforumid = "5";

It will be something like $formforumid = Dropdown code that shows all the forums which are then converted to ids, I guess

Any suggestions how this can be implemented

Wired1 09-16-2006 04:59 AM

Quote:

Originally Posted by FSFwebmaster
Can anyone help me out wit this code?

May want to be more specific as to what you actually need help with.

bandare 09-16-2006 11:24 AM

is there a demo anywhere to see please?

Spinball 09-16-2006 04:24 PM

Quote:

Originally Posted by Abe1
There are 2 template edits to make the attachements work. Make sure you did both. You can also test it by clicking 'preview'.

I put the attachment text into the form template.
Which other template, please? (I looked at formanswers but there is no sign of the attachment in there).

FSFwebmaster 09-16-2006 06:09 PM

need help adding more questions to the default number of questions?


All times are GMT. The time now is 11:53 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02824 seconds
  • Memory Usage 1,833KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (14)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete