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)

MRGTB 10-01-2006 09:29 AM

this can be played around with to use as an article submission form etc. Quite neat.

ChrisBaktis 10-01-2006 02:04 PM

Quote:

Originally Posted by thalamus
The only thing I can think of is that the initial variables are set when the action of the form is set to 'do form'... perhaps at the beginning of the script, where it says:
Code:

if ($_REQUEST['do'] == $formname)
{

add a "$bbuserinfo = $vbulletin->userinfo;" instruction just after the opening brace before it goes on to define the custom variables?

YES!!! Thank you!

halpern 10-01-2006 02:08 PM

Ok. I am not really a programmer so I am looking for some help. I have installed this into my Vbulletin 3.6.1. I want to have it email the results to the sysadmin, that would be me. What hook do I need to make the form? The default one is newthread_start but I am sure that I change that if I am sending a PM. Am I correct in saying that? Also, I do not have permission to view the thread that was created when I was testing the form. Why is this? I added id 6 in the array function to allow me (admin) access.

ChrisBaktis 10-02-2006 12:43 AM

Quote:

Originally Posted by ChrisBaktis
YES!!! Thank you!


spoke to soon - your suggestion solved teh problem but created another...

for some reason whenever a member clicked on a the New Thread button it went to the form... crazy I know...When I hover over the new thread button it didnt give that URL it gave teh URL for the new thread but when you clicked on it it goes to the form for some reason - I removed the line you gave me and that problem was corrected....this is the wierdest problem I have ever come across with a hack.

ChrisBaktis 10-02-2006 12:46 AM

Corrected my own problem - originally I put the code before the { - I reread your post and realized I had to put it after it. Problem solved.

dieselpowered 10-02-2006 10:36 PM

Alright, I must be a fool, however, I cannot get the form the way I want it.

I simply want to be able to make a form like this:

Year
Make
Model
Date
Text Box

All text areas...is this possible?

I tried to copy of couple of these but it did not work:

$normalquestion1 = "Year";

Sorry for the ignorance!

Shazz 10-03-2006 03:39 AM

*Clicks install...
Ill try this out :)

ChrisBaktis 10-03-2006 12:59 PM

Quote:

Originally Posted by xtremeoff-road
Alright, I must be a fool, however, I cannot get the form the way I want it.

I simply want to be able to make a form like this:

Year
Make
Model
Date
Text Box

All text areas...is this possible?

I tried to copy of couple of these but it did not work:

$normalquestion1 = "Year";

Sorry for the ignorance!

Your variables would have to be like this:

Code:

// Part 1
$vbulletin->input->clean_array_gpc('p', array(
'normalanswer1' => TYPE_STR,
'normalanswer2' => TYPE_STR,
'normalanswer3' => TYPE_STR,
'normalanswer4' => TYPE_STR,
'longanswer1' => TYPE_STR

));

// Part 2
$normalanswer1 = $vbulletin->GPC['normalanswer1'];
$normalanswer2 = $vbulletin->GPC['normalanswer2'];
$normalanswer3 = $vbulletin->GPC['normalanswer3'];
$normalanswer4 = $vbulletin->GPC['normalanswer4'];
$longanswer1 = $vbulletin->GPC['longanswer1'];

This will give you the 4 Nomral sized text boxes and then a big text area for your 5th item. You can just copy and paste the Normal Question area in the code and change the info in them.

Kayden 10-03-2006 02:02 PM

Installed. Thanks.

Mirage Guardian 10-03-2006 03:05 PM

after installing, I got a database error when I call "newthread.php?do=form"
Quote:

Database error in vBulletin 3.6.1:

Invalid SQL:
SELECT * FROM forumpermission
WHERE ( forumid IN() AND usergroupid IN (6)) AND
(maxthread=0 AND perhour=0);

MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND usergroupid IN (6)) AND
(maxthread=0 AND perhour=0)' at line 2
Error Number : 1064
The normal "newthread.php" syntax is:
http://my/forum/path/newthread.php?do=newthread&f=2
and when i call "newthread.php?do=form&f=2", the form start, but never submit and give the same database error.

What shall i do?


All times are GMT. The time now is 08:57 PM.

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.02006 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
  • (2)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