PDA

View Full Version : New Posting Features - Form Hack


Pages : 1 2 3 4 5 [6]

viper357
09-12-2008, 05:14 PM
Use html.

Do you mean like this...

<A HREF="http://www.marineaquariumsa.com/announcement.php?f=73">New Rules </A>


It doesn't work, I get a parse error :(

ccplim
09-13-2008, 04:08 AM
Do you mean like this...

<A HREF="http://www.marineaquariumsa.com/announcement.php?f=73">New Rules </A>


It doesn't work, I get a parse error :(

Is this for your final output after the form have been submitted? If yes, use standard BB code in your formanswer template.

dmorales
09-13-2008, 04:21 AM
You guys should be careful with this bug.

This happens with topics which are created by this hack.

When an user chooses option "Instant email notification" in "Default Thread Subscription Mode", then the moderators move those topics (that user subscribed) to moderator areas or somewhere that user can't access, but emails were still sent out to nofify that user about all the replied messages.

Sometimes the administrators and moderators discuss about that user in those topic are created by this hack, he/she also knows everything even he/she can't access to the area where the topics has been moved in.

Please advise.

Thanks.

Does anyone have a solution to this problem? I would appreciate the help. My users can see any messages that are left since they are subscribe to the thread. It sends them e-mail with the updated message. It's kinda defeats the purpose to having the applications confidential and only for moderators to comment on.

jdunsworth
09-13-2008, 11:46 AM
Check around line 100 for a missing semicolon( ; ), double quote( " ), single quote( ' ) or bracket( { ).
This didn't work.. everything in newthread.php is fine. I get this error no matter if I upload a brand new product from this thread without editing it or use one I edited...

I want to say that it was a general compatibility issue with 3.7, however, it works fine on one of my forums running 3.7 and I haven't edited anything else with this forum that should mess it up.

viper357
09-13-2008, 12:18 PM
Is this for your final output after the form have been submitted? If yes, use standard BB code in your formanswer template.
No, I am creating the form for it to be filled in by members, at the bottom of the form I am trying to put a link to a URL for the rules for the members to read before they submit the form.

jdunsworth
09-13-2008, 06:13 PM
I got it working.. to my mistake I had accidentally had an extra quotation in one of my variables.. whoops! :D

viper357
09-15-2008, 06:56 PM
I'm having problems with this hack...

I have the need for 2 forms. I made the easier one of the 2 first and tested it and it works fine. When I do the 2nd one, it gives me the following error when I try to submit the form.

Fatal error:

* Please complete both the subject and message fields.

Unable to proceed with save while $errors array is not empty in class vB_DataManager_PM in /includes/class_dm.php on line 763

any advice on what to do??
I'm having the exact same problem, any idea on how to solve it? I am also using the "edit thread button" hack.

Null Parameter
09-16-2008, 03:21 AM
I figured I would post this because I didn't see it anywhere else in a quick search through here.

If you want to have a separate activity on the online page, then there is a simple addition to the product to allow this. For example, if you have a form to submit a PM to the admins, then when a user is using that form, you could have their location/activity be "Contacting the Admins". That is just an example, it is open to whatever you want.

Here is the code you must add to the product xml to get this easy addition:


<plugin active="1" executionorder="5">
<title>Form Name - Online Location Complete</title>
<hookname>online_bit_complete</hookname>
<phpcode><![CDATA[
if($userinfo['activity'] == 'newthread' && $userinfo['values']['do'] == 'your_form_name')
{
$userinfo['action'] = "???";
}
]]>
</phpcode>
</plugin>


Just replace 'your_form_name' with the name of your form and put whatever text you want in the action field.

This works on my vBulletin v3.7.3, haven't tested older versions.

Oh yeah, I think that this should be added into the base product. ;)

uberjon
09-16-2008, 03:46 AM
I figured I would post this because I didn't see it anywhere else in a quick search through here.

If you want to have a separate activity on the online page, then there is a simple addition to the product to allow this. For example, if you have a form to submit a PM to the admins, then when a user is using that form, you could have their location/activity be "Contacting the Admins". That is just an example, it is open to whatever you want.

Here is the code you must add to the product xml to get this easy addition:


<plugin active="1" executionorder="5">
<title>Form Name - Online Location Complete</title>
<hookname>online_bit_complete</hookname>
<phpcode><![CDATA[
if($userinfo['activity'] == 'newthread' && $userinfo['values']['do'] == 'your_form_name')
{
$userinfo['action'] = "???";
}
]]>
</phpcode>
</plugin>


Just replace 'your_form_name' with the name of your form and put whatever text you want in the action field.

This works on my vBulletin v3.7.3, haven't tested older versions.

Oh yeah, I think that this should be added into the base product. ;)

nice! was looking for this yesterday!!! (may i kiss you? :eek:)

+1 for base product! :D

viper357
09-16-2008, 07:55 PM
Any help with post number 1258 (https://vborg.vbsupport.ru/showpost.php?p=1622806&postcount=1258)
Please :)

viper357
09-19-2008, 11:23 AM
Can somebody please help with why I am getting this error when I submit the form.

Fatal error:

* Please complete both the subject and message fields.

Unable to proceed with save while $errors array is not empty in class vB_DataManager_PM in /includes/class_dm.php on line 763

Bilderback
09-24-2008, 11:47 PM
You have to be very careful with this form as you will get data manager errors if you have multiple forms using the same variables.
My advice is to become very familiar with the form before using it.
This way , you can create your own variable.
Example:
Instead of
$question1="What is your name?";
you can write your own variable...
$form_one_question1="What is your name?";
or
$form_one_name="What is your name?";
Definitely not for the impatient but a great product.

There are a few bugs like if you have a question:
Do you have a name? If yes, please state your name.
Someone can still choose no and state their name so it shows as:
No
My Name
I have found a quick fix conditional to add to your formanswers template that works fairly well for me.

<if condition="$radioanswer1other!=''">yes<else />$radioanswer1</if>

What this does is if the name area is not empty, it changes the No to Yes.
So your actual code for the question assuming it is $radioquestion1 is as follows:

$radioquestion1
<if condition="$radioanswer1other!=''">yes<else />$radioanswer1</if>
$radioanswer1other


I have to say I am having fun with this hack.
Another thing I noticed is that HTML is not parsing in the formanswers template
and any BBCode produces errors.
Is there any way around this?
I would like to add some styling to the form when it is posted to a thread like using Bold and Underline and possibly a hyperlink to various answers.
Thanks

swisscotton
09-28-2008, 01:09 PM
I have installed this hack but for some reason the answers to the normal questions ($question) are not showing up on priview or when its submitted. :confused:

My PHP isn't very good at all so I was hoping someone for have a quick look for me?
http://www.fileden.com/files/2007/3/3/845758/explain_not_working.txt

Emma

Bilderback
09-28-2008, 03:41 PM
Part 1 and Part 2 have to be the same for your answer variables.
My suggestion is to first write down all questions and answers, then add to form.
Example:
$question1 = "What is the Rabbits Name?";
$explain1 = "Please enter your real name here.";

In question1, you would only need to clean the answer1
(your own questions and explains dont need to be run through the vb input.)
// Part 1
$vbulletin->input->clean_array_gpc('p', array(
'$answer1' => TYPE_STR,
));
// Part 2
$answer1 = $vbulletin->GPC['normalanswer1'];

You also need to be sure that all the same $variables are distributed properly to the templates.
form template

<tr>
<td class="alt2" valign="middle">
<b>$question1</b>:<br />
$explain1</td>
<td class="alt2" valign="middle" colspan="2">
<input type="text" size="30" value="$answer1" name="answer1" /></td>
</tr>


answer template
$question1
$answer1

Nuguru
09-28-2008, 03:54 PM
Hello,

Great mod, but has this mod been updated to work with vb 3.7.3 or above?

Thx

swisscotton
09-28-2008, 07:03 PM
Part 1 and Part 2 have to be the same for your answer variables.
My suggestion is to first write down all questions and answers, then add to form.
Example:
$question1 = "What is the Rabbits Name?";
$explain1 = "Please enter your real name here.";

In question1, you would only need to clean the answer1
(your own questions and explains dont need to be run through the vb input.)
// Part 1
$vbulletin->input->clean_array_gpc('p', array(
'$answer1' => TYPE_STR,
));
// Part 2
$answer1 = $vbulletin->GPC['normalanswer1'];

You also need to be sure that all the same $variables are distributed properly to the templates.
form template

<tr>
<td class="alt2" valign="middle">
<b>$question1</b>:<br />
$explain1</td>
<td class="alt2" valign="middle" colspan="2">
<input type="text" size="30" value="$answer1" name="answer1" /></td>
</tr>


answer template
$question1
$answer1

