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 02-04-2010 11:36 AM

Quote:

Originally Posted by simonhind (Post 1974372)
thank you, but still not sure where to put this, also i think that this should be implented if possible

for now please help me with this

Click Edit Form then scroll down to Form Hooks

Add it to the textbox 'Form Hook: Before Submit'

PHP Code:

$ip $vbulletin->input->clean($_SERVER['REMOTE_ADDR'], TYPE_STR);
$formoutput .= $form[preq] . "IP:" $form[pstq];
$formoutput .= $form['prea'] . $ip $form[psta]; 


freexav 02-04-2010 11:58 AM

hi there,

this mod looks awesome!
I would like to know if ever you could implement it with the following function :
- being able to select the values of a drop-down dynamically from a table in the database
- dynamically update the next drop down menus according to the previous dropdown choice of the user.
For instance, imagine a member choses its country from a drop down list. And then, when he has to chose for its state, only his country's states will appear in the state dropdown.

Best regards and keep up the good work!
very nice mod!

jimfries 02-05-2010 01:00 AM

Amazing Mod, and is just what I need for my World of Warcaft Guild website. We are using this as a recruitment form for new and interested players to apply to our guild.

My problem: When the forum is submitted, it is quite long, so there are 20 some questions listed. Many of these are single line question - answers, but are listed in the forum in 2-3 lines.

My request: Is it possible to have an option, or is there a way, to make all one line question - answers appear on just one line when submitted in the forums?

-----------------
My Problem: When I use a Section, it appears on the same line as the first question after the Section.

Solution: Unknown.

Alex@Mk3OC 02-05-2010 07:51 AM

Excellent mod, it has an issue with vBAdvanced Beta 2m but I'm pretty sure it's an issue with vBadvanced and not this mod so have reported it over there

Scooterpig 02-05-2010 09:01 AM

1 Attachment(s)
Ok I'm still having viewing permissions issues. Here is a pic of my settings as instructed and as an admin I can see the 1 form I have no worries, but if I log in as a member, the Forms link is there but when I go to the page it's showing as no forms.

What am I doing wrong please?

denman75 02-05-2010 10:44 AM

one of the best mods

*nominated

one question ,is there a way to delete the Form Results Table
al the test stats remain in the database ,or do i have to trash the table manual in mysql?

bananalive 02-05-2010 01:45 PM

Quote:

Originally Posted by denman75 (Post 1975329)
one of the best mods

*nominated

one question ,is there a way to delete the Form Results Table
al the test stats remain in the database ,or do i have to trash the table manual in mysql?

Next to each result on Form Results there is a delete button.

bananalive 02-05-2010 01:47 PM

Quote:

Originally Posted by Scooterpig (Post 1975277)
Ok I'm still having viewing permissions issues. Here is a pic of my settings as instructed and as an admin I can see the 1 form I have no worries, but if I log in as a member, the Forms link is there but when I go to the page it's showing as no forms.

What am I doing wrong please?

Looking at your screenshot that all looks fine.

If you go to Edit Form, scroll down to Form Permissions, have you changed anything?

bananalive 02-05-2010 01:48 PM

Quote:

Originally Posted by jimfries (Post 1975109)
Amazing Mod, and is just what I need for my World of Warcaft Guild website. We are using this as a recruitment form for new and interested players to apply to our guild.

My problem: When the forum is submitted, it is quite long, so there are 20 some questions listed. Many of these are single line question - answers, but are listed in the forum in 2-3 lines.

Edit Form -> Answer BB code
First box: [I]
Second box: [/I]\r\n
Quote:

Originally Posted by jimfries (Post 1975109)
My request: Is it possible to have an option, or is there a way, to make all one line question - answers appear on just one line when submitted in the forums?

Quote:

Originally Posted by jimfries (Post 1975109)
-----------------
My Problem: When I use a Section, it appears on the same line as the first question after the Section.

Solution: Unknown.

On Edit Form page, add to the end of the right hand box of 'Section BB code' add \r\n

Sarcoth 02-05-2010 05:12 PM

Quote:

Originally Posted by bananalive (Post 1974207)
Use this:

Form Hook: Before Submit
PHP Code:

if ($complete)  
{
$userinfo $vbulletin->userinfo;
if (empty(
$user['membergroupids']))
{
/*alter this number below*/
$user['membergroupids'] = '4';
} else {
/*alter this number below, but leave the comma*/
$user['membergroupids'] .=  ',4';
}
$userdata =& datamanager_init('User'$vbulletinERRTYPE_STANDARD);
$userdata->set_existing($userinfo);
$userdata->set('membergroupids'$user['membergroupids']);
$vbulletin->userinfo['membergroupids'] = $user['membergroupids'];
$userdata->save();



Very nice. I got this working without any problems. I notice that it removes the userid from all membergroups and then just adds them to the one. If I know the membergroup id, can I remove them from just one and add them to the other. For example, when they submit this form, I'd like to remove them from 17 and add them to 18.

Also, is there a way for me to update their "Display Usergroup" to the usergroup (18) they are added to? I've done coding with membergroups before, but I've never seen anything update the display part.

Fun stuff, thanks!

Scooterpig 02-05-2010 06:38 PM

Quote:

Originally Posted by bananalive (Post 1975415)
Looking at your screenshot that all looks fine.

If you go to Edit Form, scroll down to Form Permissions, have you changed anything?

Mate thank you so much i missed that section and that has fixed it all up, thank you very much..:)

jimfries 02-05-2010 07:26 PM

Excellent Banana! That resolved so much. I'm afraid I just don't know enough php to solve that simple little thing, arg.

One more thing, is it possible to make the text box entries do a line return (not have the answer right after the question). So single line box's would have the answers right after the question (which I have now), but multi-line questions will have their answers under the question. Its just a cosmetics thing for me. I would like to do a line return after the answer for multi-line questions also.

God this is really an amazing addon brother, it looks GREAT...

jimfries 02-05-2010 10:54 PM

I was looking at the post in the forums, and my OCD kicked in. Do you know if its possible to write bbcode that will make the forum post into tables? So they are all even, kind of like tabing forward so the Answers are all started at the same place down the page.

I know it may be a silly thing to ask, I was just curious.

bananalive 02-06-2010 02:47 PM

Quote:

Originally Posted by jimfries (Post 1975689)
I was looking at the post in the forums, and my OCD kicked in. Do you know if its possible to write bbcode that will make the forum post into tables? So they are all even, kind of like tabing forward so the Answers are all started at the same place down the page.

I know it may be a silly thing to ask, I was just curious.

You would need a BB code [table] for that, not sure if one is avaliable for vB 4.

bananalive 02-06-2010 02:48 PM

Quote:

Originally Posted by jimfries (Post 1975586)
Excellent Banana! That resolved so much. I'm afraid I just don't know enough php to solve that simple little thing, arg.

One more thing, is it possible to make the text box entries do a line return (not have the answer right after the question). So single line box's would have the answers right after the question (which I have now), but multi-line questions will have their answers under the question. Its just a cosmetics thing for me. I would like to do a line return after the answer for multi-line questions also.

God this is really an amazing addon brother, it looks GREAT...

no.

you could always try a custom output

bananalive 02-06-2010 02:48 PM

Quote:

Originally Posted by Scooterpig (Post 1975564)
Mate thank you so much i missed that section and that has fixed it all up, thank you very much..:)

glad it working for you now.

bananalive 02-06-2010 02:57 PM

Quote:

Originally Posted by Sarcoth (Post 1975515)
Very nice. I got this working without any problems. I notice that it removes the userid from all membergroups and then just adds them to the one. If I know the membergroup id, can I remove them from just one and add them to the other. For example, when they submit this form, I'd like to remove them from 17 and add them to 18.

Also, is there a way for me to update their "Display Usergroup" to the usergroup (18) they are added to? I've done coding with membergroups before, but I've never seen anything update the display part.

Fun stuff, thanks!

Woops it shouldn't have removed all other membergroups, there was a little mistake in the code :o. But if thats what you wanted then that alright :)

PHP Code:

if ($complete)  
{
$user $userinfo $vbulletin->userinfo;
$newmembergroupid '18';
$display_usergroup $user['membergroupids'] = $newmembergroupid;

$userdata =& datamanager_init('User'$vbulletinERRTYPE_STANDARD);
$userdata->set_existing($userinfo);
$userdata->set('membergroupids'$user['membergroupids']);
$userdata->set_usertitle
$user['customtitle'] ? $user['usertitle'] : ''
false
$display_usergroup
(
$user_usergroup['genericpermissions'] & $vbulletin->bf_ugp_genericpermissions['canusecustomtitle']) ? true false
(
$user_usergroup['genericpermissions'] & $vbulletin->bf_ugp_genericpermissions['cancontrolpanel']) ? true false 
); 
$vbulletin->userinfo['membergroupids'] = $user['membergroupids'];
$vbulletin->userinfo['displaygroupid'] = $newmembergroupid
$userdata->save();



