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)

stepdg 12-22-2007 06:38 PM

I *really* like this mod. I have working forms for several different forums. The issue is updating the FORUMDISPLAY.PHP code so that it will use specific URL's with the right form for the right forum. I know I could put a drop-down/select in the form and use the same form for all the forums, but each form is specific to each forum.

Has anyone come up with a way (IF/THEN perhaps) to accomplish this? I've looked around for a hack/mod to make this change from within the VB administrator area but haven't found anything.

Any help would be greatly appreciated!!

shcchief 12-23-2007 04:03 AM

Quote:

Originally Posted by attroll (Post 1406950)
$answer4 is not a default variable that is included in the hack. Any additional variables that you add you also have to add in the lower part of the plugin.

Look for a code in the lower part of the plugin that looks like this:
Code:


    if ($answerall == "1")
    {
        if ($normalanswer1 == '' OR $radioanswer1 == '' OR $radioanswer2 == '' OR $radioanswer3 == '' OR $answer1 == '' OR $answer2 == '' OR $answer3 == '' OR ($checkboxchoice1_1 AND $checkboxchoice1_2 AND $checkboxchoice1_3) OR $longanswer1 == '')
        {
            $errormessage = "$bbuserinfo[username], you need to answer every question!";
            eval('print_output("' . fetch_template('STANDARD_ERROR') . '");');
            exit();
        }

You will need to ad the "OR $answer4" in there in the proper format.

Thanks mate, I did that but no change.

Any other ideas?

zmmmzz 12-23-2007 05:07 AM

how can I add tags to the form?

xTerMn8R 12-23-2007 05:18 AM

I love this Hack, and gotta say its keeping me busy but the work is paying off big dividends as the site is working great... Very streamlined, and neat with these news integrated Forms.

I do have a question, How can I have the date and time automatically inserted into form like we do for $bbuserinfo[username] stuff?

Thanks again for this GREAT hack...

Tom
www.isrl-simracing.org

attroll 12-23-2007 05:34 AM

Quote:

Originally Posted by shcchief (Post 1407280)
Thanks mate, I did that but no change.

Any other ideas?

Did you also add the variables to your form and formanswers templates?

attroll 12-23-2007 05:36 AM

Quote:

Originally Posted by xTerMn8R (Post 1407305)
I love this Hack, and gotta say its keeping me busy but the work is paying off big dividends as the site is working great... Very streamlined, and neat with these news integrated Forms.

I do have a question, How can I have the date and time automatically inserted into form like we do for $bbuserinfo[username] stuff?

Thanks again for this GREAT hack...

Tom
www.isrl-simracing.org

I am just curious as to why you need this because the date and time are posted in the thread it creates just like when a user creates a thread in the forums.

shcchief 12-23-2007 06:36 AM

Damn, there must be a way to get question 4 to appear in emails/PM's - can't see what I've missed.

attroll 12-23-2007 07:01 AM

Quote:

Originally Posted by shcchief (Post 1407339)
Damn, there must be a way to get question 4 to appear in emails/PM's - can't see what I've missed.

I asked you a question in post #817?

Brundlefly 12-24-2007 12:45 PM

I had a need to create a poll based off the answers provided in the form. Hope this helps someone else.

Below
Code:

//ENABLE POLL TO BE CREATED - 1 = yes, 0 = no
Add
Code:

if ($checkboxanswer1_1 == '' AND $checkboxanswer1_2 == '' AND $checkboxanswer1_3 == '' AND  $checkboxanswer1_4 == '' AND $checkboxanswer1_5 == '' AND $checkboxanswer1_6 == '' AND $checkboxanswer1_7 == '' AND $checkboxanswer1_8 == '')
                        {
                                $formpoll = "0";
                        }
                        else
                        {
                                $formpoll = "1";
                        }

$polloption[1] = "Poll Option 1";
$polloption[2] = "Poll Option 2";
$polloption[3] = "Poll Option 2";

Remove
Code:

$formforum = "1";
The above creates a poll if the cited checkboxes are checked.

I haven't tried to use this with entry fields as I was using checkboxes which worked quite well. If someone comes up with other variations for this please post. It may come in handy to others.

GPTB 12-28-2007 11:58 AM

This is great and I have this set up so that it automatically makes a post into my moderators-only forum.

However, the threads automatically generated state that they are "Moderated" and so they do not display to all my mods?

Does anyone know why?


All times are GMT. The time now is 09:34 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.01901 seconds
  • Memory Usage 1,746KB
  • 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
  • (4)bbcode_code_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (4)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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