Thanks for that. But I really can't do it. I don't know PHP at all. I have tried tweaking it but nothing is appearing. I have tried going back to the default form and inputting it again but I am still not getting the answers appearing :(

swisscotton
09-28-2008, 07:39 PM
Not only dosn't it display the ansewrs its still only showing the first three questions on preview (I have added them into the html).

http://www.fileden.com/files/2007/3/3/845758/explain_not_working2.txt

I know is something I am doing wrong because I am a designer and know nothing what so ever about this kind of thing. It is a very basic form I am trying to put together.

Bilderback
09-29-2008, 12:37 AM
Like I stated in a previous post, its more coder-oriented and without much documentation.
The idea is to first develop your variables list
(Note:You only have to use the vbulletin cleaner on a variable which will allow user input.)
So if my first question was:
$question1="What is your name?";
$explain1="Please enter your name here";
Neither of those have to be passed through vb input cleaner.
-only the $answer1 since it takes user input.
I clean everything... even radio boxes that you think would only be a Yes or No,
just in case a hacker tries to manipulate any input variables.

You cannot use the same variable twice or it is overwritten resulting in possible errors.
So you cannot do:
$question1="What is your name?";
$question1="How old are you?";
This is basic variable handling as you are redeclaring the var resulting in it being overwritten.
If you are trying to use the default form as reference as you make a custom form,
the script is being executed ,corrupting default variables if you are not assigning your own.
So I recommend disabling the default form if you make custom.

After all your variables are assigned properly within the plugin, you then edit the form template
to your liking which takes basic vbulletin template handling.

And also do the same with the output template (answer template) which will be the
template that posts to your thread or post.
Both templates have to use the same variables as you stated in the form plugin.

The easiest way I have found is to write down my questions and answers on paper
or in editor so that I have a basic set.
Then, I go through and create the variables, place them in the order I want in the templates,
and everything should work.

It takes a bit of a learning curve but well worth it.
Maybe someday, the Form Hack will be enhanced to set up the form from adminCP area.

swisscotton
09-30-2008, 11:54 AM
I dont know what you mean by "cleaning" I am new to VB and I haven't a clue about PHP but this forum is an importent part of my forum.

This is how it is set up so far:

// Part 1
$vbulletin->input->clean_array_gpc('p', array(
'$answer1' => TYPE_STR,
'$vbtextexplain' => TYPE_STR,
));

// Part 2
$answer1 = $vbulletin->GPC['normalanswer1'];
$longanswer1 = $vbulletin->GPC['longanswer1'];


//QUESTION 1 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
$question1 = "What is the Rabbits Name?";
$explain1 = "Please enter your real name here.";

//QUESTION 2 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
$question2 = "What breed is the Rabbit?";
$explain2 = "Please enter your real name here.";

//QUESTION 3 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
$question3 = "Is the rabbit spayed or neutered?";
$explain3 = "Please enter your real name here.";

//QUESTION 4 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
$question4 = "How old is the Rabbit?";
$explain4 = "Please enter your real name here.";

//QUESTION 5 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
$question5 = "What colour is the rabbit?";
$explain5 = "Please enter your real name here.";

//QUESTION 6 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
$question6 = "Bonded or Single Rabbit?";
$explain6 = "Please enter your real name here.";

$vbtextquestion = "Information & Photos";
$vbtextexplain = "Please write more information about the rabbit, such as its background, how you managed to save him or her, the rabbit’s personality, and what the ideal home would be for this rabbit. Also post photos of the rabbit.";


The '$vbtextexplain' => TYPE_STR, (text area) works find its just the normal answers that don't.

I a run an animal welfare forum and this form will be used for animals needing homes and to let me know details about the animal so I can put those details onto the site.

Bilderback
09-30-2008, 01:20 PM
Part 1 and Part 2 need to have the same variables which rely on any questions asked.


// Part 1
$vbulletin->input->clean_array_gpc('p', array(
'$answer1' => TYPE_STR,
'$answer2' => TYPE_STR,
'$answer3' => TYPE_STR,
'$answer4' => TYPE_STR,
'$answer5' => TYPE_STR,
'$answer6' => TYPE_STR,
));

// Part 2
$answer1 = $vbulletin->GPC['answer1'];
$answer2 = $vbulletin->GPC['answer2'];
$answer3 = $vbulletin->GPC['answer3'];
$answer4 = $vbulletin->GPC['answer4'];
$answer5 = $vbulletin->GPC['answer5'];
$answer6 = $vbulletin->GPC['answer6'];

life is boost
10-06-2008, 08:56 PM
Hello everyone. i have done all of the edits but still cannot get the attachments to show. It is enabled. i am posting to a forum, i have tried default forms and everything but still no attachments. I even removd the if statement so it just says.

$attachmentoption

any help is appreciated

a33
10-16-2008, 06:53 PM
I am trying to get this to work..
I keep getting this problem below when i submit the form....... so i uninstalled and started again without making any changes.
I have only changed the forum to post in...

The error is
Warning: Cannot use a scalar value as an array in [path]/includes/functions_newpost.php on line 370

What have i done wrong ?

Line 370 is $polloptions = count($polloption);

fodvapor
10-17-2008, 08:00 PM
Does this also work with 3.7.3 ???

TheLastSuperman
10-17-2008, 09:28 PM
I am trying to get this to work..
I keep getting this problem below when i submit the form....... so i uninstalled and started again without making any changes.
I have only changed the forum to post in...

The error is


What have i done wrong ?

Line 370 is $polloptions = count($polloption);

Don't hold me to this BUT you might have an option in the usergroup that's trying to use the form set to where they cannot create OR can create polls and it's conflicting maybe?

You can open the files up and view the contents to remove or add in what you like, additionally if you keep searching there is a similar yet different hack like this HOWEVER more easily customizable... I believe it is listed as a recruitment hack etc and was originally intended for a Guild or WOW forum however the way they made it leaves the person more options for tweaking and has informaton on how to do it all!

If I find the link while browsing I'll edit this post ;)

EDIT: Here it is! --> Click Here (https://vborg.vbsupport.ru/showthread.php?t=182165) <-- ** It seems more complicated when you first view that page w/ all the code snippets BUT it is not and you can tailor it to your needs very easily!

Remember not to always download the first mod you go WOW over as there could be one more to your liking or need if you keep looking!

S-MAN

RedGTiVR6
10-17-2008, 09:35 PM
Does this also work with 3.7.3 ???

Yes.

a33
10-19-2008, 08:11 PM
Don't hold me to this BUT you might have an option in the usergroup that's trying to use the form set to where they cannot create OR can create polls and it's conflicting maybe?

You can open the files up and view the contents to remove or add in what you like, additionally if you keep searching there is a similar yet different hack like this HOWEVER more easily customizable... I believe it is listed as a recruitment hack etc and was originally intended for a Guild or WOW forum however the way they made it leaves the person more options for tweaking and has informaton on how to do it all!

If I find the link while browsing I'll edit this post ;)

EDIT: Here it is! --> Click Here (https://vborg.vbsupport.ru/showthread.php?t=182165) <-- ** It seems more complicated when you first view that page w/ all the code snippets BUT it is not and you can tailor it to your needs very easily!

Remember not to always download the first mod you go WOW over as there could be one more to your liking or need if you keep looking!

S-MAN

Thanks

I found my mistake..... i had used the forum name instead of the forum number... ooops

I checked out the other hack you recommended , it wasn't customizable enough for me......Thanks though

This one is now working great for me (vBulletin 3.7.3 Patch Level 1)

a33
10-19-2008, 11:08 PM
Hi
I am trying to put a user field automatically in the title I have tried $post[field11] in the title section and it doesn't work.

Is It possible to do this?

edit--------think i found the answer on page 35

edit 2 ------- Yes answer on page 35

fodvapor
10-20-2008, 05:27 AM
Yes.

SWEET THX

Simon Lloyd
10-20-2008, 11:31 PM
I have little or no coding experience at all so can't get my head round how to customise this form i can get to the form as instructed /newthread?do=form but have no idea what to do from there, i have been in the admincp and looked at form and formanswers in the templates but again don't know what to do to change this form to something i want.

Any help?

a33
10-21-2008, 02:16 PM
Simon i was the same as you 3 days ago .... I now have a form that works great !!
If you "search this hack" (at the top of this page) there is a lot of info in these 86 pages...
Go to admin - Plugins & Products - Plugin Manager Then "edit" form hack ...

Simon Lloyd
10-21-2008, 02:21 PM
Simon i was the same as you 3 days ago .... I now have a form that works great !!
If you "search this hack" (at the top of this page) there is a lot of info in these 86 pages...
Go to admin - Plugins & Products - Plugin Manager Then "edit" form hack ...
Thanks for that reply but when i do edit there i get this when calling the form or even creating a new thread!: Parse error: syntax error, unexpected T_STRING in /home/thecodec/public_html/forumz/newthread.php(74) : eval()'d code on line 143 so i have to disable it if anyone has codes for this for a kind of joining form i would be very grateful!

a33
10-21-2008, 02:44 PM
Have you set which forum to put the form post in?

////////////////////////////////////////////////////////////////////////////////////////////////////
//CHOOSE WHETHER YOU WANT FORM TO BE POSTED IN A NEW THREAD, NEW POLL, REPLY TO EXISITING THREAD, PMed OR EMAILED
///////////////////////////////////////////////////////////////////////////////////////////////////

//ENABLE FORM TO BE POSTED - 1 = yes, 0 = no
$formforum = "1";

//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 = "71";

I found This is a one step at a time hack . get one thing working properly and you should understand how to get the others going...... and always take new copies of code as you edit it.

It is a very frustrating hack to start with though!!

Simon Lloyd
10-21-2008, 03:47 PM
Have you set which forum to put the form post in?

////////////////////////////////////////////////////////////////////////////////////////////////////
//CHOOSE WHETHER YOU WANT FORM TO BE POSTED IN A NEW THREAD, NEW POLL, REPLY TO EXISITING THREAD, PMed OR EMAILED
///////////////////////////////////////////////////////////////////////////////////////////////////

//ENABLE FORM TO BE POSTED - 1 = yes, 0 = no
$formforum = "1";

//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 = "71";

I found This is a one step at a time hack . get one thing working properly and you should understand how to get the others going...... and always take new copies of code as you edit it.

It is a very frustrating hack to start with though!!Its very frustrating as i'm no coder, i'm e-mailing it so no forum needed, all those parts are well explained, but what i want to do is remove some radio buttons and checkboxes i comented them out by putting // in front of them and then get the error i posted, i can change the forms wording no problem its just adding or getting rid of stuff i cant do!

a33
10-21-2008, 04:00 PM
I just backed up the code and then deleted things i didn't need. i dont think // will work there.

i didn't need these dropdowns or checkbox so i deleted all this code
////////////////////////////////////////////////////////////////////////////////////////////////////
//DROP DOWN CHOICES : QUESTION 1 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
////////////////////////////////////////////////////////////////////////////////////////////////////

$dropdownquestion1 = "Drop down choices?";

// The following choices must NOT have quotation marks
$dropdownchoice1a = "no comment";
$dropdownchoice1b = "Yes please";
$dropdownchoice1c = "No thanks";

////////////////////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////////////////////
//CHECK BOX CHOICES : QUESTION 1 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
////////////////////////////////////////////////////////////////////////////////////////////////////

$checkboxquestion1 = "This shows how to use checkboxes.";

// The following choices must NOT have quotation marks
$checkboxchoice1_1 = "good";
$checkboxchoice1_2 = "bad";
$checkboxchoice1_3 = "both";

////////////////////////////////////////////////////////////////////////////////////////////////////


You also have to remove 'dropdownanswer1' => TYPE_STR,
'checkboxanswer1_1' => TYPE_STR,
'checkboxanswer1_2' => TYPE_STR,
'checkboxanswer1_3' => TYPE_STR, and $dropdownanswer1 = $vbulletin->GPC['dropdownanswer1'];
$checkboxanswer1_1 = $vbulletin->GPC['checkboxanswer1_1'];
$checkboxanswer1_2 = $vbulletin->GPC['checkboxanswer1_2'];
$checkboxanswer1_3 = $vbulletin->GPC['checkboxanswer1_3']; from here
////////////////////////////////////////////////////////////////////////////////////////////////////

// Part 1
$vbulletin->input->clean_array_gpc('p', array(
'answer1' => TYPE_STR,
'answer2' => TYPE_STR,
'answer3' => TYPE_STR,
'dropdownanswer1' => TYPE_STR,
'checkboxanswer1_1' => TYPE_STR,
'checkboxanswer1_2' => TYPE_STR,
'checkboxanswer1_3' => TYPE_STR,
'longanswer1' => TYPE_STR
));

// Part 2
$answer1 = $vbulletin->GPC['answer1'];
$answer2 = $vbulletin->GPC['answer2'];
$answer3 = $vbulletin->GPC['answer3'];
$dropdownanswer1 = $vbulletin->GPC['dropdownanswer1'];
$checkboxanswer1_1 = $vbulletin->GPC['checkboxanswer1_1'];
$checkboxanswer1_2 = $vbulletin->GPC['checkboxanswer1_2'];
$checkboxanswer1_3 = $vbulletin->GPC['checkboxanswer1_3'];
$longanswer1 = $vbulletin->GPC['longanswer1'];




You will then have to edit the templates so remove dropdownanswer1 from there aswell

Hope that makes some sense :)

Simon Lloyd
10-21-2008, 06:56 PM
Hey thanks for the detailed explanations...does that mean i have to create new templates too for future forms?

a33
10-21-2008, 07:36 PM
Hey thanks for the detailed explanations...does that mean i have to create new templates too for future forms?

yes ....I haven't had to do this yet

chrisb1357
10-23-2008, 09:51 AM
Hi all,

I have installed this onto my test forum which is using Version 3.7.3 and as i am new to all this i am not sure what it means when it says.

Edit the main hook (plug-in) - the instructions are all inside the hook itself, in the top half. Follow the instructions carefully!

ALso will this mod be ok to use on 3.7.3

Chris

a33
10-23-2008, 10:40 AM
Chris
Edit the main hook (plug-in) means Go to admin - Plugins & Products - Plugin Manager Then "edit" form hack

Yes works fine 3.7.3

If you "search this hack" (at the top of this page) there is a lot of great info in these 86 pages

Digital Jedi
10-23-2008, 07:03 PM
I've been looking into getting the extended forms javascripts that are out there to work with this. So far I've not had much luck getting them to work. What I'm talking about is this: http://www.quirksmode.org/dom/domform.html

Has anyone given this a shot yet or have a better idea of what should be edited? So far, I haven't even tried to see if they submit, as I can't get the extra fields to generate just yet.

Sawa Dee SohL
11-04-2008, 05:52 PM
I'm trying to ad more then the 3 Radio Buttons, this is the code I've added:

Part 1:

$vbulletin->input->clean_array_gpc('p', array(
'normalanswer1' => TYPE_STR,
'radioanswer1' => TYPE_STR,
'radioanswer2' => TYPE_STR,
'radioanswer3' => TYPE_STR,
'radioanswer4' => TYPE_STR,
'radioanswer5' => TYPE_STR,
'radioanswer6' => TYPE_STR,
'radioanswer7' => TYPE_STR,
'radioanswer8' => TYPE_STR,
'radioanswer9' => TYPE_STR,
'radioanswer10' => TYPE_STR,
'radioanswer10other' => TYPE_STR,

Part 2:


$normalanswer1 = $vbulletin->GPC['normalanswer1'];
$radioanswer1 = $vbulletin->GPC['radioanswer1'];
$radioanswer2 = $vbulletin->GPC['radioanswer2'];
$radioanswer3 = $vbulletin->GPC['radioanswer3'];
$radioanswer4 = $vbulletin->GPC['radioanswer4'];
$radioanswer5 = $vbulletin->GPC['radioanswer5'];
$radioanswer6 = $vbulletin->GPC['radioanswer6'];
$radioanswer7 = $vbulletin->GPC['radioanswer7'];
$radioanswer8 = $vbulletin->GPC['radioanswer8'];
$radioanswer9 = $vbulletin->GPC['radioanswer9'];
$radioanswer10 = $vbulletin->GPC['radioanswer10'];
$radioanswer10other = $vbulletin->GPC['radioanswer10other'];

Basically, all I did was ad more Radio features -but it still only shows the 3 - is that coded into / apart of the template, that cannot be changed? (basically tryin to create 10 for a rating of 1-10)

Also:

how can I have the drop down box, direct where the form/post goes?

Digital Jedi
11-04-2008, 06:00 PM
I'm trying to ad more then the 3 Radio Buttons, this is the code I've added:

Part 1:

$vbulletin->input->clean_array_gpc('p', array(
'normalanswer1' => TYPE_STR,
'radioanswer1' => TYPE_STR,
'radioanswer2' => TYPE_STR,
'radioanswer3' => TYPE_STR,
'radioanswer4' => TYPE_STR,
'radioanswer5' => TYPE_STR,
'radioanswer6' => TYPE_STR,
'radioanswer7' => TYPE_STR,
'radioanswer8' => TYPE_STR,
'radioanswer9' => TYPE_STR,
'radioanswer10' => TYPE_STR,
'radioanswer10other' => TYPE_STR,

Part 2:


$normalanswer1 = $vbulletin->GPC['normalanswer1'];
$radioanswer1 = $vbulletin->GPC['radioanswer1'];
$radioanswer2 = $vbulletin->GPC['radioanswer2'];
$radioanswer3 = $vbulletin->GPC['radioanswer3'];
$radioanswer4 = $vbulletin->GPC['radioanswer4'];
$radioanswer5 = $vbulletin->GPC['radioanswer5'];
$radioanswer6 = $vbulletin->GPC['radioanswer6'];
$radioanswer7 = $vbulletin->GPC['radioanswer7'];
$radioanswer8 = $vbulletin->GPC['radioanswer8'];
$radioanswer9 = $vbulletin->GPC['radioanswer9'];
$radioanswer10 = $vbulletin->GPC['radioanswer10'];
$radioanswer10other = $vbulletin->GPC['radioanswer10other'];

Basically, all I did was ad more Radio features -but it still only shows the 3 - is that coded into / apart of the template, that cannot be changed? (basically tryin to create 10 for a rating of 1-10)

Also:

how can I have the drop down box, direct where the form/post goes?
You also have to put the radio button's form code into the form template, as well as putting the answer varible into the formanswer template.

Sawa Dee SohL
11-04-2008, 06:19 PM
Are you speaking about the part at the VERY bottom that says 'DO NOT CHANGE BELOW UNLESS YOU KNOW WHAT YOU ARE DOING!!'

(a long bit of coding after that)

Sawa Dee SohL
11-04-2008, 06:45 PM
Slight change of mind...

I'm having an issue finding where to add more options for the Drop down box, the only coding I see for it is:

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 == '')

can you tell me how to make the Radio icon (the one that is clicked) - will direct to the correct forum?

Radio Button 1 = Forum 1 Radio Button 2 = Forum 2 ect..

a33
11-04-2008, 08:10 PM
Are you speaking about the part at the VERY bottom that says 'DO NOT CHANGE BELOW UNLESS YOU KNOW WHAT YOU ARE DOING!!'

(a long bit of coding after that)

No he is talking about editing the templates ...It is a very different section

Go to : Admin panel --> Styles & Templates --> Style Manager --> edit templates --> Form (and then formanswers)

The Form template is the Question layout

The formanswers template the the layout for the answers

a33
11-04-2008, 08:18 PM
Slight change of mind...

I'm having an issue finding where to add more options for the Drop down box, the only coding I see for it is:

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 == '')

can you tell me how to make the Radio icon (the one that is clicked) - will direct to the correct forum?

Radio Button 1 = Forum 1 Radio Button 2 = Forum 2 ect..

Is this the section you are looking for?

//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 = "71";

Sawa Dee SohL
11-04-2008, 11:25 PM
Yes I have the Forumid pointed - and it's going to the correct area for now.

But what I was trying to do is have 2 Radio buttons be the 'selecting device' for which Forum it goes to.

We have 2 Radio buttons:

Movie Review / Game Review

I have it so they all go to one Forum for the moment until we can sort it out, but I would like the Game Review Radio button, to go to Forumid X, and have Movie Review Radio button go to ForumId Y if selected.

Basically, depending on which Radio Button is used, will determine where to put the form when finished. I hope this makes sense, sorry :-/

a33
11-05-2008, 09:10 AM
$formforumid = "$dropdownanswer1";


If you "search this mod" (top right of this page) for "forumid" you might find some more useful answers :)

ntrance
11-11-2008, 08:02 PM
Is there a way to only allow registered users to use the form, Currently we are being spammed using the form.

Also can you get the IP address in the post to ban if the form post is a spam

a33
11-11-2008, 08:32 PM
ntrance

Turn the usergroup for unregistered off . (take out the number from the usergroup section in the code)

Digital Jedi
11-12-2008, 03:47 AM
Is there a way to only allow registered users to use the form, Currently we are being spammed using the form.

Also can you get the IP address in the post to ban if the form post is a spam
As a33 said, it's in the plugin towards the top of the editable region. You set your usergroups there.

Murex
11-12-2008, 05:19 PM
Is there a way to take $answer1 and have it written to a custom field in the user's profile settings? IE. It asked them for the make of their car, and it writes it to field8.

MrAd
11-14-2008, 09:48 AM
is it possible to put ip adress to the forum. It can be taken either from forum or externally such as whatismyip.com

Ipadress:
Your Ipadress.

Sawa Dee SohL
11-14-2008, 07:17 PM
Is there a way to only allow registered users to use the form, Currently we are being spammed using the form.

Also can you get the IP address in the post to ban if the form post is a spam

The line you're looking for is:

////////////////////////////////////////////////////////////////////////////////////////////////////

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

////////////////////////////////////////////////////////////////////////////////////////////////////

Which is neard the top of the hack.

----

My question for some help:

I'm trying to get the text(content I put in) to show up bigger - How can I enlarge the text/Make the font bigger?

How would I be able to make it so the Radio buttons - aren't so spread apart? Or make the font smaller for the default questions?

Digital Jedi
11-14-2008, 07:21 PM
For the form itself, you can edit the HTML in the form template wherever you need to. For the submitted form, the only thing you can add is BBCode to the formanswer template, and you sometime have to space the code away from the variables, or it will give you a conditionals error when trying to save it.

$longanswer

EricPSF
11-15-2008, 09:30 PM
Hi,

Great mod!

Is it possible to direct/ link to another webpage after submission of the form? How to do it?

Thanks!

asandhanam
11-15-2008, 11:21 PM
Thanks for the mod. I installed it several months back and running fine. But i need to be able to use a captcha image verification with this to stop spam (been receiving a lot of spam these days). Which one would you recommend? I'm sorry if this has been answered earlier. There are lot of comments and doesn't look like i can go through all of them:)

Digital Jedi
11-16-2008, 02:26 AM
Hi,

Great mod! Is is suitable for 3.7.X?

Thanks!
Yes, I and others have it running on various 3.7s.

Thanks for the mod. I installed it several months back and running fine. But i need to be able to use a captcha image verification with this to stop spam (been receiving a lot of spam these days). Which one would you recommend? I'm sorry if this has been answered earlier. There are lot of comments and doesn't look like i can go through all of them:)
Check the Add Ons at the bottom of the main post.

asandhanam
11-16-2008, 02:38 AM
Thanks I did. Doesn't look like these are supported anymore?
# Double Image Verification * Forms & Custom pages
# Image Match "Forms Hack add-on"

parabat
11-16-2008, 09:33 AM
Already had done that. It was some other issue, thanks anyway.

Hi aflax045
Can you tell me how you corrected that issue you had?
-PB

asandhanam
11-16-2008, 03:40 PM
Thanks I did. Doesn't look like these are supported anymore?
# Double Image Verification * Forms & Custom pages
# Image Match "Forms Hack add-on"
Can anybody suggest a captcha system that works well with this hack? I tried noSpam. But encountered problems getting it to work with this.

Stryker412
11-16-2008, 10:18 PM
DJ, I use the forms for an application process and it is submitted into an area that only certain people have access to. The applicants cannot read the area it is submitted to but I found out that they can subscribe to the thread and be sent the replies. How can I deny anyone from subscribing in that section?

Digital Jedi
11-17-2008, 06:16 AM
Can anybody suggest a captcha system that works well with this hack? I tried noSpam. But encountered problems getting it to work with this.
My solution was to just link unregistered users to the registration page, and then have used a redirect to the forum upon registration. That might not work for everyone though.

DJ, I use the forms for an application process and it is submitted into an area that only certain people have access to. The applicants cannot read the area it is submitted to but I found out that they can subscribe to the thread and be sent the replies. How can I deny anyone from subscribing in that section?
Only thing I can think of at the moment, short of disabling subscriptions altogether, is to have the threads in that section go into the moderator queue first, and the upon approval, check it's subscription status with the thread starter. Or you can use the Unsubscribe option in the Admin CP an remove subscriptions from a specific user from a specific forum.

But then, I haven't checked to see if Abe set a variable setting for this.

Sawa Dee SohL
11-17-2008, 04:13 PM
I'm trying to get the text(content I put in) to show up bigger - How can I enlarge the text/Make the font bigger?

How would I be able to make it so the Radio buttons - aren't so spread apart? Or make the font smaller for the default questions?

Murex
11-20-2008, 04:13 AM
So nothing on getting a field written to the database?

Digital Jedi
11-23-2008, 02:28 AM
I have a particularly large form to fill out. I notice if I spend a long time filling out the form, trying to submit or preview results in a security token error. I presume that means that it's just timed out. Is this a function of vBulletin on creating a new thread or is this a function of the modification and how would I increase the time limit?

Simon Lloyd
11-23-2008, 09:35 AM
Your errors on unregistered users getting replies would be removed if you chose the email or pm options for the form.

The timeout i suspect is set in your vbulletin options as i have had a form open for over 30 mins before hitting preview and has worked ok.

s810car
11-24-2008, 10:43 AM
I have been making an extensively complicated form, which has been coming out beautifully for what I need to do. I do have a problem though, I can't seem to edit the form answer template with any spaces, I have worked around some of that with the indent bbcode, but im also setting up some parts of the end user display inline like this:

info here(about 8 spaces)info here(about 8 spaces)info here
but it comes out like

info here info here info here

using nbsp stuff doesn't work cause it just displays it, any idea how to remedy this?

EDIT: lol happened in this editor too so had to write those comments up there, maybe it isn't able to be done with vBulletins WYSIWYG currently

Digital Jedi
11-24-2008, 05:06 PM
I have been making an extensively complicated form, which has been coming out beautifully for what I need to do. I do have a problem though, I can't seem to edit the form answer template with any spaces, I have worked around some of that with the indent bbcode, but im also setting up some parts of the end user display inline like this:

info here(about 8 spaces)info here(about 8 spaces)info here
but it comes out like

info here info here info here

using nbsp stuff doesn't work cause it just displays it, any idea how to remedy this?

EDIT: lol happened in this editor too so had to write those comments up there, maybe it isn't able to be done with vBulletins WYSIWYG currently
The only way around that is to create your own BBCode that inserts a &nbsp;.

s810car
11-24-2008, 07:06 PM
yeah, problem with that is if the user is allowed to edit the post, they will see all the custom bbcode tags like I put in a noparse bbcode, makes it a mess.

Only workaround I found at the moment is hard-coding the class_bbcode.php, near the bottom is all of vbulletins $tag_list items. I was too lazy to read through all of the code to create a custom value option one, so made 3 tags at 9, 20, and 50 pixels. Heres the code in case anyone else had that issue:
// [SPACE20]
$tag_list['no_option']['space20'] = array(
'html' => '<span style="margin-left:20px;">%1$s</span>',
'strip_empty' => true,
'strip_space_after' => 1
);
The codes that allowed a {option} parameter had different code, but im sure anyone who reads through the code can figure it out

davida500
11-26-2008, 03:39 PM
You have to be logged in to fill in a form, if you are not then this error is received:


Fatal error: Existing data passed is not an array
Called set_existing in [path]/newthread.php(74) : eval()'d code on line 350
Called eval in [path]/newthread.php on line 74
in [path]/includes/class_dm.php on line 235

Anyway is there a way to make it so this error disappears if you are not logged in?

Thanks.

David.

Digital Jedi
11-27-2008, 03:44 AM
You have to be logged in to fill in a form, if you are not then this error is received:


Fatal error: Existing data passed is not an array
Called set_existing in [path]/newthread.php(74) : eval()'d code on line 350
Called eval in [path]/newthread.php on line 74
in [path]/includes/class_dm.php on line 235

Anyway is there a way to make it so this error disappears if you are not logged in?

Thanks.

David.
Do you have the form enabled for guests in the plugin variable settings?

davida500
11-28-2008, 11:11 PM
I didnt that was the problem, thank you :D

David.

Deepdog009
12-01-2008, 03:43 AM
Thanks for the mod. I installed it several months back and running fine. But i need to be able to use a captcha image verification with this to stop spam (been receiving a lot of spam these days). Which one would you recommend? I'm sorry if this has been answered earlier. There are lot of comments and doesn't look like i can go through all of them:)

