vb.org Archive

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

zglows 09-05-2008 02:13 AM

Quote:

Originally Posted by Castro82 (Post 1613631)
after the update to 3.7.3 there is an securitytokken error using this hack.?

is this true?

brianFL1 09-05-2008 07:38 AM

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

RedGTiVR6 09-06-2008 11:57 AM

Quote:

Originally Posted by zglows (Post 1614804)
is this true?

Try searching vbulletin.org for "Security Token", you'll find that it's not related to this specific hack at all.

I'm guessing you went from 3.6.8 to 3.7.3?

Just search for the term and you will find a solution.

RedGTiVR6 09-06-2008 11:58 AM

Has anyone been able to find a way to warn the user when the title is too long for the 'thread'?

I'm finding that our users are putting a very long title in.

I have a field set: Please give a brief description of the problem here

Well, they seem to think that brief means long....

So they go to submit a bug report, they are told by vBulletin that it's submitted...yet nothing ever shows up because the title is too long.

jdunsworth 09-09-2008 10:55 AM

Great hack!

For some reason when I import this product to a new set of forums running vBulletin 3.7.3 and try the newthread.php?do=<name> it gives me a parse error:

Code:

Parse error: syntax error, unexpected T_STRING in /<taken out>/forums/newthread.php(74) : eval()'d code on line 100
I tried it in forums running 3.7.0 and it doesn't work either, whereas the original forum I made these for was running 3.7.0.. It honestly makes no sense. Any help is appreciated!

illithid 09-09-2008 12:44 PM

Check around line 100 for a missing semicolon( ; ), double quote( " ), single quote( ' ) or bracket( { ).

BlueBulletRL 09-10-2008 10:18 PM

Quote:

Originally Posted by RedGTiVR6 (Post 1615784)
Has anyone been able to find a way to warn the user when the title is too long for the 'thread'?

I'm finding that our users are putting a very long title in.

I have a field set: Please give a brief description of the problem here

Well, they seem to think that brief means long....

So they go to submit a bug report, they are told by vBulletin that it's submitted...yet nothing ever shows up because the title is too long.

The way I had took care of this was go to your input textbox for the thread title and add maxlength="75". I believe the cut off is 80 but I just put 75 to be safe. This will work its funny to cause I just was asked to do this.

Has anyone gotten this to work where you must have a certain amount of post before you can do it.

RedGTiVR6 09-10-2008 10:22 PM

Quote:

Originally Posted by BlueBulletRL (Post 1619455)
The way I had took care of this was go to your input textbox for the thread title and add maxlength="75". I believe the cut off is 80 but I just put 75 to be safe. This will work its funny to cause I just was asked to do this.

Has anyone gotten this to work where you must have a certain amount of post before you can do it.

can you show me exactly per the code? I'm not sure I understand.

Input text box....is that in teh product its self or in the form template?

As for your second question, can you put those users in another group and allow only that group (and others) to use the form?

On my forums I have used the active members and registered members groups.

Active for those I want to be allowed to use the features of the site.

viper357 09-12-2008 01:57 PM

How do I add a url into the form? It is just showing up as plain text and not as a link. Pic attached.

Attachment 86798

ForumsMods 09-12-2008 04:14 PM

Quote:

Originally Posted by viper357 (Post 1620532)
How do I add a url into the form? It is just showing up as plain text and not as a link. Pic attached.

Attachment 86798

Use html.

viper357 09-12-2008 05:14 PM

Quote:

Originally Posted by Gasper (Post 1620618)
Use html.

Do you mean like this...

Code:

<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

Quote:

Originally Posted by viper357 (Post 1620651)
Do you mean like this...

Code:

<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

Quote:

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

Quote:

Originally Posted by illithid (Post 1618201)
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

Quote:

Originally Posted by ccplim (Post 1620922)
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

Quote:

Originally Posted by blacklancer (Post 1138776)
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.

Code:

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:

Code:

<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

Quote:

Originally Posted by Null Parameter (Post 1623123)
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:

Code:

<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
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.
Code:

<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:
Code:

$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/...ot_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.)
Code:

// 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
Code:

<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
Code:

$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

Quote:

Originally Posted by Bilderback (Post 1632330)
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.)
Code:

// 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
Code:

<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
Code:

$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/...t_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:

Quote:

// 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'];

Quote:

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

Code:

// 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
Quote:

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
PHP Code:

$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

Quote:

Originally Posted by a33 (Post 1646555)
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
PHP Code:

$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 <-- ** 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

Quote:

Originally Posted by fodvapor (Post 1647260)
Does this also work with 3.7.3 ???

Yes.

a33 10-19-2008 08:11 PM

Quote:

Originally Posted by TheLastSuperman (Post 1647310)
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 <-- ** 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

Quote:

Originally Posted by RedGTiVR6 (Post 1647312)
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 ...


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

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

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

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete