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)

PHILLYFAN 07-28-2008 02:15 PM

***EDIT never mind I figured it out!***

Installed!

vbboarder 07-30-2008 02:18 AM

I just installed this awesome mod on VB 3.7.2 - it works great! :cool:

However, there is a small bug that appears if your testing it with the default/ original form. If you set $answerall = "1"; then the mod will keep on saying that you need to answer all questions even though you did and double checked it. The problem is in the condition for $answerall. Find:

Quote:

if ($answerall == "1") {
Replace the if condition inside that if statement with (note that I also added the condition to check for $dropdownanswer1):

Quote:

if ($normalanswer1 == '' OR ($radioanswer1 == '' AND $radioanswer2 == '' AND $radioanswer3 == '') OR $answer1 == '' OR $answer2 == '' OR $answer3 == '' OR $dropdownanswer1 == '' OR !($checkboxchoice1_1 OR $checkboxchoice1_2 OR $checkboxchoice1_3) OR $longanswer1 == '')
Now your form submissions should work when $answerall is enabled. :D
Note that if you add more variables, then you need to check for them inside the above if condition. Also, if you want some variables to be optional, then you can omit them from that statement.

RedGTiVR6 07-30-2008 11:59 AM

hehe - that's probably the best explanation I've seen of that in this thread.

bravo.

now if only we could add stuff like this to the first post so that other see it too...

Stryker412 07-30-2008 12:08 PM

Is it possible to have three different questions on the same line? I was thinking of doing that instead of using the ajax plugin.

lazytown 07-31-2008 01:17 AM

Anyone else using this as a "contact us" form? I use it to send comments/questions to a moderator forum. However, with guests being able to use the form (but not post in threads), it's causing massive spam.

Is there any way to modify this to catch spam or have image/human verification?

If not, is there another mod that can send 'contact us' requests (even the built in one) to a forum instead of email?

Thanks!
-vissa

vithorius 07-31-2008 03:08 PM

Quote:

Originally Posted by RedGTiVR6 (Post 1587374)
hehe - that's probably the best explanation I've seen of that in this thread.

bravo.

now if only we could add stuff like this to the first post so that other see it too...

:up: I fully agree! This thread has now 1166 answers and there is a lot of great (an not so great) stuff here to read and learn... :eek:

1166 posts...? :erm: That is heavy...! :(

PGAmerica 07-31-2008 04:34 PM

Quote:

Originally Posted by PHILLYFAN (Post 1585990)
ok I uploaded the XML file, how can I view the application I can't seem to find it

I am having the same problem. I installed this into my 3.7.2 and cannot find the menu options to configure it or add new forms.

Where is it?

Karri 08-01-2008 02:03 PM

There are no menu options, all of it is done with in the plugin. Edit the main plug-in - the instructions are all inside the hook itself, in the top half. In the plugin it says

Quote:

// To add more then one form, copy this whole text, and create 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.

Abe1 08-03-2008 11:42 PM

Just for who ever cares, I'm currently building a form creator that will allow you to easily create as many forms on your site as you want while just using a nice GUI (graphical user interface). Unfortunately, I will have to charge for it so it wont be released on this site, but it basically allows you to create a perfect form for your site in just minutes. You dont need to know or play around with any HTML or PHP.

Now, I should have a beta ready for release in a few days for who ever is interested. You can drop me a PM with your email and I'll contact you with more details. (It may take a few days for me to respond.)

RedGTiVR6 08-04-2008 12:39 PM

great!

I can absolutely understand having to charge for something like this. Just the support time along on this thread would have been a full time job for someone.

Can't wait to see the final product!

vbboarder 08-06-2008 06:31 AM

VB memory optimization for Form Hack: As you noticed, the plugin for the form hack is large. Since VB stores plugin code in memory, this module uses relatively a lot of memory. Also every time you need to edit the plugin, VB parses the code for color coding which takes 5+ secs before you can edit. To save memory and enable faster editing of the form hack plugin: 1. create a new file in WordPad, 2. cut and paste ALL the form hack code into that new file, 3. add a <?php tag at the very beginning and a ?> tag at the very end of the file., 4. save the file with a php extension, (ie: form_hack.php). 5. insert this code into the form hack plugin (the period indicates the path is relative to the VB forum directory):
Quote:

include('./modules/form_hack.php');
That's it. VB can now dynamically load the module only when needed, and you don't need to wait for VB to parse the code whenever editing the form hack code.

ccplim 08-06-2008 08:43 AM

Quote:

Originally Posted by vbboarder (Post 1592430)
VB memory optimization for Form Hack: As you noticed, the plugin for the form hack is large. Since VB stores plugin code in memory, this module uses relatively a lot of memory. Also every time you need to edit the plugin, VB parses the code for color coding which takes 5+ secs before you can edit. To save memory and enable faster editing of the form hack plugin: 1. create a new file in WordPad, 2. cut and paste ALL the form hack code into that new file, 3. add a <?php tag at the very beginning and a ?> tag at the very end of the file., 4. save the file with a php extension, (ie: form_hack.php). 5. insert this code into the form hack plugin (the period indicates the path is relative to the VB forum directory):
That's it. VB can now dynamically load the module only when needed, and you don't need to wait for VB to parse the code whenever editing the form hack code.

Great tips! Thanks for sharing that :up: This would be useful for me since I got pretty much customizations.

Stryker412 08-06-2008 11:58 AM

Quote:

Originally Posted by Stryker412 (Post 1585931)
I don't get an error but the thread title looks like this if I have the code as:

$posttitle = "$formtitle - $bbuserinfo[username]";

Thread shows as Community Member Application -

No user name shows.

Has anyone figured this out yet?

Stryker412 08-09-2008 12:54 PM

Anyone, anyone? Bueller?

swisscotton 08-09-2008 07:08 PM

I have just installed this but I can't set it up. I am a designer, not a programmer and there are no instructions just a few lines. I have been reading what it says in the "hook" (took me long enough to find out what was meant by hook) done everything it says in there and I get the message "Invalid Forum specified. If you followed a valid link, please notify the administrator" when I try and preview it. I mean how is this done? Do I set up a forum? What?
I need a form and this is the only one I have seen but there are not enough instructions, it kind of assumes you already know what you’re doing. Can anyone point me in the right direction?

Emma

blind-eddie 08-10-2008 02:22 AM

Quote:

Originally Posted by swisscotton (Post 1594939)
I have just installed this but I can't set it up. I am a designer, not a programmer and there are no instructions just a few lines. I have been reading what it says in the "hook" (took me long enough to find out what was meant by hook) done everything it says in there and I get the message "Invalid Forum specified. If you followed a valid link, please notify the administrator" when I try and preview it. I mean how is this done? Do I set up a forum? What?
I need a form and this is the only one I have seen but there are not enough instructions, it kind of assumes you already know what you?re doing. Can anyone point me in the right direction?

Emma


To edit your form, you need to open the form hack plugin, Scroll down through it, you will see
everything you are looking for.

BlueBulletRL 08-10-2008 02:57 PM

In our forum our for sale and wanted to buy sections require you to have a minimum post count. How can I get it so it requires that minimum post count??? I am thinking that once they hit the new thread button it tells them no they can't.

Stryker412 08-11-2008 02:45 PM

I hate to keep bumping this but has anyone figured out how to correctly put the user's name in the title of the thread created? As I stated before I put
$posttitle = "$formtitle - $bbuserinfo[username]";

However, no name ever shows for the title.

blind-eddie 08-11-2008 02:57 PM

It displays the applicants name automatically in the Thread. Show a SS of what you see whn Thread is made.

Stryker412 08-11-2008 03:44 PM

Quote:

Originally Posted by blind-eddie (Post 1596285)
It displays the applicants name automatically in the Thread. Show a SS of what you see whn Thread is made.

In the thread yes, but I'm trying to get it to show in the thread title so we can keep them separate.

blind-eddie 08-11-2008 04:40 PM

It does show Username below thread title.

Stryker412 08-11-2008 04:46 PM

Yes it shows username as the author but I wanted it in the title itself as well.

BlueBulletRL 08-11-2008 06:47 PM

Hey Stryker I believe you are looking for a different variable. Try $post[user] instead. I think I ran into that using something else. Let me know how that works....

now anyone able to help me with my issue?

Stryker412 08-11-2008 07:22 PM

Quote:

Originally Posted by BlueBulletRL (Post 1596411)
Hey Stryker I believe you are looking for a different variable. Try $post[user] instead. I think I ran into that using something else. Let me know how that works....


now anyone able to help me with my issue?

Unfortunately no it didn't. However, I ran into something else. Is there a way to restrict a user from only filling out the application once?

BlueBulletRL 08-11-2008 07:47 PM

Sorry about that I was pretty sure that was it. i'm actually at work so I can't really figure out what is going on or what I did until I get home in a little while. I believe though if you look at ur postbit template you might be able to see what field they use.

Stryker412 08-12-2008 12:28 PM

Quote:

Originally Posted by BlueBulletRL (Post 1596459)
Sorry about that I was pretty sure that was it. i'm actually at work so I can't really figure out what is going on or what I did until I get home in a little while. I believe though if you look at ur postbit template you might be able to see what field they use.

Were you able to look at your code?

CEOPcGamingGuru 08-13-2008 10:58 PM

Im sorry if this has been explained before, but i looked through all 12 pages and didnt see it. i want to change the color of the "output" text that is posted after the submit button is hit. i have all dropdown choices and need to know what code to add to the choices to make them output a certain color, and another simple question. When one of those dropdown choices are selected I would like it to output certain text...e.g. I have 3 choices on a part for a car to add, they are from 3 different stores...each store has its own color if picked and each has its own price, but those are only revlevant to the "output" forum. hope this isnt 2 confusing. any ideas or help?

ccplim 08-14-2008 03:40 AM

Quote:

Originally Posted by CEOPcGamingGuru (Post 1598097)
Im sorry if this has been explained before, but i looked through all 12 pages and didnt see it. i want to change the color of the "output" text that is posted after the submit button is hit. i have all dropdown choices and need to know what code to add to the choices to make them output a certain color, and another simple question. When one of those dropdown choices are selected I would like it to output certain text...e.g. I have 3 choices on a part for a car to add, they are from 3 different stores...each store has its own color if picked and each has its own price, but those are only revlevant to the "output" forum. hope this isnt 2 confusing. any ideas or help?

To change the output text color, you just need to modify your formanswer template and enclose the item that you want with a different color with the color BB code.

As for your second question, you might need to use the Ajax add-on from bro Deepdog009. (if I understand your requirements correctly)

d-wiz 08-15-2008 08:44 AM

How do you make more than one of a type of question say I wanted two "$normalquestion1 ="?

BlueBulletRL 08-15-2008 06:42 PM

just name it normalquestion2 and so forth so anyone able to help me out with the post count???

d-wiz 08-16-2008 03:14 AM

Quote:

Originally Posted by BlueBulletRL (Post 1599460)
just name it normalquestion2 and so forth so anyone able to help me out with the post count???

I tried that but nothing shows up?

Code:

// Part 1
$vbulletin->input->clean_array_gpc('p', array(
'normalanswer1' => TYPE_STR,
'normalanswer2' => TYPE_STR,
'normalanswer3' => TYPE_STR,
// Part 2
$normalanswer1 = $vbulletin->GPC['normalanswer1'];
$normalanswer2 = $vbulletin->GPC['normalanswer2'];
$normalanswer3 = $vbulletin->GPC['normalanswer3'];

$normalquestion2 = "N?vn de byer du har rejst mest til i forbindelse med arbejde?";

normalquestion2 doesn't show up?

ccplim 08-16-2008 05:47 AM

Did you add normalquestion2 into your main template too? What you shown here are just the declaration in the plugin.

Quote:

Originally Posted by d-wiz (Post 1599751)
I tried that but nothing shows up?

Code:

// Part 1
$vbulletin->input->clean_array_gpc('p', array(
'normalanswer1' => TYPE_STR,
'normalanswer2' => TYPE_STR,
'normalanswer3' => TYPE_STR,
// Part 2
$normalanswer1 = $vbulletin->GPC['normalanswer1'];
$normalanswer2 = $vbulletin->GPC['normalanswer2'];
$normalanswer3 = $vbulletin->GPC['normalanswer3'];

$normalquestion2 = "N?vn de byer du har rejst mest til i forbindelse med arbejde?";

normalquestion2 doesn't show up?


d-wiz 08-16-2008 07:44 AM

No how do you do that?

ccplim 08-16-2008 03:45 PM

Quote:

Originally Posted by d-wiz (Post 1599827)
No how do you do that?

Take a look at the templates in admincp -> styles and template. You should be able to find 2 template by the name of "formhack" and "formhackanswers". Use those as an example and create your own version.

CEOPcGamingGuru 08-16-2008 08:02 PM

Quote:

Originally Posted by ccplim (Post 1598177)
To change the output text color, you just need to modify your formanswer template and enclose the item that you want with a different color with the color BB code.

Can you give me an example of the code ... e.g . dropdown question 1 has 4 selections each having its own color...i understand what you mean btw just do not know how to do it, an example code i could use as a "template" would be great ty in advance.

I do know how to change the color of the non-dropdown questions just havent been able to figure out the coding to change the dropdown choices e.g dropdownchoice1a ...red
dropdownchoice1b...blue etc

ccplim 08-17-2008 12:26 AM

Quote:

Originally Posted by CEOPcGamingGuru (Post 1600257)
Can you give me an example of the code ... e.g . dropdown question 1 has 4 selections each having its own color...i understand what you mean btw just do not know how to do it, an example code i could use as a "template" would be great ty in advance.

I do know how to change the color of the non-dropdown questions just havent been able to figure out the coding to change the dropdown choices e.g dropdownchoice1a ...red
dropdownchoice1b...blue etc

I am sorry that I will likely not able to help you on this as I am not a programming guy myself. Maybe someone more experience will be able to provide some help. :o

Abe1 08-17-2008 04:42 PM

Quote:

Originally Posted by Stryker412 (Post 1592556)
Has anyone figured this out yet?

$posttitle = "$formtitle - {$vbulletin->userinfo[username]}";

BlueBulletRL 08-18-2008 03:03 AM

Abe can you help me with what I am working on

Stryker412 08-18-2008 11:33 AM

Quote:

Originally Posted by Abe1 (Post 1600852)
$posttitle = "$formtitle - {$vbulletin->userinfo[username]}";

That worked great, thank you.

skulldred 08-19-2008 06:20 PM

Hi all

i have a question about the creation of a new thread.

PHP Code:

PHP Code:

//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 "1"

When i set $formforumid = "1"; to //$formforumid = "1"; and open the link
how descript with do=form&f=1 nothing happens after saving. I receive the message box that all is ok but when i have a look no new thread. Have you an idea why this happen? I see in the info text that i have to set the variable but also when i open the form with the link?

Thanks for your help


All times are GMT. The time now is 03:10 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.03139 seconds
  • Memory Usage 1,848KB
  • 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
  • (2)bbcode_code_printable
  • (1)bbcode_php_printable
  • (20)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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