**********************************************
asandhanam,,, I just updated one of my older mods with better integration with Form Hack...

It should slow your spammers down to a drip-drop-drip...;)

Give it a Go...>>> Image Match <<<

Welshy2008
12-02-2008, 03:02 PM
Good Evening.

Is it possible for this to be modified so that it can be pre-question by me as Admin, so that my Registered Users can fill out their details and they would show in a "POST" as apposed to a "Thread".

It would be great if it could be run from ACP By ADMIN and also reset the questions or pre-filled out fields by Admin too.

The reason I ask Is that I want to start a thread up dedication to my forum members to advertise their businesses for FREE.

Basic things like: Business Name: Business Address: Business E-mail: Areas Covoered: Exclusions: Registered Scheme Provider: etc.

Deepdog009
12-02-2008, 10:51 PM
Good Evening.

Is it possible for this to be modified so that it can be pre-question by me as Admin, so that my Registered Users can fill out their details and they would show in a "POST" as apposed to a "Thread".


It would be great if it could be run from ACP By ADMIN and also reset the questions or pre-filled out fields by Admin too.

The reason I ask Is that I want to start a thread up dedication to my forum members to advertise their businesses for FREE.

Basic things like: Business Name: Business Address: Business E-mail: Areas Covoered: Exclusions: Registered Scheme Provider: etc.

