vb.org Archive

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

bananalive 04-02-2010 11:50 AM

For v4.0.7, I've prevented these errors from occuring by preventing zero value.

Quote:

Originally Posted by Trek (Post 2014391)
I created a new form by using the Copy function of another form.

The new form layout is really messed up and also throws a PHP error

Warning: Division by zero in [path]/misc.php(89) : eval()'d code on line 893

Form: http://www.darkhandofvalor.com/misc.php?do=form&fid=11

The old form is fine: http://www.darkhandofvalor.com/misc.php?do=form&fid=5

Quote:

Originally Posted by Trek (Post 2014394)
Ok, found the problem.

When you create a new field of Radio Button type. The default for "Options per row" is set to 0. I changed it to 1 and the entire form started working correctly and no PHP error.

Quote:

Originally Posted by Bobbo (Post 2014270)
Dom, I really appreciate your offer. I figured out what the problem is though. I was ignoring the Maxlength field... I had it set for the default value of 0. In Chrome, this setting still allowed me to enter data in the field. In IE8, it took 0 as 0, and wont let me enter anything... As soon as I entered a real value for the parameter, I could enter data.

Regards,


Bobbo


bananalive 04-02-2010 11:51 AM

Quote:

Originally Posted by harleyparts (Post 2014214)
me too this is what its doing to me I'm gonna try a multi line text question and see if it works

Edit Question, and change maxlength to greater than zero

bananalive 04-02-2010 11:52 AM

Quote:

Originally Posted by Selcor (Post 2014215)
First, I commend banalive for your work, consider this one of the best MODs!

I updated to version 4.0.6, and uploaded the files (755 permits).

I have the following problem:

[image]

In the resulting post is displayed incorrectly, but in the option Form Results Table is well visualized.

Greetings!.

I assume you are using custom output?

If you are, try using {qo_X} instead of {q_x} in custom output

Volvoholic 04-02-2010 12:13 PM

1 Attachment(s)
Quote:

Originally Posted by bananalive (Post 2014201)
Permissions are set via:

AdminCP -> vBulletin Options -> Easy Form Options

Hi Bananalive. Yes I have done all that but I still can't find the options.

The Easy Forms Options is missing the option to Add, Edit...etc. I can't start a new form or change the permissions. The options are missing or I am going blind.



https://vborg.vbsupport.ru/external/2010/04/84.jpg

your24hourstore 04-02-2010 12:17 PM

Quote:

Originally Posted by Volvoholic (Post 2014591)
Hi Bananalive. Yes I have done all that but I still can't find the options.

The Easy Forms Options is missing the option to Add, Edit...etc. I can't start a new form or change the permissions. The options are missing or I am going blind.



https://vborg.vbsupport.ru/external/2010/04/84.jpg

just highlight the user groups you want to be able to view use see edit in each category then save

your24hourstore 04-02-2010 12:28 PM

Quote:

Originally Posted by harleyparts (Post 2014594)
just highlight the user groups you want to be able to view use see edit in each category then save

I have noticed however that if i select the top half, i must add banned users to the group

I haven't figured out how to add users without selecting all or just one class like administrator
Do you had each group individually then save it and then add another?

your24hourstore 04-02-2010 12:37 PM

1 Attachment(s)
still get the wrong answer when i use the drop down, cant seem to get past it



says
Quote:

test
what type 3
test
should say
Quote:

test
what type three
test

bananalive 04-02-2010 12:46 PM

Quote:

Originally Posted by harleyparts (Post 2014594)
just highlight the user groups you want to be able to view use see edit in each category then save

If you hold down CTRL you can select/ de-select usergroups individually.

bananalive 04-02-2010 12:49 PM

1 Attachment(s)
Quote:

Originally Posted by Volvoholic (Post 2014591)
Hi Bananalive. Yes I have done all that but I still can't find the options.

The Easy Forms Options is missing the option to Add, Edit...etc. I can't start a new form or change the permissions. The options are missing or I am going blind.



https://vborg.vbsupport.ru/attachmen...7&d=1270213875

Your options page should look like this:
https://vborg.vbsupport.ru/attachmen...1&d=1270216126

Permission to Edit Forms, is also permission to add forms.

bananalive 04-02-2010 12:57 PM

Quote:

Originally Posted by harleyparts (Post 2014603)
still get the wrong answer when i use the drop down, cant seem to get past it



says

should say