Veer 02-06-2010 03:25 PM

Hi bananalive,

I want to change the Form width, currently it is 750px, I need to change it to 950px

Sarcoth 02-07-2010 04:42 AM

Quote:

Originally Posted by bananalive (Post 1976061)
Woops it shouldn't have removed all other membergroups, there was a little mistake in the code :o. But if thats what you wanted then that alright :)

PHP Code:

if ($complete)  
{
$user $userinfo $vbulletin->userinfo;
$newmembergroupid '18';
$display_usergroup $user['membergroupids'] = $newmembergroupid;

$userdata =& datamanager_init('User'$vbulletinERRTYPE_STANDARD);
$userdata->set_existing($userinfo);
$userdata->set('membergroupids'$user['membergroupids']);
$userdata->set_usertitle
$user['customtitle'] ? $user['usertitle'] : ''
false
$display_usergroup
(
$user_usergroup['genericpermissions'] & $vbulletin->bf_ugp_genericpermissions['canusecustomtitle']) ? true false
(
$user_usergroup['genericpermissions'] & $vbulletin->bf_ugp_genericpermissions['cancontrolpanel']) ? true false 
); 
$vbulletin->userinfo['membergroupids'] = $user['membergroupids'];
$vbulletin->userinfo['displaygroupid'] = $newmembergroupid
$userdata->save();



That didn't work either. It's still removing the user from all membergroups and it didn't successfully set the user to the new displaygroup either. My goal is to have them removed only from one group (17).

Is there a way to use one of the questions as a variable for this? I'd like to enter an userID in one of the questions, let's say question 1. When I enter that userID and submit, it will specifically remove that user from group 17 and and them to 18. As well as update their displaygroup to 18.

Cadellin 02-07-2010 07:26 PM

Fantastic mod - this is exactly what I've been hoping for!

Two queries though:

1. Guests get the following message "The string you entered for the image verification did not match what was displayed." - however no image verification is displayed.

2. I have a lot of questions in my form so could you add the option to have horizontal scrolling of the results table?

Thanks

Cadellin 02-10-2010 09:37 AM

Has anyone else come across the problem with image verification? I've never seen anything about image verification in any of the forms whether I'm logged in or not!

EDIT: After adding the verification question to the form it submits ok for admins however for other users it still returns the "The string you entered for the image verification did not match what was displayed." message even when the image does match exactly.

bananalive 02-11-2010 11:47 AM

1 Attachment(s)
Quote:

Originally Posted by Cadellin (Post 1978985)
Has anyone else come across the problem with image verification? I've never seen anything about image verification in any of the forms whether I'm logged in or not!

EDIT: After adding the verification question to the form it submits ok for admins however for other users it still returns the "The string you entered for the image verification did not match what was displayed." message even when the image does match exactly.

Fixed in attached product. This issue would only incur for guests.

bananalive 02-11-2010 11:53 AM

1 Attachment(s)
Quote:

Originally Posted by Cadellin (Post 1976874)
Fantastic mod - this is exactly what I've been hoping for!

Two queries though:

1. Guests get the following message "The string you entered for the image verification did not match what was displayed." - however no image verification is displayed.

2. I have a lot of questions in my form so could you add the option to have horizontal scrolling of the results table?

Thanks

1 fixed in attached file
2 also implemented

bananalive 02-11-2010 12:05 PM

Quote:

Originally Posted by Sarcoth (Post 1976438)
That didn't work either. It's still removing the user from all membergroups and it didn't successfully set the user to the new displaygroup either. My goal is to have them removed only from one group (17).

Is there a way to use one of the questions as a variable for this? I'd like to enter an userID in one of the questions, let's say question 1. When I enter that userID and submit, it will specifically remove that user from group 17 and and them to 18. As well as update their displaygroup to 18.

PHP Code:

if ($complete)  
{
/*replace 45 with appropriate question hash*/
$userinfo=fetch_userinfo($qo[45]);
$user=$userinfo;
/*replace 18 with choosen usergroupid you want to add them to*/
$newmembergroupid '18';
$user['membergroupids']=explode(',',$user['membergroupids']);
foreach(
$user['membergroupids'] AS $mi => $mii)
{
/*replace 17 with usergroupid you want to remove them from*/
if ($mii=='17')
{
unset(
$user['membergroupids']['$mi']);
}
}
$display_usergroup $newmembergroupid;
$user['membergroupids']=implode(',',$user['membergroupids']);
$userdata =& datamanager_init('User'$vbulletinERRTYPE_STANDARD);
$userdata->set_existing($userinfo);
$userdata->set('membergroupids'$user['membergroupids']);
$userdata->set_usertitle($user['customtitle'] ? $user['usertitle'] : ''false$display_usergrouptruetrue); 
$userdata->save(); 


Sarcoth 02-11-2010 01:04 PM

Quote:

Originally Posted by bananalive (Post 1979933)
PHP Code:

if ($complete)  
{
/*replace 45 with appropriate question hash*/
$userinfo=fetch_userinfo($qo[45]);
$user=$userinfo;
/*replace 18 with choosen usergroupid you want to add them to*/
$newmembergroupid '18';
$user['membergroupids']=explode(',',$user['membergroupids']);
foreach(
$user['membergroupids'] AS $mi => $mii)
{
/*replace 17 with usergroupid you want to remove them from*/
if ($mii=='17')
{
unset(
$user['membergroupids']['$mi']);
}
}
$display_usergroup $newmembergroupid;
$user['membergroupids']=implode(',',$user['membergroupids']);
$userdata =& datamanager_init('User'$vbulletinERRTYPE_STANDARD);
$userdata->set_existing($userinfo);
$userdata->set('membergroupids'$user['membergroupids']);
$userdata->set_usertitle($user['customtitle'] ? $user['usertitle'] : ''false$display_usergrouptruetrue); 
$userdata->save(); 


Hey Banana, I appreciate your time and effort on this. Still not working though. I did add the missing } at the end, so that wasn't my issue. Did it work for you? I changed the 45 to 1 and nothing. The form gets submitted, but the user doesn't get removed or added to anything. On a side note, don't enter anything but a number into the question you choose for this code. I tried that and WOW. The magnitude of data returned was never ending.

bananalive 02-11-2010 01:29 PM

Quote:

Originally Posted by Sarcoth (Post 1979970)
Hey Banana, I appreciate your time and effort on this. Still not working though. I did add the missing } at the end, so that wasn't my issue. Did it work for you? I changed the 45 to 1 and nothing. The form gets submitted, but the user doesn't get removed or added to anything. On a side note, don't enter anything but a number into the question you choose for this code. I tried that and WOW. The magnitude of data returned was never ending.

Just tested this following code, it works:
PHP Code:

if ($complete)  
{
/*replace 45 with appropriate question hash*/
$userinfo=fetch_userinfo($qo[45]);
$user=$userinfo;
/*replace 18 with choosen usergroupid you want to add them to*/
$newmembergroupid '18';
$user['membergroupids']=explode(',',$user['membergroupids']);
foreach(
$user['membergroupids'] AS $mi => $mii)
{
/*replace 17 with usergroupid you want to remove them from*/
if ($mii==17)
{
unset(
$user['membergroupids'][$mi]);
}
}
$user['membergroupids'][]=$newmembergroupid;
$display_usergroup $newmembergroupid;
$user['membergroupids']=implode(',',$user['membergroupids']);
$userdata =& datamanager_init('User'$vbulletinERRTYPE_STANDARD);
$userdata->set_existing($userinfo);
$userdata->set('membergroupids'$user['membergroupids']);
$userdata->set_usertitle(
        
$userinfo['usertitle'],
        
true,
        
$vbulletin->usergroupcache["$newmembergroupid"],
        
false,
        
true
);
$userdata->save(); 



Sarcoth 02-11-2010 02:05 PM

Awesome stuff Banana, I love this mod. That definitely removes the selected userid from the selected usergroup and adds them to the other one. The display title still isn't changing. Did that part work for you?

Cadellin 02-11-2010 05:30 PM

Quote:

Originally Posted by bananalive (Post 1979923)
1 fixed in attached file
2 also implemented

That is amazing! Thanks bananalive!

One small glitch I've spotted is the time collumn in the table results is too narrow for it to fit (ends up on 7 lines). Apart from that super job!

ascott 02-12-2010 04:30 PM

Installed, thanks again :D

rfsforums 02-12-2010 11:50 PM

Installed - works great!

I would like to display a user profile field (field7) in the title. I tried {field7} but no such luck. Is it possible and if so do you have any suggestions?

Many Thanks!!!!

bananalive 02-13-2010 02:20 PM

1 Attachment(s)
Quote:

Originally Posted by rfsforums (Post 1981090)
Installed - works great!

I would like to display a user profile field (field7) in the title. I tried {field7} but no such luck. Is it possible and if so do you have any suggestions?

Many Thanks!!!!

Import attached file and use {bbuserinfo.field7}

bananalive 02-13-2010 02:26 PM

Quote:

Originally Posted by Sarcoth (Post 1980007)
Awesome stuff Banana, I love this mod. That definitely removes the selected userid from the selected usergroup and adds them to the other one. The display title still isn't changing. Did that part work for you?

Yes

The user submitting the form, may need permissions to change the display name.

Also, did the user have a custom display title that might have stopped it.

Martyh 02-13-2010 07:18 PM

What can I put in this field to send the user to the thread they just created ?

URL of webpage user is redirected to:

rfsforums 02-13-2010 11:44 PM

Quote:

Originally Posted by bananalive (Post 1981398)
Import attached file and use {bbuserinfo.field7}

Thanks so much for responding back so quickly! I've tried using {bbuserinfo.field7} but it's not working for me I also tried another profile field to see if it was because (field7) is setup to not display publicly (it's the users real name and is "hidden" in the setup) but the other profile field, which is public (not hidden), did not display either. I also imported the file overwritting the orig. My goal is to include their real name along with their user name in the form results.

Thanks again for a great mod!!!

ThorstenA 02-14-2010 11:05 AM

I want to use Easy Forms as a Review tool. There are some items (product a, product b, product c) where a user can choose one, rate it and write a review about it. However, therefore I need Easy Forms to only allow a user to write an entry once for each product. How can that be accomplished?

bananalive 02-14-2010 12:30 PM

Quote:

Originally Posted by ThorstenA (Post 1982028)
I want to use Easy Forms as a Review tool. There are some items (product a, product b, product c) where a user can choose one, rate it and write a review about it. However, therefore I need Easy Forms to only allow a user to write an entry once for each product. How can that be accomplished?

Create a form for each product, (create form for product a then use the 'copy form' function)

Then put the number of times a user can submit the form as 1

bananalive 02-14-2010 12:30 PM

Quote:

Originally Posted by rfsforums (Post 1981754)
Thanks so much for responding back so quickly! I've tried using {bbuserinfo.field7} but it's not working for me I also tried another profile field to see if it was because (field7) is setup to not display publicly (it's the users real name and is "hidden" in the setup) but the other profile field, which is public (not hidden), did not display either. I also imported the file overwritting the orig. My goal is to include their real name along with their user name in the form results.

Thanks again for a great mod!!!

Which field are using it in?

bananalive 02-14-2010 12:31 PM

Quote:

Originally Posted by Martyh (Post 1981569)
What can I put in this field to send the user to the thread they just created ?

URL of webpage user is redirected to:

How can I redirect to the thread created by the form?
  1. Edit Form
  2. Tick the checkbox 'Redirect user after form is submitted'
  3. URL of webpage user is redirected to:
    http://www.yoursite.com/showthread.php?p=$newpost[postid]#post$newpost[postid]

ThorstenA 02-14-2010 12:51 PM

Quote:

Originally Posted by bananalive (Post 1982079)
Create a form for each product, (create form for product a then use the 'copy form' function)

Then put the number of times a user can submit the form as 1

I have thousands of products, therefore I wanted to have one entry field set as a "click on of these thousands of products" field. How can I use Easy Forms so that a user can submit the form with one criterium ("product field") only? Thanks.

finalcut 02-14-2010 10:13 PM

@bananalive,

installed and convinced: this is a great addon! And I appreciate your work.

I managed nearly everything I wanted to do with it. Except one thing:
inserting the formdata into an existing or new database table

How can this be managed?

Many thanks!


All times are GMT. The time now is 05:56 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.03073 seconds
  • Memory Usage 1,950KB
  • 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
  • (7)bbcode_php_printable
  • (26)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