**************************************************

Welshy2008,,,
ABE1 posted about an updated version of the Form Hack that uses Admin options...

PM ABE1 for more info...

davida500
12-04-2008, 06:06 AM
I have been using this for a long time now, i must say it is a great mod, keep up the awesome work Abe1

designerweb
12-07-2008, 01:13 PM
Will this work with 3.8?

meissenation
12-09-2008, 11:46 AM
Does anyone know how to make it so that if you have it set up to reply to a thread that you can set who it is that is making the post? We have the form being submitted to a hidden forum that only Administrators have access to. While posting a reply does infact work (their replies show up as moderated/unapproved) - they can not use the attachment feature since they do not have access to that forum. I was hoping if I change it to be a specific username that has access to the administrator forum that it would then allow attachments?

Digital Jedi
12-09-2008, 12:08 PM
Does anyone know how to make it so that if you have it set up to reply to a thread that you can set who it is that is making the post? We have the form being submitted to a hidden forum that only Administrators have access to. While posting a reply does infact work (their replies show up as moderated/unapproved) - they can not use the attachment feature since they do not have access to that forum. I was hoping if I change it to be a specific username that has access to the administrator forum that it would then allow attachments?
Try customizing the forum permissions for that particular Usergroup for that particular forum. You can grant them permission to upload attachments for that area by itself as well give them the ability to post threads. I have it set up to where they can only view the thread they've posted and nothing else.

meissenation
12-09-2008, 12:36 PM
D'oh - thank you sir! I left everything for Registered Users set to No under the Forum Permissions but changed the Upload Attachments to Yes and now it appears :)

Edit: Well - one step forward, but not quite there. If I make it so they can upload attachments it gives them the button for the attachments but it does not allow them to actually attach to the form. I have to make it so it goes to a forum that's off limits to Registered Users due to personal information being posted in the form (Address, phone #, email, etc) but really want them to be able to attach.

Grimbone
12-10-2008, 04:59 AM
I cannot find my templates to edit anywhere at all. When i goto Style Manager -> Edit Templates nothing is listed at all under custom templates. Clearly the templates have to be somewhere because my test page is showing the form I have been working on in the Plugin PHP Code section.

http://www.legacyofthehorde.com/forums/newthread.php?do=wow_form

The Plugin Code shows...

// Name of the main template
$maintemplate = "form";
// Name of the answer template
$answertemplate = "formanswers";

but I cannot find the templates.

Any ideas?

WNxWakko
12-10-2008, 10:10 AM
Since my upgrade to 3.7, i get an error when viewing a form that is intended for those not logged in. The error only displays if you are not logged in and yes I have the guest variable enabled.

Fatal error: Call to undefined function fetch_registration_string() in /warriornation.net/httpdocs/Forum/newthread.php(74) : eval()'d code on line 4253

