vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   New Posting Features - Easy Forms - Create a form or multiple forms without php or html knowledge (https://vborg.vbsupport.ru/showthread.php?t=201097)

DontWannaName 03-03-2009 06:14 AM

Quote:

Originally Posted by bananalive (Post 1758544)
Are you replacing 1 with the appropriate prefixid?

Yes I even set it to 1 to try. Its a prefix id inside a category, its the first area to edit when you add one and its called prefix id.

Michigan Morels 03-03-2009 06:54 AM

A weird request now.

A few years ago I had a buy/sell/advertise forum on the honor system. I just asked member to donate a certain small amt to the site fund for each item sold. It was abused greatly. They sold and I recieved almost nothing.

So.... is there a way with easy forms
to NOT submit post as "the member posting it", but rather as an "un-registered member", or "a chosen member ID#", mine or someone else.
or maybe even just collect the posters ID# and post it in the post, without the name and without the posters info in the postbit.

To reply they would be forced to use easy form rather than normal reply button. (I think I seen that somewhere in this mod).

That way, PM's and emails would not quite so easily over ride my knowledge of a sale.

Yes, I know they can still post in other forums or pm's, which item is theirs, but I can discourage that somewhat in the posts at least. At any rate I may get a little better portion than I was before.

Poor bananalive.... so many request, so little time. :)

zushiba 03-03-2009 03:35 PM

1 Attachment(s)
This is odd. I've got a form that does not have any Human verification question on it however I cannot submit the form I get
Quote:

Form failed to submit. The following error(s) occured:
The string you entered for the image verification did not match what was displayed.
I exported the form, deleted it and reuploaded it but it still throws this error. Whats going on?

EDIT: I've attached the form XML.

bananalive 03-03-2009 03:46 PM

Quote:

Originally Posted by hobbybox (Post 1758866)
That was the problem - thank you...

As for the form checking the members name im not great with hooks and queries. Can you elaborate more on how to check for a real member username before the form is submitted.

Form hook before submit
PHP Code:

if ($q[8])
{
$user $db->query_first_slave("SELECT userid FROM " TABLE_PREFIX "user WHERE username = '" $db->escape_string($q[8]) . "'");
if (!
$user)
{
$complete false;
$inputerror[8] = "Invalid User";
$iqs[] = '8';
$incompleteqs[] = $qn[8];
}



bananalive 03-03-2009 03:47 PM

Quote:

Originally Posted by xcesivvs (Post 1758927)
Great modifications.

I have a slight question

I have my form being used in 1 section of my forum where i want to set forced Prefix's

Is there a way to have it auto default the prefix to the first prefix on the list or something.

I dont want to have the form user to choose the prefix, I want it that i decide the prefix level

Thanks

Warren

Edit plugin: Easy Forms Part 1

Find:
PHP Code:

/*$newpost['prefixid'] =& '';*/ 

Replace:
PHP Code:

$newpost['prefixid'] =& '1'

Replace 1 with the appropriate prefixid

bananalive 03-03-2009 03:52 PM

Quote:

Originally Posted by Michigan Morels (Post 1759097)
A weird request now.

A few years ago I had a buy/sell/advertise forum on the honor system. I just asked member to donate a certain small amt to the site fund for each item sold. It was abused greatly. They sold and I recieved almost nothing.

So.... is there a way with easy forms
to NOT submit post as "the member posting it", but rather as an "un-registered member", or "a chosen member ID#", mine or someone else.
or maybe even just collect the posters ID# and post it in the post, without the name and without the posters info in the postbit.

To reply they would be forced to use easy form rather than normal reply button. (I think I seen that somewhere in this mod).

That way, PM's and emails would not quite so easily over ride my knowledge of a sale.

Yes, I know they can still post in other forums or pm's, which item is theirs, but I can discourage that somewhat in the posts at least. At any rate I may get a little better portion than I was before.

Poor bananalive.... so many request, so little time. :)