Custom Output currently:
Code:

{q_1}
 {qn_4} {q_4}
 {q_3}

Change to:

Code:

{q_1}
 {qn_4} {qo_4}
 {q_3}


antua al toro 04-02-2010 01:36 PM

Hallo!
why BB code doesn't work in form description?
i need to add IMG tag in description but can't

http://www.my.ps-box.ru/misc.php?do=form&fid=14

bananalive 04-02-2010 02:07 PM

Quote:

Originally Posted by antua al toro (Post 2014633)
Hallo!
why BB code doesn't work in form description?
i need to add IMG tag in description but can't

http://www.my.ps-box.ru/misc.php?do=form&fid=14

You may need to enable [img] bbcode for non-forum areas

AdminCP -> vBulletin Options -> BB Code Settings -> Allow [IMG] Code in Non Forum Specific Areas

Click Yes and then Save

antua al toro 04-02-2010 03:52 PM

thank you, man! it works! :)

your24hourstore 04-02-2010 06:35 PM

Quote:

Originally Posted by bananalive (Post 2014615)
Custom Output currently:
Code:

{q_1}
 {qn_4} {q_4}
 {q_3}

Change to:

Code:

{q_1}
 {qn_4} {qo_4}
 {q_3}


yep that seems to work thanks

kemical 04-02-2010 06:36 PM

Thank you for this awesome mod!

Is there a way to have a form post to two separate forums at the same time? I run a forum for a World of Warcraft guild, and I setup a form for people applying to our guild. Right now the form posts to a public forum, but I would like it to also be posted to a more restricted forum as well.

Selcor 04-02-2010 07:24 PM

Quote:

Originally Posted by bananalive (Post 2014583)
I assume you are using custom output?

If you are, try using {qo_X} instead of {q_x} in custom output


Thank you very much!, You're right!.


I do not understand much English language:

In the section Edit Form - Thread / PM / Email Title use {q_*}
In the section Form BB code and Custom Output use {qo_*}

What is the difference between {q_*} {qo_*} and {qn_*} ???.

Edit:

Understood the difference between {qo_*} and {qn_*}.
{qo_*} sends the response and {qn_*} send the question.

One suggestion for future versions:
?One could be used ID relative and not absolute?, because when you copy a Form, it changes all the ID and we have to re-edit the entire Form.

Thanks!

your24hourstore 04-02-2010 09:02 PM

PHP Code:

if (in_array($forumid, array(58,59,60,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108))) 
{  
      
header'Location: http://www.harleydavidsonpartsforum.comforum/misc.php?do=form&fid=1' ) ;   
 } 


where do i need to put the newthread_start in Form Hook: Form Start: or Form Hook: Before Submit:
i had it working but lost it

N/M i figured it out thanks anyways

Cedric_FP 04-03-2010 02:16 AM

Can this form product customize output (when creating a new thread) of specific questions.

For example:

Question 1: How old are you?


Output:
  • 22 years old

stuky4ever 04-03-2010 02:32 AM

Quote:

Originally Posted by bananalive (Post 2012743)
Use {qo_1}

Im not using a custom output, and non of that worked.

Tortikova 04-04-2010 12:01 PM

Have you got sidebar widget for last active voting?

Supramania 04-05-2010 04:19 AM

Hi,

I responded back in post #338

No help for my issue at all?

If I export the form xml and reimport it into a new form I have the same issue.

I have tried upgrading to 4.0.7 - no change.

Cadellin 04-05-2010 10:19 AM

Would it be possible to have a DD/MM/YYYY date format option? Many of my users are entering the date the incorrectly because we're not used to the US format :)

Thanks

munsonfan15 04-05-2010 02:04 PM

I was looking to install this for members to rate classes given by other members. Before I do this I was making sure it is capable of what I want to do.

I want to be able to have a link in a certain user groups postbit where when you click that link and persons user name (the one that made that post) will become one of the variable answers. When the peson fills out the form the title of the thread that is created will be of that members name (the variable).

Example:

Im in User A's post - I click on the link, fill out the form and when the thread is created the title of the form is 'User A etec etc etc'

Can this be done and if so how?

**** I want to change this - Actually I will have the link go to a form but i would like one of the variables by a drop down list of all the members in a first and seconday user group.

drainpan 04-05-2010 11:39 PM

1 Attachment(s)
I love this thing... it is the greatest other than the minor problem I am having. I read through this entire thread and didn't see anyone else having the same problem so it must be something I am doing wrong.