EDIT, took out all the image verification and the error is gone. However submitting forms as unregistered isnt working anymore. I get the confirmation message as if its worked, however the thread never shows up in the forum specified. Yes i have unregistered usergroup post ability enabled in it.

meissenation
12-10-2008, 01:10 PM
I cannot find my templates to edit anywhere at all. When i goto Style Manager -> Edit Templates nothing is listed at all under custom templates. Clearly the templates have to be somewhere because my test page is showing the form I have been working on in the Plugin PHP Code section.

http://www.legacyofthehorde.com/forums/newthread.php?do=wow_form

The Plugin Code shows...

// Name of the main template
$maintemplate = "form";
// Name of the answer template
$answertemplate = "formanswers";

but I cannot find the templates.

Any ideas?

It's not listed under custom templates but it will be listed in the list of templates alphabetically. Scroll down to the "F" templates and you'll see it.

Digital Jedi
12-10-2008, 07:54 PM
D'oh - thank you sir! I left everything for Registered Users set to No under the Forum Permissions but changed the Upload Attachments to Yes and now it appears :)

Edit: Well - one step forward, but not quite there. If I make it so they can upload attachments it gives them the button for the attachments but it does not allow them to actually attach to the form. I have to make it so it goes to a forum that's off limits to Registered Users due to personal information being posted in the form (Address, phone #, email, etc) but really want them to be able to attach.
When you say it doesn't allow them, what does it do exactly? Does no upload form show up, or does it restrict the posting of the message upon submit? Check your Message Attachment Options as well under vBulletin Options.


I cannot find my templates to edit anywhere at all. When i goto Style Manager -> Edit Templates nothing is listed at all under custom templates. Clearly the templates have to be somewhere because my test page is showing the form I have been working on in the Plugin PHP Code section.

http://www.legacyofthehorde.com/forums/newthread.php?do=wow_form

The Plugin Code shows...

// Name of the main template
$maintemplate = "form";
// Name of the answer template
$answertemplate = "formanswers";

but I cannot find the templates.

Any ideas?
The Custom Templates list is for templates YOU create. Modifications generally put their templates, as meissenation mentioned, alphabetically in the main template listing.


Since my upgrade to 3.7, i get an error when viewing a form that is intended for those not logged in. The error only displays if you are not logged in and yes I have the guest variable enabled.



EDIT, took out all the image verification and the error is gone. However submitting forms as unregistered isnt working anymore. I get the confirmation message as if its worked, however the thread never shows up in the forum specified. Yes i have unregistered usergroup post ability enabled in it.
Only other thing I can think of is to check to the forum ID variable in the plugin, as well as ENABLE FORM TO BE POSTED setting.

Grimbone
12-10-2008, 08:50 PM
Thanks for point me in the right direction!

Great mod!

rhamer
12-10-2008, 11:08 PM
Without sounding stupid, is there a complete idiots guide to getting this working?

I am a new forum admin, but I am a programmer (not PHP) and I am struggling to understand how this all hangs together and how to make it work.

I imported the XML file with the product manager.
I then found the plugin and edited that, although I didnt make any changes.
I figured that the PHP code was what generated the form, so I left that alone for the minute to just get something to work.

However I don't know how to get this to trigger from a forum i.e when I press the new thread button, I don't get the form.

I assume you enable it somehow for each forum.

I also don't understand the relationship between the product and the plugin. Do you use the priduct to create multiple plugins as needed? How are they named and how does the name relate to which form you want displayed in each forum?

I tried reading this entire thread, but 90 pages is beyond me making sense of it.

Any help and guidence would be most appreciated.

Cheers

Rohan

Digital Jedi
12-11-2008, 04:46 AM
Without sounding stupid, is there a complete idiots guide to getting this working?

I am a new forum admin, but I am a programmer (not PHP) and I am struggling to understand how this all hangs together and how to make it work.

I imported the XML file with the product manager.
I then found the plugin and edited that, although I didnt make any changes.
I figured that the PHP code was what generated the form, so I left that alone for the minute to just get something to work.

However I don't know how to get this to trigger from a forum i.e when I press the new thread button, I don't get the form.

I assume you enable it somehow for each forum.

I also don't understand the relationship between the product and the plugin. Do you use the priduct to create multiple plugins as needed? How are they named and how does the name relate to which form you want displayed in each forum?

I tried reading this entire thread, but 90 pages is beyond me making sense of it.

Any help and guidence would be most appreciated.

Cheers

Rohan
Most of this is explained in the supplied documentation, but basically, you only need to edit the plugin and the two templates. The $variables are defined in the plugin. If you tell the plugin that $firstname is equal to "First Name", then every instance of $firstname in the template will convert to First Name.

You don't necessarily have to do that for all text, as is shown in the example plugin, but you do need to do it for the form areas. Open the plugin again and go through the area again line by line. There's instructions all through the plugin on what does what and what needs to be configured. In fact, most, if not all of the documentation was worked into the plugin's comments.

rhamer
12-11-2008, 07:15 AM
Thanks Jedi, I have now got it working.

The biggest problem I had was understanding how it worked, I didn't realise that this was a page that you linked to, that in turn took the results and posted them. I was thinking the form would appear when I clicked the "New Thread" button on a nominated forum.

I do however have a couple of questions.

How do I stop guests from using the form? i.e make the submit not work if your not logged on and
Can the formanswer template have HTML tags in it like <b></b>? I tried adding them but it just showed the tags in the result.

Cheers

Rohan

Digital Jedi
12-11-2008, 11:20 AM
Thanks Jedi, I have now got it working.

The biggest problem I had was understanding how it worked, I didn't realise that this was a page that you linked to, that in turn took the results and posted them. I was thinking the form would appear when I clicked the "New Thread" button on a nominated forum.

I do however have a couple of questions.

How do I stop guests from using the form? i.e make the submit not work if your not logged on and
Can the formanswer template have HTML tags in it like <b></b>? I tried adding them but it just showed the tags in the result.

Cheers

Rohan
It won't accept HTML, I presume, for security reasons. But you can use BBCode, as long as you keep the variables a space away for the code. At least, my experience has been that it doesn't like it if you do this: $variable It only likes this: $variable

Guests permissions is a variable in the plugin.

etzero
12-11-2008, 06:45 PM
DJ, This is a question in referance to post #1313 where a someone asked:

I use the forms for an application process and it is submitted into an area that only certain people have access to. The applicants cannot read the area it is submitted to but I found out that they can subscribe to the thread and be sent the replies. How can I deny anyone from subscribing in that section?

Which I think I may have found a solution to. If you could please verify or deny this I would appreciate it.

The default code looks like this:

if ($vbulletin->userinfo['autosubscribe'] != -1)
{
$newpost['emailupdate'] = $vbulletin->userinfo['autosubscribe'];
}
else
{
$newpost['emailupdate'] = 9999;
}


My thought is that it if changed to this it should always delete the users subscrition regardless if he was set up though the user CP.


$newpost['emailupdate'] = 9999;



By looking at functions_newpost.php, '9999' apears to be the correct value to delete any subscritions for that thread?