This isn't an ideal way to do it, but it works.
hook: before submit
PHP Code:

$vbulletin->userinfo['userid'] = 0;
$vbulletin->userinfo['username'] = 'Unregistered'


bananalive 03-03-2009 03:57 PM

Quote:

Originally Posted by zushiba (Post 1759376)
This is odd. I've got a form that does not have any Human verification question on it however I cannot submit the form I get


I exported the form, deleted it and reuploaded it but it still throws this error. Whats going on?

EDIT: I've attached the form XML.

Are you posting as guest? (Checked form looks alright to me.)

zushiba 03-03-2009 04:07 PM

Quote:

Originally Posted by bananalive (Post 1759388)
Are you posting as guest? (Checked form looks alright to me.)

Nope, Administrator. Haven't tested it with any other permission levels and I don't have any guest only questions.\


EDIT: It seems to be doing this for every form I create : /
None of them work.

I've cleared my browser cache, deleted all cookies and saved variables and I'm still having this problem.

frogster 03-03-2009 04:18 PM

Quote:

Originally Posted by frogster (Post 1758783)
How many people is this happening to?

I have VB 3.8.1 installed and the following mods:

FB Connect
VB Classifieds
Open Inviter
VBblog

I am willing to pay someone to fix this for me.

1. All new threads submitted through easy forms go into moderation when logged in as a user (not when logged in as admin). I'm pretty sure I have everything set up right but I may need a set of second eyes.

2. Preview button. I get an error.

Please help.

As apparently I am the only dumb one who has this issue...bananalive can I donate to your mod or something so maybe you can take a look at my setup as to why the form goes into moderation and why my preview button creates an error. I REALLY want to use this mod. I've used the preview button on other areas and I did not get an error.

Thanks,
Maria

bananalive 03-03-2009 05:14 PM

Quote:

Originally Posted by frogster (Post 1759405)
As apparently I am the only dumb one who has this issue...bananalive can I donate to your mod or something so maybe you can take a look at my setup as to why the form goes into moderation and why my preview button creates an error. I REALLY want to use this mod. I've used the preview button on other areas and I did not get an error.

Thanks,
Maria

do you still get the preview error if you disable attachments?

Michigan Morels 03-03-2009 05:38 PM

Thank you Dom. I think I've asked enough questions of you that I can now go play with the forms for awhile without botherin you.

Thanks again.

hobbybox 03-03-2009 06:06 PM

works like a charm - thank you.

frogster 03-03-2009 06:26 PM

1 Attachment(s)
Quote:

Originally Posted by bananalive (Post 1759449)
do you still get the preview error if you disable attachments?

As long as there is no attachment on the form I can preview it. So whether the attachment is disabled or not, I can only preview the form if there is no attachment. However, I can upload an attachment to this forum for example without a problem. The error I get is:

Fatal error: Call to undefined function construct_attachment_add_js() in /home/content/g/a/l/galvanm/html/app/webroot/forum/misc.php(100) : eval()'d code on line 1704

I even uploaded and attached an item to this post to test.

bananalive 03-03-2009 06:35 PM

Quote:

Originally Posted by frogster (Post 1759483)
As long as there is no attachment on the form I can preview it. So whether the attachment is disabled or not, I can only preview the form if there is no attachment. However, I can upload an attachment to this forum for example without a problem. The error I get is:

Fatal error: Call to undefined function construct_attachment_add_js() in /home/content/g/a/l/galvanm/html/app/webroot/forum/misc.php(100) : eval()'d code on line 1704

I even uploaded and attached an item to this post to test.

Does it post attachments if you click submit?


I think I might have found problem.

bananalive 03-03-2009 06:48 PM

1 Attachment(s)
Quote:

Originally Posted by bananalive (Post 1759491)
I think I might have found problem.

Try attached file.

frogster 03-03-2009 09:31 PM

Quote:

Originally Posted by bananalive (Post 1759499)
Try attached file.

Worked like a charm. It fixed my preview and moderation problem. I want to send you a sincere thank you for a great mod and for fixing my issue. I'm new to this and I don't see a donate button so I'm not sure if you take donations.

Thanks again.

nascartr 03-03-2009 09:37 PM

You can support this great developer by clicking on "Support Developer" up top. I


frogster 03-03-2009 09:44 PM

Quote:

Originally Posted by nascartr (Post 1759603)
You can support this great developer by clicking on "Support Developer" up top. I

Duh...done. Thanks again.

zushiba 03-03-2009 09:54 PM

Okay so that error I'm getting
Quote:

Form failed to submit. The following error(s) occured:
The string you entered for the image verification did not match what was displayed.
is only for me
ADMINISTRATORS
Anyone with "Administrators" privileges and under have no problem submitting the form.

xcesivvs 03-03-2009 11:24 PM

Quote:

Originally Posted by bananalive (Post 1759382)
Edit plugin: Easy Forms Part 1

Find:
PHP Code:

/*$newpost['prefixid'] =& '';*/ 

Replace:
PHP Code:

$newpost['prefixid'] =& '1'

Replace 1 with the appropriate prefixid

I Was receiving errors and couldnt even view the forms using these
$newpost['prefixid'] =& 'Ordered';
$newpost['prefixid'] =& Ordered;

Then I looked to see the others with $ signs.

I tried this and the error the error before trying to view the forms stopped
$newpost['prefixid'] =& $Ordered;

But i still receive the error
"Form failed to submit. The following error(s) occured:
You must select a thread prefix."

DontWannaName 03-04-2009 04:03 AM

Ya I get the same kind of stuff when doing that. :(

dknelson 03-04-2009 11:05 AM

Quote:

Originally Posted by bananalive (Post 1756964)
  1. Create custom question
  2. php code:
    PHP Code:

    $answer '<select name="'.$formbit[id].'">';
    $answer .= '<option></option>';
    $thisanswer $q[$formbit[id]];
    $threads $db->query_read("SELECT * FROM " TABLE_PREFIX "thread
    WHERE forumid = '10' 
    ORDER BY title ASC"
    );
        while(
    $row $db->fetch_array($threads)) {
    $answer .= '<option value="'.$row[threadid].'"';
    if (
    $row[threadid] == $thisanswer) {
    $answer .= 'selected="selected"';
    }
    $answer .= '>'.htmlspecialchars($row[title]).'</option>';
    }
    $answer .= '</select>'

  3. Replace 10 with appropriate forumid
  4. Edit Form Hook: Before Submit
    PHP Code:

    $form['threadid'] = $q[1]; 

  5. Replace 1 with appropriate question hash

Thanks MUCH. Will try this tonight.

frogster 03-04-2009 02:33 PM

Hi Bananalive,

The xml file I uploaded worked like a charm to fix the preview and moderation problem I was having with the forms. However, I also have FB Connect installed and when a new thread is submitted by a FB user it gets posted on their FB wall. I have the form set up to submit to a new thread on a forum and before installing your new xml file, the forms submitted were creating these new threads and the submission of the form/creation of the new thread was creating a note on the user's facebook wall. Once I installed the new xml file, it no longer creates a new note on the facebook wall when a user submits the form (hence creating a new thread). I check all my options and they are all the same. Could the XML form I updated have overwritten something?

Thanks,
Maria

bananalive 03-04-2009 04:17 PM

Quote:

Originally Posted by frogster (Post 1760189)
Hi Bananalive,

The xml file I uploaded worked like a charm to fix the preview and moderation problem I was having with the forms. However, I also have FB Connect installed and when a new thread is submitted by a FB user it gets posted on their FB wall. I have the form set up to submit to a new thread on a forum and before installing your new xml file, the forms submitted were creating these new threads and the submission of the form/creation of the new thread was creating a note on the user's facebook wall. Once I installed the new xml file, it no longer creates a new note on the facebook wall when a user submits the form (hence creating a new thread). I check all my options and they are all the same. Could the XML form I updated have overwritten something?

Thanks,
Maria

I assume it works by using the newthread_post_complete hook location.


Find in plugin: Easy Forms Part 1

PHP Code:

/*($hook = vBulletinHook::fetch_hook('newthread_post_complete')) ? eval($hook) : false;*/ 

Replace with
PHP Code:

($hook vBulletinHook::fetch_hook('newthread_post_complete')) ? eval($hook) : false


dwheeler 03-04-2009 06:18 PM

Hi

On my forms I am using several dropdown select questions. When submitted, the select answers are changed to "1" "2" "3" etc to correspond with the answer in the dropdown. I would like the answer dropdown answer to be used instead of being replaced. Am I missing something, or do I need to use a <if> statement in the output?

Running vB 3.8.1 with Easy Forms 3.1

Thanks
Dan

bananalive 03-04-2009 06:51 PM

Quote:

Originally Posted by dwheeler (Post 1760397)
Hi

On my forms I am using several dropdown select questions. When submitted, the select answers are changed to "1" "2" "3" etc to correspond with the answer in the dropdown. I would like the answer dropdown answer to be used instead of being replaced. Am I missing something, or do I need to use a <if> statement in the output?

Running vB 3.8.1 with Easy Forms 3.1

Thanks
Dan

I'm not entirely sure what you are referring to.

If it's to do with the custom output and dropdown select answers, use $qo[1] instead of $q[1]

frogster 03-04-2009 09:12 PM

Quote:

Originally Posted by bananalive (Post 1760284)
I assume it works by using the newthread_post_complete hook location.


Find in plugin: Easy Forms Part 1

PHP Code:

/*($hook = vBulletinHook::fetch_hook('newthread_post_complete')) ? eval($hook) : false;*/ 

Replace with
PHP Code:

($hook vBulletinHook::fetch_hook('newthread_post_complete')) ? eval($hook) : false


Okay so that worked for the initial post .... don't kill me... but now anytime the same user posts anything else instead of adding a new note to the facebook wall, it replaces the old post with the new post. I would normally ask the FB developer/thread for help but the thing is that it just started happening when I installed the new xml file. Sorry for the trouble and I really do appreciate your help.

dknelson 03-04-2009 09:47 PM

Well, I thank you very much for the guidance but I can't get this:
https://vborg.vbsupport.ru/showthrea...201097&page=39

to work. When I press submit, I just get a blank message where the "Click here to go to thread" would normally appear.

I'm sure I'm doing something wrong. I'm actually not sure to select, if anything, where you would normally select to submit to thread, email, forumID, etc. I tried selecting nothing and also selecting "Submit to Thread" but leaving the threadID blank. Neither worked.

I would like to say that this is a FANTASTIC mod and is as well supported as any mod I've ever seen here.

I'm sending a donation now because this is worth it regardless of whether or not this issue is figured out.

xcesivvs 03-06-2009 02:58 AM

Quote:

Originally Posted by xcesivvs (Post 1759676)
I Was receiving errors and couldnt even view the forms using these
$newpost['prefixid'] =& 'Ordered';
$newpost['prefixid'] =& Ordered;

Then I looked to see the others with $ signs.

I tried this and the error the error before trying to view the forms stopped
$newpost['prefixid'] =& $Ordered;

But i still receive the error
"Form failed to submit. The following error(s) occured:
You must select a thread prefix."

sorry to be a pain mate... i asked this a bit back and still stuck... thanks

Darkne55 03-06-2009 09:37 PM

Great hack bananalive! Hands down the most useful I've found so far. Installed and working flawlessly.

I do however have a question.

Is it possible upon form submittal to have the submitter put into a new user user group?
What I'm attempting to do is this. I'm using your product for a membership application. The prospect fills out the form and when completed the form creates a new thread with the prospects name as the title of the thread. The thread is created in a members only area. If there was a way to put the submitter into a new user group upon form completion, I could create a forum specifically for that user group where they could go and monitor any responses to their applications. I have a tendancy to explain things to death, if I've done that I apologize.

Thanks again
http://www.theknifersedge.com/WaterPic/d4rk.jpg

admin0 03-07-2009 02:23 AM

Hi,

If there is say form1 and user have already submitted to it, is it possible to pull off the old values or if the user submits again, just update the new values rather than insert new lines in the database ?

bananalive 03-07-2009 10:02 AM

1 Attachment(s)
Quote:

Originally Posted by dknelson (Post 1760559)
Well, I thank you very much for the guidance but I can't get this:
https://vborg.vbsupport.ru/showthrea...201097&page=39

to work. When I press submit, I just get a blank message where the "Click here to go to thread" would normally appear.

I'm sure I'm doing something wrong. I'm actually not sure to select, if anything, where you would normally select to submit to thread, email, forumID, etc. I tried selecting nothing and also selecting "Submit to Thread" but leaving the threadID blank. Neither worked.

I would like to say that this is a FANTASTIC mod and is as well supported as any mod I've ever seen here.

I'm sending a donation now because this is worth it regardless of whether or not this issue is figured out.

Make sure you are using the right question hash: see attachment

I've checked it works: http://www.bananalive.co.cc/misc.php?do=form&fid=13

bananalive 03-07-2009 10:03 AM

Quote:

Originally Posted by admin0 (Post 1762202)
Hi,

If there is say form1 and user have already submitted to it, is it possible to pull off the old values or if the user submits again, just update the new values rather than insert new lines in the database ?

I don't think so.

bananalive 03-07-2009 10:04 AM

Quote:

Originally Posted by xcesivvs (Post 1761545)
sorry to be a pain mate... i asked this a bit back and still stuck... thanks

ok, i'll test this, and try to make it easier.

bananalive 03-07-2009 10:04 AM

Quote:

Originally Posted by frogster (Post 1760516)
Okay so that worked for the initial post .... don't kill me... but now anytime the same user posts anything else instead of adding a new note to the facebook wall, it replaces the old post with the new post. I would normally ask the FB developer/thread for help but the thing is that it just started happening when I installed the new xml file. Sorry for the trouble and I really do appreciate your help.

Is this for all posts, or just ones created with Easy Forms?

dknelson 03-07-2009 10:22 AM

OK....I will try the restaurant form again. I thought I was using the correct question hash. I tried yours and it worked fine so what are you selecting where it asks how the forum is to be submitted. Submit to thread? If so, since the script is choosing the thread ID, what are you just leaving it blank?

bananalive 03-07-2009 11:29 AM

Quote:

Originally Posted by dknelson (Post 1762371)
OK....I will try the restaurant form again. I thought I was using the correct question hash. I tried yours and it worked fine so what are you selecting where it asks how the forum is to be submitted. Submit to thread? If so, since the script is choosing the thread ID, what are you just leaving it blank?

Here's a screenshot which shows all the settings:
http://img9.imageshack.us/img9/2391/editform.png

dknelson 03-07-2009 12:01 PM

OK.....thanks. I understand my problem now. Here is the php for my custom "location" question. As you can see, there are no question hashes. So I need to add question hashes to all of these answers. Do I just assign them manually?

Quote:

$answer = '<select id="q_' . $formbit[id] . '" name="' . $formbit[id] . '"><option value="">Select One</option><optgroup label="Canadian Provinces"><option value="AB">Alberta</option><option value="BC">British Columbia</option><option value="MB">Manitoba</option><option value="NB">New Brunswick</option><option value="NF">Newfoundland</option><option value="NT">Northwest Territories</option><option value="NS">Nova Scotia</option><option value="NU">Nunavut</option><option value="ON">Ontario</option><option value="PE">Prince Edward Island</option><option value="QC">Quebec</option><option value="SK">Saskatchewan</option><option value="YT">Yukon Territory</option></optgroup> <optgroup label="U.S. States"><option value="AK">Alaska</option><option value="AL">Alabama</option><option value="AR">Arkansas</option><option value="AZ">Arizona</option><option value="CA">California</option><option value="CO">Colorado</option><option value="CT">Connecticut</option><option value="DC">District of Columbia</option><option value="DE">Delaware</option><option value="FL">Florida</option><option value="GA">Georgia</option><option value="HI">Hawaii</option><option value="IA">Iowa</option><option value="ID">Idaho</option><option value="IL">Illinois</option><option value="IN">Indiana</option><option value="KS">Kansas</option><option value="KY">Kentucky</option><option value="LA">Louisiana</option><option value="MA">Massachusetts</option><option value="MD">Maryland</option><option value="ME">Maine</option><option value="MI">Michigan</option><option value="MN">Minnesota</option><option value="MO">Missouri</option><option value="MS">Mississippi</option><option value="MT">Montana</option><option value="NC">North Carolina</option><option value="ND">North Dakota</option><option value="NE">Nebraska</option><option value="NH">New Hampshire</option><option value="NJ">New Jersey</option><option value="NM">New Mexico</option><option value="NV">Nevada</option><option value="NY">New York</option><option value="OH">Ohio</option><option value="OK">Oklahoma</option><option value="OR">Oregon</option><option value="PA">Pennsylvania</option><option value="PR">Puerto Rico</option><option value="RI">Rhode Island</option><option value="SC">South Carolina</option><option value="SD">South Dakota</option><option value="TN">Tennessee</option><option value="TX">Texas</option><option value="UT">Utah</option><option value="VA">Virginia</option><option value="VT">Vermont</option><option value="WA">Washington</option><option value="WI">Wisconsin</option><option value="WV">West Virginia</option><option value="WY">Wyoming</option></optgroup></select>';
$selected = "value=\"" . $q_{$formbit[id]} . "\"";
$answer = str_replace($selected, $selected. "selected=\"seleceted\"", $answer);

bananalive 03-07-2009 12:21 PM

Quote:

Originally Posted by dknelson (Post 1762437)
OK.....thanks. I understand my problem now. Here is the php for my custom "location" question. As you can see, there are no question hashes. So I need to add question hashes to all of these answers. Do I just assign them manually?

No question hashs are to identify a question's output. Your custom question should be this:

For usa restaurant reviews form
PHP Code:

$answer '<select name="'.$formbit[id].'">';
$answer .= '<option></option>';
$thisanswer $q[$formbit[id]];
$threads $db->query_read("SELECT * FROM " TABLE_PREFIX "thread
WHERE forumid = '111' 
ORDER BY title ASC"
);
    while(
$row $db->fetch_array($threads)) {
$answer .= '<option value="'.$row[threadid].'"';
if (
$row[threadid] == $thisanswer) {
$answer .= ' selected="selected"';
}
$answer .= '>'.htmlspecialchars($row[title]).'</option>';
}
$answer .= '</select>'


dknelson 03-07-2009 01:12 PM

WOW...I am so close now. Or I should say that YOU are so close to explaining it to a complete dummy. I replaced my drop down state selection question for the USA forum with that code. It works. The only thing now is that here is what I get posted.

Quote:

Name of Restaurant: test
Street Address: test
City: test
Location 32653
Website (Optional): -
Quality of Food: Bad
Quality of Service: Bad
Biker Friendly? Yes
Kind of Food? (Mexican, Chinese, etc.) tetst
Alcohol Served? Yes
Additional Comments: -
As you can see, it is posting the threadID for location instead of the actual state. I am not using custom output. Is the only way to correct this to use custom output with $qo


All times are GMT. The time now is 11:52 PM.

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

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02877 seconds
  • Memory Usage 1,938KB
  • 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
  • (13)bbcode_php_printable
  • (30)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)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