I create my form with 14 questions and it is set to make a thread in a specific forum and it does that.... however it doesn't display all of the questions and answers... only the first 4 and they are a bit strange as you can see from the screenshots...

As you can see... I have the Custom Form Output set to show all of the questions and the answers but the first one shows up fine then there is a crap load of space before 2, 3 and 4 show and 5-14 don't show at all.

any ideas?

jaryx 04-06-2010 07:17 AM

How can I do something like that?:

if form posted by normal user, then post on threadid = X
if form posted by vip, then post on threadid = Y

bananalive 04-06-2010 09:58 AM

Quote:

Originally Posted by jaryx (Post 2016669)
How can I do something like that?:

if form posted by normal user, then post on threadid = X
if form posted by vip, then post on threadid = Y

Add the following php code to Form Hook: Before Submit:
PHP Code:

if ($vbulletin->userinfo['usergroupid']==6)
{
$form['threadid'] = 2;
}
else
{
$form['threadid'] = 3;


Assuming 6 is vip usergroup

bananalive 04-06-2010 10:00 AM

1 Attachment(s)
Quote:

Originally Posted by drainpan (Post 2016504)
I love this thing... it is the greatest other than the minor problem I am having. I read through this entire thread and didn't see anyone else having the same problem so it must be something I am doing wrong.

I create my form with 14 questions and it is set to make a thread in a specific forum and it does that.... however it doesn't display all of the questions and answers... only the first 4 and they are a bit strange as you can see from the screenshots...

As you can see... I have the Custom Form Output set to show all of the questions and the answers but the first one shows up fine then there is a crap load of space before 2, 3 and 4 show and 5-14 don't show at all.

any ideas?

I think you will be using the wrong question hashes for custom output - see image below.

https://vborg.vbsupport.ru/external/2010/04/61.jpg

bananalive 04-06-2010 10:05 AM

Quote:

Originally Posted by munsonfan15 (Post 2016176)
I was looking to install this for members to rate classes given by other members. Before I do this I was making sure it is capable of what I want to do.

I want to be able to have a link in a certain user groups postbit where when you click that link and persons user name (the one that made that post) will become one of the variable answers. When the peson fills out the form the title of the thread that is created will be of that members name (the variable).

Example:

Im in User A's post - I click on the link, fill out the form and when the thread is created the title of the form is 'User A etec etc etc'

Can this be done and if so how?

**** I want to change this - Actually I will have the link go to a form but i would like one of the variables by a drop down list of all the members in a first and seconday user group.

Yes, it is possible with Easy Forms

For dropdown list of members, create a custom question with following php code:
PHP Code:

$answer .= '<select name="'.$formbit[id].'">';
$members $db->query_read("SELECT * FROM " TABLE_PREFIX "user
WHERE usergroupid = 2
ORDER BY username ASC"
);
    while(
$row $db->fetch_array($members)) {
$answer .= '<option value="'.$row[username].'"';
if (
$row[username] == $thisanswer) {
$answer .= 'selected="selected"';
}
$answer .= '>'.$row[username].'</option>';
}
$answer .= '</select>'

Change 2 to the desired usergroupid

bananalive 04-06-2010 10:07 AM

Quote:

Originally Posted by Cadellin (Post 2016078)
Would it be possible to have a DD/MM/YYYY date format option? Many of my users are entering the date the incorrectly because we're not used to the US format :)

Thanks

When creating the date question you have the option for date format

bananalive 04-06-2010 10:09 AM

Quote:

Originally Posted by Supramania (Post 2015958)
Hi,

I responded back in post #338

No help for my issue at all?

If I export the form xml and reimport it into a new form I have the same issue.

I have tried upgrading to 4.0.7 - no change.

I've tried importing your forms and they work for me

There is nothing in Easy Forms code which limits the strings so I've got no idea what could be causing it.

bananalive 04-06-2010 10:09 AM

Quote:

Originally Posted by Tortikova (Post 2015558)
Have you got sidebar widget for last active voting?

Huh?

bananalive 04-06-2010 10:10 AM

Quote:

Originally Posted by stuky4ever (Post 2014945)
Im not using a custom output, and non of that worked.

Try upgrading to latest version.

bananalive 04-06-2010 10:10 AM

Quote:

Originally Posted by Cedric_FP (Post 2014938)
Can this form product customize output (when creating a new thread) of specific questions.

For example:

Question 1: How old are you?


Output:
  • 22 years old

Yes there is an option to create custom output when edit each form.

bananalive 04-06-2010 10:13 AM

Quote:

Originally Posted by Selcor (Post 2014793)

Thank you very much!, You're right!.


I do not understand much English language:

In the section Edit Form - Thread / PM / Email Title use {q_*}
In the section Form BB code and Custom Output use {qo_*}

What is the difference between {q_*} {qo_*} and {qn_*} ???.

Edit:

Understood the difference between {qo_*} and {qn_*}.
{qo_*} sends the response and {qn_*} send the question.

One suggestion for future versions:
?One could be used ID relative and not absolute?, because when you copy a Form, it changes all the ID and we have to re-edit the entire Form.

Thanks!

The problem with relative question hashes is that if you re-order the questions then it would mess up all of the custom output.

I have added the option of 'Reference Name:' when creating/editing questions which can be used instead of question hashes and would remain the same when copying forms.

bananalive 04-06-2010 10:16 AM

Quote:

Originally Posted by kemical (Post 2014771)
Thank you for this awesome mod!

Is there a way to have a form post to two separate forums at the same time? I run a forum for a World of Warcraft guild, and I setup a form for people applying to our guild. Right now the form posts to a public forum, but I would like it to also be posted to a more restricted forum as well.

You could copy the code for posting a new thread into Form Hook: Before Submit:

(Changing forumid 31 to your preferred forumid in line 1 of code below)

PHP Code:

$forumid2 31;
if (
$complete)
    {
        if (!
$vbulletin->userinfo['userid'])
        {
            
$vbulletin->input->clean_array_gpc('p', array(
                
'humanverify' => TYPE_ARRAY,
            ));
            
$newpost['humanverify'] = $vbulletin->GPC['humanverify'];
        }
        require_once(
DIR '/includes/functions_editor.php');
        require_once(
DIR '/includes/functions_bigthree.php');
        require_once(
'./includes/class_dm.php');
        require_once(
'./includes/class_dm_threadpost.php'); 
        require_once(
'./includes/functions_databuild.php');
        if (!
$closed)
        {
            
$open 1;
        }
        else
        {
            
$open 0;
        }
        
$threaddm = new vB_DataManager_Thread_FirstPost($vbulletinERRTYPE_STANDARD);
        
/*$foruminfo = fetch_foruminfo($forumid);*/
        
$threaddm->set_info('forum',$foruminfo);
        
$threaddm->set_info('user'$vbulletin->userinfo);
        
$threaddm->set('forumid'$forumid2);
        
$threaddm->set('userid'$vbulletin->userinfo['userid']);
        
$threaddm->set('title'$threadtitle);
        
$threaddm->set('pagetext'$formoutput); 
        
$allow_smilie '1';
        
$visible '1';
        
$threaddm->set('open'$open);
        if (
$form[prefixid])
        {
            
$threaddm->set('prefixid'$form[prefixid]); 
        }
        if (
$form[iconid])
        {
            
$threaddm->set('iconid'$iconid); 
        }
        
$threaddm->set('allowsmilie'$allow_smilie);
        
$threaddm->set('visible'$visible);
        
$threaddm->pre_save();
        
$threadid $threaddm->save();
        unset(
$threaddm);
        
build_thread_counters($threadid);
        
build_forum_counters($forumid);  
        if (!empty(
$threaddm->errors))
        {
            
$errorss .= $threaddm->errors;
            
$errormessage "Form failed to submit. The following error(s) occured: <br /> ".$errorss;
            eval(
standard_error($errormessage));
        }
        
$threadinfo fetch_threadinfo($threadid);
        
$newpost['postid'] = $threadinfo['firstpostid'];
        
mark_thread_read($threadinfo$foruminfo$vbulletin->userinfo['userid'], TIMENOW);
        
/*($hook = vBulletinHook::fetch_hook('newthread_post_complete')) ? eval($hook) : false;*/
        
if ($form[poll] == 1)
        {
            
$question $form[pollquestion];
            
$threadinfo verify_id('thread'$threadid01);
            
$polloptions count($polloption);
            
$vbulletin->GPC['options'] = $polloption;
            
$counter 0;
            
$optioncount 0;
            
$badoption '';
            while (
$counter++ < $polloptions)
            {
                if (
$vbulletin->options['maxpolllength'] AND vbstrlen($vbulletin->GPC['options']["$counter"]) > $vbulletin->options['maxpolllength'])
                {
                    
$badoption .= iif($badoption', ') . $counter;
                }
                if (!empty(
$vbulletin->GPC['options']["$counter"]))
                {
                    
$optioncount++;
                }
            }
            
$poll datamanager_init('Poll'$vbulletinERRTYPE_STANDARD);
            
$counter 0;
            while (
$counter++ < $polloptions)
            {
                if (
$vbulletin->GPC['options']["$counter"] != '')
                {
                    
$poll->set_option($vbulletin->GPC['options']["$counter"]);
                }
            }
            
$poll->set('question'$question);
            
$poll->set('dateline'TIMENOW);
            
$poll->set('active''1');
            
$poll->set('public'$form['publicpoll']);
            
$poll->set('multiple'$form['multiplepoll']);
            
$pollid $poll->save();
            
$threadman datamanager_init('Thread'$vbulletinERRTYPE_STANDARD'threadpost');
            
$threadman->set_existing($threadinfo);
            
$threadman->set('pollid'$pollid);
            
$threadman->save();
        }
        if (
$form[submitmessage])
        {
            
$errormessage $form[submitmessage];
        }
        else
        {
            
$errormessage "Form was submitted successfully. Click <a href=\"showthread.php?" $vbulletin->session->vars['sessionurl'] . "p=" $newpost[postid] . "#post" $newpost[postid] . "\">here</a> to view the thread.";
        }
    } 


munsonfan15 04-06-2010 10:37 AM

Quote:

Originally Posted by bananalive (Post 2016731)
Yes, it is possible with Easy Forms

For dropdown list of members, create a custom question with following php code:
PHP Code:

$answer .= '<select name="'.$formbit[id].'">';
$members $db->query_read("SELECT * FROM " TABLE_PREFIX "user
WHERE usergroupid = 2
ORDER BY username ASC"
);
    while(
$row $db->fetch_array($members)) {
$answer .= '<option value="'.$row[username].'"';
if (
$row[username] == $thisanswer) {
$answer .= 'selected="selected"';
}
$answer .= '>'.$row[username].'</option>';
}
$answer .= '</select>'

Change 2 to the desired usergroupid

Works like a charm - one addition if you could help me out please - how can I add secondary groups also?

bananalive 04-06-2010 11:07 AM

Quote:

Originally Posted by munsonfan15 (Post 2016746)
Works like a charm - one addition if you could help me out please - how can I add secondary groups also?

PHP Code:

$usgid 2;
$answer .= '<select name="'.$formbit[id].'">';
$members $db->query_read("SELECT * FROM " TABLE_PREFIX "user
WHERE usergroupid = '
$usgid' OR membergroupids = '$usgid' OR membergroupids LIKE \"$usgid,%\" OR membergroupids LIKE \"%,$usgid\" OR membergroupids LIKE \"%,$usgid,%\"
ORDER BY username ASC"
);
    while(
$row $db->fetch_array($members)) {
$answer .= '<option value="'.$row[username].'"';
if (
$row[username] == $thisanswer) {
$answer .= 'selected="selected"';
}
$answer .= '>'.$row[username].'</option>';
}
$answer .= '</select>'


munsonfan15 04-06-2010 11:21 AM

FANTASTIC! Thank you so much...Installed

munsonfan15 04-06-2010 02:30 PM

I cannot get some custom ouput to work.

I have tried the following: {q_1}, {qo_1}, and {q_date} (date is the reference name I assigned_ and I iether get nothing or some funny symbols.

When I use {q_2} (this is a drop down box variable) that works everywhere I use it, in the body of the post and the post title - just dont know why the date question and radio box question do not work correctly.

the {qn_x} works and puts the actual question just fine.

munsonfan15 04-06-2010 05:15 PM

Well I thought all was well (except for my custom ouput problem above) until I tried to submit a form being a regular member instead of an Admin. I get a message that there is a Securuty Token problem and form cannot be sumbitted. I have checked all permissions and all looks ok. Not sure what that message means.

*** I figured some things outs...

I received the Security Token error if I have a member on both a primary and secondary usergroup AND have the displayed group anything other then default. If I change to Default it all appears to work ok


All times are GMT. The time now is 08:15 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.02298 seconds
  • Memory Usage 1,962KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (6)bbcode_php_printable
  • (29)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