// ### DO THREAD SUBSCRIPTION ###
if ($vbulletin->userinfo['userid'] != 0)
{
require_once(DIR . '/includes/functions_misc.php');
$post['emailupdate'] = verify_subscription_choice($post['emailupdate'], $vbulletin->userinfo, 9999);

($hook = vBulletinHook::fetch_hook('newpost_subscribe')) ? eval($hook) : false;

if (!$threadinfo['issubscribed'] AND $post['emailupdate'] != 9999)
{ // user is not subscribed to this thread so insert it
/*insert query*/
$vbulletin->db->query_write("INSERT IGNORE INTO " . TABLE_PREFIX . "subscribethread (userid, threadid, emailupdate, folderid, canview)
VALUES (" . $vbulletin->userinfo['userid'] . ", $threadinfo[threadid], $post[emailupdate], $post[folderid], 1)");
}
else
{ // User is subscribed, see if they changed the settings for this thread
if ($post['emailupdate'] == 9999)
{ // Remove this subscription, user chose 'No Subscription'
$vbulletin->db->query_write("DELETE FROM " . TABLE_PREFIX . "subscribethread WHERE threadid = $threadinfo[threadid] AND userid = " . $vbulletin->userinfo['userid']);
}
else if ($threadinfo['emailupdate'] != $post['emailupdate'] OR $threadinfo['folderid'] != $post['folderid'])
{
// User changed the settings so update the current record
/*insert query*/
$vbulletin->db->query_write("REPLACE INTO " . TABLE_PREFIX . "subscribethread (userid, threadid, emailupdate, folderid, canview)
VALUES (" . $vbulletin->userinfo['userid'] . ", $threadinfo[threadid], $post[emailupdate], $post[folderid], 1)");
}
}
}


It seems counter intuitive as I would have guessed a value of ‘0’ would remove subscriptions.

8dayssooner
12-12-2008, 10:11 PM
I've just edited my form, and now i get the error message Parse error: syntax error, unexpected T_STRING in /mnt/web2/33/89/51544289/htdocs/forums/newthread.php(71) : eval()'d code on line 888

Line 71 of newthread.php refers to ($hook = vBulletinHook::fetch_hook('newthread_start')) ? eval($hook) : false;
and the error message dissapears when i disable form hack... is there anyone who could support me with this on 3.6?

Help would be much appreciated as i'm trying to use this as a Nominations form for a board awards!

Many thanks in advance!

Mike

WNxWakko
12-13-2008, 01:58 PM
Only other thing I can think of is to check to the forum ID variable in the plugin, as well as ENABLE FORM TO BE POSTED setting.

None of that has changed. Ive been using these forms for 2 years and they have always worked. They do work if your logged into an account, the issue is if you are unregistered, the form never creates the thread even though you get the confirmation message. The forum ID is correct because it works right if im logged in.

The only change ive made after the upgrade to 3.7.x is adding the security input code bit. Outside of that, nothing has changed. I suspect something is different for unregistered users from 3.6 to 3.7

xTerMn8R
12-14-2008, 12:17 AM
Anyone get tables to work in the answer Template?

I can get my Bold to show in the PM's using the bbcode [B]space{varible}space[B/]

But when I export them or look at the e-mails each line has the BBcode tags and that looks like crap. Am I doing something wrong here. Also does anyone know of a hack to allow you to print PM's

Thanks,
Tom

2dub
12-15-2008, 06:47 PM
I just got this to work after many hours of trying to get it to work. I wish it were editable in vB options.

It is a great hack once you figure it out.

Digital Jedi
12-16-2008, 02:59 AM
DJ, This is a question in referance to post #1313 where a someone asked:



Which I think I may have found a solution to. If you could please verify or deny this I would appreciate it.

The default code looks like this:

if ($vbulletin->userinfo['autosubscribe'] != -1)
{
$newpost['emailupdate'] = $vbulletin->userinfo['autosubscribe'];
}
else
{
$newpost['emailupdate'] = 9999;
}


My thought is that it if changed to this it should always delete the users subscrition regardless if he was set up though the user CP.


$newpost['emailupdate'] = 9999;



By looking at functions_newpost.php, '9999' apears to be the correct value to delete any subscritions for that thread?

// ### DO THREAD SUBSCRIPTION ###
if ($vbulletin->userinfo['userid'] != 0)
{
require_once(DIR . '/includes/functions_misc.php');
$post['emailupdate'] = verify_subscription_choice($post['emailupdate'], $vbulletin->userinfo, 9999);

($hook = vBulletinHook::fetch_hook('newpost_subscribe')) ? eval($hook) : false;

if (!$threadinfo['issubscribed'] AND $post['emailupdate'] != 9999)
{ // user is not subscribed to this thread so insert it
/*insert query*/
$vbulletin->db->query_write("INSERT IGNORE INTO " . TABLE_PREFIX . "subscribethread (userid, threadid, emailupdate, folderid, canview)
VALUES (" . $vbulletin->userinfo['userid'] . ", $threadinfo[threadid], $post[emailupdate], $post[folderid], 1)");
}
else
{ // User is subscribed, see if they changed the settings for this thread
if ($post['emailupdate'] == 9999)
{ // Remove this subscription, user chose 'No Subscription'
$vbulletin->db->query_write("DELETE FROM " . TABLE_PREFIX . "subscribethread WHERE threadid = $threadinfo[threadid] AND userid = " . $vbulletin->userinfo['userid']);
}
else if ($threadinfo['emailupdate'] != $post['emailupdate'] OR $threadinfo['folderid'] != $post['folderid'])
{
// User changed the settings so update the current record
/*insert query*/
$vbulletin->db->query_write("REPLACE INTO " . TABLE_PREFIX . "subscribethread (userid, threadid, emailupdate, folderid, canview)
VALUES (" . $vbulletin->userinfo['userid'] . ", $threadinfo[threadid], $post[emailupdate], $post[folderid], 1)");
}
}
}


It seems counter intuitive as I would have guessed a value of ?0? would remove subscriptions.
That's probably just a little beyond my current level of understanding right now. But my gut is telling me that your on the right track. Is this not going to try to remove the subscription before the user is actually subscribed?

j_86
12-16-2008, 02:41 PM
I attach a slightly cleaner, indented copy of the standard form template (with the 3.6 security token fix applied (Form Hack 4.1)).

I find it easier to use with clear indentation.

Digital Jedi
12-20-2008, 04:32 AM
Looks like I'm running into the Invalid Forum specified message myself now. The URL doesn't append with a thread ID. I see for most people it "fixed itself" when that happened. Any one ever figure out how that actually happened? I just copy and pasted a working Form Hack plugin from my demo board and it's working fine there. Just doesn't seem to work on a new install.

bluesoul
12-29-2008, 02:38 AM
Sorry, I couldn't find a good search string, but how does one update the script to work with 3.7.4?

wacodep
01-02-2009, 12:49 PM
Searched through the thread, but to no avail.

The Form Hack is working fine, the message is being posted to the hidden forum correctly, yada blah etc.

The problem is with manage attachments. While it DOES show the link on the form to "Attach Files", when you click the button labeled "Manage Attachments", the new window pops up, but then the users get the "No Permissions" message. I can see it fine as admin.

The hack results ARE being posted to a "hidden" forum just fine (sans the attachment, obviously).

Permissions for the usergroups (for the user attempting to add attachments) ARE set to allow attachments and allow posting to the otherwise hidden forum (but no permission to view).

This worked fine with the previous version of the Form Hack under vB 3.5. I'm now using Form Hack 4.1 under vB 3.7.4.

Any suggestions would be appreciated.

Trek
01-06-2009, 03:23 AM
I have this all working pretty good, it looks great and almost does what I want.

It posts to a forum as it should, but:

I want this forum to be locked down from posting new posts any way other than through the Form Hack.

I want those who have created threads using Form Hack to be able to edit and reply to their own posts, but no others.

Everyone should be able to view the posts.

Most of this is doable through the permissions, the problem seems to be making it so people can only post through FormHack to the forum (I don't want a bunch of non-standard templated messages posted there).

I've looked through the threads, but with 90 pages, I didn't see everything. Did a few searches, but couldn't find the answer either.

Thanks for any help!

Kwikms
01-06-2009, 05:42 AM
@Trek - https://vborg.vbsupport.ru/showthread.php?t=102923

Works with 3.7.x as well.

Sawa Dee SohL
01-08-2009, 05:36 PM
hi, I'm trying to set this Mod up for Reviews and Guides that are submitted to my site...

Is there a way that once they fill out the form, the form is posted - in a different format? For example some fields they fill out, will not show - and some fields they fill out, will show in different spots on the form (after accepted)

Example here (http://thesocialrev.com/forum/showthread.php?t=1896)

You see 'Title of Review' - is different then the title of post - can the 'Title of review' = thread title?

---

I'm also curious as to how to set this up, so the form itself once accepted - posts onto a Custom page created.

If possible can someone PM, or add me to MSN who's willing to help me... I'd really appreciate it!!

msn: skullz.r.us@hotmail.com

life is boost
01-09-2009, 06:19 AM
hey guys,

Has anyone gotten attachments to work with this? we are on 3.7.1 and never see the attachment panel under the message body. we have this form set to post in a forum. we also have the forum set to allow attachments. I even installed an unedited form and still no attachments. any help is greatly appreciated.

Digital Jedi
01-09-2009, 04:27 PM
Do you have the attachment option enabled in the plugin? It should be showing up wherever you put the attachment variable in the form template. The default example looks like this:

<if condition="$attachmentoption">
<tr>
<td class="alt1" colspan="3" align="center">
<div style="width:$stylevar[formwidth]" align="$stylevar[left]">$attachmentoption</div>
</td>
</tr>
</if>

davida500
01-09-2009, 08:48 PM
Someone please help me, i already have 3 forms running, and i seem to be getting an error when i enable this new one, i get this error on all my currently active forms too when i active this one form, and they all stop working.

Please help!

David.


Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in /home/ibgwssph/public_html/forums/newthread.php(74) : eval()'d code on line 1126

davida500
01-09-2009, 08:50 PM
And here is the code



// 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.

// Name of this form
$formname = "privateforum";

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

// ################################################## #####################
// ######################## CUSTOMIZE VARIABLES ##########################
// ################################################## #####################

////////////////////////////////////////////////////////////////////////////////////////////////////
////// BEGIN CUSTOMIZATION BELOW////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////////////////////
//VARIABLES
//Study how variables are add here to add or remove any. If you add a variable to your form, you must add it to part one and part two.
////////////////////////////////////////////////////////////////////////////////////////////////////

// Part 1
$vbulletin->input->clean_array_gpc('p', array(
'answer1' => TYPE_STR,
'answer2' => TYPE_STR,
'answer3' => TYPE_STR,
'answer4' => TYPE_STR,
'answer5' => TYPE_STR,
'longanswer1' => TYPE_STR
'longanswer2' => TYPE_STR
));

// Part 2
$answer1 = $vbulletin->GPC['answer1'];
$answer2 = $vbulletin->GPC['answer2'];
$answer3 = $vbulletin->GPC['answer3'];
$answer4 = $vbulletin->GPC['answer4'];
$answer5 = $vbulletin->GPC['answer5'];
$longanswer1 = $vbulletin->GPC['longanswer1'];
$longanswer2 = $vbulletin->GPC['longanswer2'];

////////////////////////////////////////////////////////////////////////////////////////////////////
//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['usergroupid'], array(2,5,6,7))) print_no_permission();

////////////////////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////////////////////
//NAME OF TEMPLATES - DO THIS BIT IF YOU ARE MAKING MORE FORMS AND WANT TO USE A DIFFERENT LOOKING TEMPLATE
////////////////////////////////////////////////////////////////////////////////////////////////////

// Name of the main template
$maintemplate = "privateforum";
// Name of the answer template
$answertemplate = "privateforumanswers";

////////////////////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////////////////////
//CHOOSE WHETHER YOU WANT FORM TO BE POSTED IN A NEW THREAD, NEW POLL, REPLY TO EXISITING THREAD, PMed OR EMAILED
///////////////////////////////////////////////////////////////////////////////////////////////////

//ENABLE FORM TO BE POSTED - 1 = yes, 0 = no
$formforum = "1";

//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 = "17";

//ENABLE POLL TO BE CREATED - 1 = yes, 0 = no
$formpoll = "0";
$polloption[1] = "Yes";
$polloption[2] = "No";
$polloption[3] = "Maybe";

//Make poll public - 1 = yes, 0 = no
$pollpublic = "0";

////////////////////////////////////////////////////////////////////////////////////////////////////

//ENABLE FORM TO REPLY TO EXISTING THREAD - 1 = yes, 0 = no
$formreply = "0";

//EXISTING THREAD ID FOR FORM TO REPLY IN
$formreplythreadid = "12345";

////////////////////////////////////////////////////////////////////////////////////////////////////

//ENABLE FORM TO BE PMED (guests CANNOT use this option) - 1 = yes, 0 = no
$formpm = "0";

//USERNAME TO PM TO (separate multiple usernames with a ';')
$formpmname = "Abe";

////////////////////////////////////////////////////////////////////////////////////////////////////

//ENABLE FORM TO BE EMAILED - 1 = yes, 0 = no
$formemail = "0";

//EMAIL ADDRESS TO EMAIL TO (separate multiple usernames with a ';')
$formemailaddress = "youremail@yourforums.com";

////////////////////////////////////////////////////////////////////////////////////////////////////

//ENABLE ATTACHMENTS - 1 = yes, 0 = no
//attachments can only be used if the form is going to make a new thread or post
$allow_attachments = "0";

////////////////////////////////////////////////////////////////////////////////////////////////////



////////////////////////////////////////////////////////////////////////////////////////////////////
//REDIRECT OPTIONS:
// 0 - thank you message (thread, reply, pm, or email)
// 1 - redirect to post (thread or reply)
// 2 - redirect to thread (thread only)
// 3 - redirect to forum (thread only)
// 4 - redirect to editpost (thread or reply)
//
// Feel free to change the thank you message if you choose option 0
////////////////////////////////////////////////////////////////////////////////////////////////////

$redirectoption = "0";

$errormessage = "Thank you for submitting this form!"; //This is the thank you message

////////////////////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////////////////////
//FORCE USER TO ANSWER ALL QUESTIONS - 1 = yes, 0 = no
//If you added or deleted variables, you must edit what it checked for. Search for "$answerall ==" and edit 2 lines under it.
////////////////////////////////////////////////////////////////////////////////////////////////////

$answerall = "0";

////////////////////////////////////////////////////////////////////////////////////////////////////
//TITLE OF FORM (do not use quotation marks or you will get a parse error, besides the quotes around the whole title)
////////////////////////////////////////////////////////////////////////////////////////////////////

$formtitle = "Private Forum Request";

////////////////////////////////////////////////////////////////////////////////////////////////////
//TITLE OF THREAD/POST/PM/EMAIL (do not use quotation marks in the title or you will get a parse error)
//You may use variables from the form for this.
////////////////////////////////////////////////////////////////////////////////////////////////////

$posttitle = "$Private Forum Request";

////////////////////////////////////////////////////////////////////////////////////////////////////
//PURPOSE OF FORM (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
////////////////////////////////////////////////////////////////////////////////////////////////////

$formpurpose = "The purpose of this form is to allow you to submit a form, and this form will be made into a thread in a particular forum, or be PMed to a moderator or be emailed to a moderator.";

////////////////////////////////////////////////////////////////////////////////////////////////////


//QUESTION 1 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
$question1 = "What is your name?";
$explain1 = "Please enter your real name here.";

//QUESTION 2 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
$question2 = "What is your email?";
$explain2 = "Please enter your real email here.";

//QUESTION 3 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
$question3 = "What is your website?";
$explain3 = "Please enter your URL here.";

//QUESTION 4 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
$question4 = "What is your website?";
$explain4 = "Please enter your URL here.";

//QUESTION 5 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
$question5 = "What is your website?";
$explain5 = "Please enter your URL here.";



$longquestion1 = "Please write down a paragraph about yourself.";
$longexplain1 = "For example, a bit about your experience in this area.";


$longquestion2 = "Please write down a paragraph about yourself.";
$longexplain2 = "For example, a bit about your experience in this area.";



////////////////////////////////////////////////////////////////////////////////////////////////
////// END OF CUSTOMIZATION ////////////////////////////////////////////////////////////////////
///// DO NOT CHANGE BELOW UNLESS YOU KNOW WHAT YOU ARE DOING!!! ////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////



And just so you know, i havent touched anything below this....

David.

ilanyon
01-13-2009, 08:07 AM
PLS DELETE REFERENCE.... I FOUND THE ANSWER IN PREVIOUS POSTS....MY APOLOGIES


Hi all,
I wonder if someone might be able to assist...

Once the form has been completed and the submit button is clicked, the following error message appears:

Your submission could not be processed because a security token was missing or mismatched.

If this occurred unexpectedly, please inform the administrator and describe the action you performed before you received this error.

Any ideas would very much be appreciated!

Regards,

Ian

Bman200
01-15-2009, 01:38 AM
Am sorry but am blind, where do I edit the form?

Digital Jedi
01-15-2009, 04:18 AM
Am sorry but am blind, where do I edit the form?
You edit the plugin. Instructions on what does what are commented into the plugin.

serkangul
01-17-2009, 06:42 PM
Hello . I, uniform, joint, box, add, want, . How do I do .

Digital Jedi
01-18-2009, 02:08 AM
Hello . I, uniform, joint, box, add, want, . How do I do .
Can't understand what your saying. Sorry.

life is boost
01-26-2009, 10:07 PM
Do you have the attachment option enabled in the plugin? It should be showing up wherever you put the attachment variable in the form template. The default example looks like this:

<if condition="$attachmentoption">
<tr>
<td class="alt1" colspan="3" align="center">
<div style="width:$stylevar[formwidth]" align="$stylevar[left]">$attachmentoption</div>
</td>
</tr>
</if>


ye sit is set to 1 in the form and it is in the template. i even tried a completely stock form hack and no attachment box shows up.

lugdug
01-30-2009, 07:53 PM
Does anyone know how to change the font size and bold the questions as they are posted to the forum?

zglows
03-01-2009, 06:27 PM
just find the questions in the template and add a class to them.
Like this:

<span class="myquestion">Question 1:</span>

biome.pat
03-24-2009, 09:10 PM
Anyone know whether this works in 3.8?

RedGTiVR6
03-24-2009, 09:21 PM
Yes it does.

leroub
03-25-2009, 04:20 PM
Anyone know whether this works in 3.8?

Yes...

-------------------------------

Hi all,

how to adapt Form Hack to work with the hack VaultWiki https://vborg.vbsupport.ru/showthread.php?t=189446...

Thank you kindly help me... :up:

chesterano
04-07-2009, 12:41 PM
Someone please help I getting an error when try open
http://mysite.com/newthread.php?do=form


Database error in vBulletin 3.8.1:

Invalid SQL:

SELECT *
FROM vb_thread_fields_admin
WHERE (find_in_set( ,forums) OR forums = 0)
ORDER BY display;

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 'forums) OR forums = 0)
ORDER BY display' at line 3
Error Number : 1064
Request Date : Tuesday, April 7th 2009 @ 03:33:34 PM
Error Date : Tuesday, April 7th 2009 @ 03:33:34 PM
Script : http://mysite.com/newthread.php?do=form
Referrer :
IP Address : xxx.xx.xxx.xxx
Username : xxxxxx
Classname : vB_Database
MySQL Version : 5.0.45

Marvin Hlavac
04-19-2009, 01:10 PM
Abe, thanks, I just added this mod to my site. Not an issue adding it to the latest vBulletin 3.8.2 version.

Chevy II
04-22-2009, 02:24 AM
I'm thinking that I've done something wrong or haven't finished the install. After installing the mod I was able to run the install (example) form and it looked good. After I have made changes to the plug-in (hook) nothing has worked properly.

I have done the following so far:

-Import the XML into products.
-Edited the main plug-in (hook) to match my requirements and changed the part 1 and part 2 to match my questions.
-I've edited the form answer to also match the plug-in questions that I've added.

What am I not doing correctly, because all I get is a white screen when I attempt to run the form.

Thanks!

Stryker412
05-07-2009, 07:09 PM
What's the proper code for a radio question in the form template? I added a dropdown and radio question to my form. I copied the code and used it for both but I know the radio code is wrong.

<tr>
<td class="alt2" valign="middle" colspan="2">
<select name="dropdownanswer7">
<option value="$dropdownchoice7a" <if condition="$dropdownchoice7a == $dropdownanswer7">selected="selected"</if>>$dropdownchoice7a</option>
<option value="$dropdownchoice7b" <if condition="$dropdownchoice7b == $dropdownanswer7">selected="selected"</if>>$dropdownchoice7b</option>
</select></td>
</tr>
<tr>
<td class="alt1" valign="middle" colspan="2">
<select name="radioanswer4">
<option value="$radiochoice4a" <if condition="$radiochoice4a == $radioanswer4">selected="selected"</if>>$radiochoice4a</option>
<option value="$radiochoice4b" <if condition="$radiochoice4b == $radioanswer4">selected="selected"</if>>$radiochoice4b</option>
</select></td>
</tr>

Stryker412
05-13-2009, 03:43 PM
bump, anyone know?

kanzleramt
05-21-2009, 12:14 PM
Is there a chance to subtract a sum out of Reputation Points for Users only who have Thanked? It makes no difference how many Rep Points are being substracted but I'd like to know how it works.

Example: "User A" has 50 Rep Points. After a submitted (given) Thanks "User A" has 49 Rep Points instead of 50.

Thanks in advance

nalexandre
06-05-2009, 05:14 PM
Hi, where do i set the options of the form????

Thanks

Digital Jedi
06-05-2009, 08:17 PM
Hi, where do i set the options of the form????



Thanks
In the plugin. Instructions are written in there too.

nalexandre
06-05-2009, 09:13 PM
Thank you, i have another question,

When comes an update? No admin cp control??? I set options to post in a forum but nothing there, can you helP?

Thank you and sorry my english.

Obrigado,

Zephanor
06-08-2009, 01:01 AM
Forgive me if this has been covered in the previous posts but I didn't see anything in my search... I have this installed on 3.8.x and it's working fine except for one aspect. The forms are being posted in a private forum but all replies to that forum are being received by e-mail to the guest. They can't access the forum or the thread the form generates but they are getting the e-mail updates. This didn't happen in 3.7.x and only started after I upgraded to the next version. No changes were made to the forms since they were first installed.

For example if my previous explanation wasn't clear:

A guest fills out a form on our forum.
The form is posted in an administrator forum where a poll is attached, discussions are made and votes cast.
Any reply to the thread the form creates generates an e-mail notification to the guest who does not have access to the private forum the form thread is posted.

If anyone has any ideas on what I can look at to fix this I would greatly appreciate it.

Thanks!

Digital Jedi
06-08-2009, 08:51 AM
Forgive me if this has been covered in the previous posts but I didn't see anything in my search... I have this installed on 3.8.x and it's working fine except for one aspect. The forms are being posted in a private forum but all replies to that forum are being received by e-mail to the guest. They can't access the forum or the thread the form generates but they are getting the e-mail updates. This didn't happen in 3.7.x and only started after I upgraded to the next version. No changes were made to the forms since they were first installed.

For example if my previous explanation wasn't clear:

A guest fills out a form on our forum.
The form is posted in an administrator forum where a poll is attached, discussions are made and votes cast.
Any reply to the thread the form creates generates an e-mail notification to the guest who does not have access to the private forum the form thread is posted.

If anyone has any ideas on what I can look at to fix this I would greatly appreciate it.

Thanks!
If I recall correctly, this was a bug some other admins were having even on older versions. I can't seem to find it right now, but somewhere in this thread someone had posted some code to try and block the subscription process, but I don't think they ever reported back if they were successful or not.

Zephanor
06-09-2009, 03:26 AM
Thanks for the tip. I searched the thread and the closest I came to a possible solution was post 1341 which is actually 2 pages back. /boogle

I tried making the suggested changes but unfortunately they made no difference.

:(

wrang
06-11-2009, 05:25 AM
great jobb but i have a problem.
When you should attach a file it dosent came up when you are a member etc. But when you are a moderator, admin it came upp.
I have set the USERGROUPS ALLOWED

if (!in_array($vbulletin->userinfo['usergroupid'], array(6,2,7,5,23,22,31,36,30,32))) print_no_permission();

or is it some more place i should set it that member etc can upload a file

HabboHut,,,

Goto admincp and look 4 usergroup options area...
Open and make changes to only groups that U wish to access page...


**************************************************

I forgot about the internal usergroup option within this mod...
Look in the PLUGIN code at the top and edit the usergroup option there to allow other members grps...

I have made this but its the same

wrang
06-11-2009, 06:19 PM
Now i have looking for some wrong but i cant find anything wrong

Has someone get this work for anybody else like admin, mod to attach a file in the form hack or just me

wrang
06-13-2009, 07:19 AM
Sorry to nag, but is there anyone who can help me?
I searched in the threads but i dident found a solution

Digital Jedi
06-13-2009, 01:52 PM
Did you check you normal usergroup settings for attachments?

wrang
06-13-2009, 06:47 PM
Yes it says
Usergroup Manager - Can Upload Attachments - Yes
Forum Permissions Manager - Attachment Permissions - Yes

Digital Jedi
06-14-2009, 11:07 PM
Yes it says
Usergroup Manager - Can Upload Attachments - Yes
Forum Permissions Manager - Attachment Permissions - Yes
Attachments are tricky in vB. Also check the vB Options on attachments and your Attachment Manager settings.

wrang
06-15-2009, 09:00 AM
Attachments are tricky in vB. Also check the vB Options on attachments and your Attachment Manager settings.

Realy strange.
All i can see it right set yes


Thanks so far :up:

wrang
06-16-2009, 03:06 PM
Now i have tested to copy a usergroup ho it work fornow to the two it dosent work, but its the same.
two usergroup cant upload a attachment

wrang
06-21-2009, 08:03 PM
Same problem is it someway it can be set so all members can attach files,
I do not sort out this problem :erm: and want it to work

chrisbeau
08-12-2009, 09:23 PM
I have this working for 3.7.2 and I only use the questions ($question1/2/3). All working nicely but the forum section it posts to requires prefixes, how can I go about adding which prefix to select into this form ??

BTW If I change it to does not require prefixes it works fine, but I want prefixes more than this mod so they have to stay.

Im so close to what I want please can you advise ?

How it is now:
103173

103174

How I want it to appear using the prefixes:

imk
08-13-2009, 01:49 PM
please explain how to install better for newbs to codeing!

i installed the xml file

now where do i go to create a custom form? and where do i choose where to put it?

durdan1
08-18-2009, 10:54 PM
please explain how to install better for newbs to codeing!

i installed the xml file

now where do i go to create a custom form? and where do i choose where to put it?

Me too, im lost. Where is the hook?

PlaybyPlay
08-19-2009, 12:48 AM
I have a problem... The prefix Moderated: comes up with these submissions, and it doesn't show up in the post count....

harakiri
10-11-2009, 06:13 PM
Hi there,

first: thanks a lot for this mod :).

I'm having a little problem, where using your form to create a new post into a thread the lastpost isn't updated on the forumhome.

Is there any fix or a hint?

Regards,
Christian

(I can see the post on "get daily" and in the specific forum.. but not on the forum home)

harakiri
10-18-2009, 10:14 AM
FIXED!

there's something missing @ plugins:

below:

if ($formreply == "1")
{
$threadinfo = verify_id('thread', $formreplythreadid, 0, 1);

add this:

$foruminfo = verify_id('forum', $formforumid, 0, 1);

works :)

davida500
11-03-2009, 09:09 PM
Let's say I wanted to make it so when you choose a certain radio answer, a new question appears on the form. How would I go about doing that?

RedGTiVR6
12-01-2009, 10:48 PM
Has anyone ever figured out how to require an attachment with this hack?

I would be very greatful for any assistance with this aspect.

Many thanks in advance!

wolfey
12-07-2009, 11:07 PM
Awesome tool!

Customized everything exactly the way I needed..excellent instructions...even for a non programmer to understand!

OK simple question & fix I hope:

In the FormAnswer template for when it displays the answered questions if someone didnt answer all of them it still shows a blank space where that answer would be..

How do I make it so the completed form will not leave a space for the unanswered questions?

Thank you in advance!

Copy of part of code used in template:

$checkboxquestion1
$checkboxanswer1_1
$checkboxanswer1_2
$checkboxanswer1_3
$checkboxanswer1_4
$checkboxanswer1_5
$checkboxanswer1_6
$checkboxanswer1_7
$checkboxanswer1_8
$checkboxanswer1_9

wolfey
01-12-2010, 09:35 AM
Anyone have the answer? I've playing around with it and cant get the answers to look good

idslamyou
01-13-2010, 05:50 AM
Does anyone have this installed on vb4.0? I searched for a similar mod in the vb4 forum but found nothing.

Cadellin
01-13-2010, 09:38 AM
Does anyone have this installed on vb4.0? I searched for a similar mod in the vb4 forum but found nothing.

Likewise I would be interested in a mod like this for v4.0

mashie
01-14-2010, 08:21 PM
Likewise I would be interested in a mod like this for v4.0

+1 for this Mod on 4.0!

PascalR
02-02-2010, 12:35 AM
Hi guys,

sorry for the dumb question, but how do I force any thread to use this form in a specific forum?
I changed the forum id to the one I want in the plugin but when I click on "new thread", it is not showing the form options, just the normal thread description.

cheers!

Pascal

Digital Jedi
02-02-2010, 11:40 PM
You have to navigate to the form URL first, and then it will post in the specified forum. Remember, it's do=form or whatever name you've given the hook.

Mondi
02-04-2010, 12:42 AM
Yes - just to mention I, too, will be interested in an upgrade version for 4.0.

Hoping, hoping, hoping...

StagKill
06-22-2010, 01:26 PM
+1 for vB 4.0 Upgrade.
Is it in progress?

pablo
07-07-2010, 01:42 PM
would also love this for v4.0.4+ upwards.

xTerMn8R
07-22-2010, 09:02 PM
Is it possible to have Unregistered Guest use these forms. I've removed the $BBuser[Email] from the answer file but that didn't help I also added the Unregistered Group to the Array in the plugin. Still wont process, I made these forms a LONG time ago, I have a comment in the form that the Email must be checked and correct or the form will not be processed. Now I dont remember if thats Something I did or if thats part of the Hack.

My Niece is using this for Dog Adoption application, she says a lot of folks don't want to register with the site so they dont fill out the application. I just wanna get it Wide open so anyone can Fill out an adoption application, whether their a registered member or not?

Thankyou,
Tom

thedvs
09-21-2010, 08:30 PM
I guess this mod is dead, no port to 4.0.7 then :(

kroko
11-01-2010, 12:32 AM
i know this is a nicropost but dose a mod like this exsist for vb 4,8?

pckolojim
12-05-2010, 06:17 PM
Sorry if this has been asked before, but is it possible to redirect to a specified page with our own URL instead of a thankyou message. Thankyou

Hi,

I needed to do this. This is how I modified.

Open the plugin and find the part starts with

if ($redirectoption == "1")
{
$vbulletin->url = 'showthread.php?' . $vbulletin->session->vars['sessionurl'] . "p=$newpost[postid]";
eval(print_standard_redirect('redirect_postthanks' ));
exit();

There are four options. So choose the one you won't need. For example I modified fourth redirect option.

instead of

url = 'showthread.php?' . $vbulletin->session->vars['sessionurl'] . "p=$newpost[postid]";

changed to

url = 'http://www.urluwant.com' . $vbulletin->session->vars['sessionurl'] . "";

also from top you must choose the option you edited. for ex: $redirectoption = "4";

it is solved...

Digital Jedi
12-07-2010, 08:45 PM
i know this is a nicropost but dose a mod like this exsist for vb 4,8?
It's not a necropost, when it's required to post here for support. Search the 4.0 forums, "Title's Only", for "forms" and you'll find it.

nlwin
03-04-2011, 10:20 PM
Will it work in vBulletin 3.8.7?
Thx

Simon Lloyd
03-07-2011, 04:41 AM
Will it work in vBulletin 3.8.7?
Thx
Yep works on 3.8.7 :)

russellw
05-01-2011, 12:47 AM
I know this is an older thread now but I'm trying to debug an issue where it appears that the form hack doesn't actually look at forum posting rules when it is either creating the form OR posting it.

I presume that is because it uses settings of its' own to determine who/what/where to post a new thread.

Because the particular forum we are using the form in has a minimum post count and needs to also display the Miscellaneous options (particularly image attachment which is mandatory) we need it to be checking permissions.

I have added code to check the post count into the form hook so that part is now working fine but the variable $attachmentoption is being treated as if it were a blank value by newthread.php as the form/hook aren't checking forum permissions (this it is blank).

Basically what I need to be able to do is to set the permisison for 'canpostattachment' in the hook but have no idea how to!

When I get it working I'll post the code edits so that anyone else can add image attachments to their form and make them mandatory if required.

Cheers
Russ

Simon Lloyd
05-01-2011, 12:18 PM
Russ, thats great of you to share your modifications with us, it will definitely help the community :)

nlwin
10-12-2011, 08:54 PM
Yep works on 3.8.7 :)

FYI: Got "missing security token" error messages on vB 3.8.7 PL1. Fixed by adding


<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />


to form templates. :D

Jo_RHU
11-26-2011, 12:11 AM
Setting this up is very complicated. I'm amazed there isn't a simpler alternative, I just need a few fields adding to a newthread. I've tried the Easy Forms plugin but that doesn't appear on vbOptions list for some reason so I can't set that up either. Very tired!

If anyone knows of an easier way please let me know. I just need 4 dropdown fields that will append some small pieces of text based on the users selections in to the post content.

EDITED TO ADD: Found this plugin that did what I needed: https://vborg.vbsupport.ru/showthread.php?p=2272129#post2272129 (just posting here in case anyone else is looking for a way to insert text phrases from a dropdown, I hunted for ages to find it!

Thank you the Form Hack plugin developer, it looks very powerful, just a bit complicated to set up.

Sanjiyan
03-30-2012, 03:22 PM
Has anyone found away to stop users when submitting a form, from being automatically subscribed to the thread posted (by the form submitted).

I really need to find a way to stop users from getting email notifications etc as the form I've made posts to a forum they they should not see (its a MMO recruitment forum).

alan92rttt
03-30-2012, 09:05 PM
Have you tried setting the security on the forum such that their user group can not see replies to that forum? That should prevent the email issue.

Sanjiyan
03-30-2012, 09:11 PM
yep, I found a way in the plugin code so that when the form is submited and then posted, it does not set any subscriptions, so that was also taken care of also.

But thanks for the reply.

Mazide
07-25-2012, 10:03 AM
Will I be applying in the 4.2 version of vBulletin?