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-11-2011 12:16 PM

Quote:

Originally Posted by VanHuek (Post 2182909)
I am wondering are you able to integrate this into a thread?

There are 3 possible ways I can think of...

1. You can link to a form.
HTML Code:

http://www.your-site.com/forum/misc.php?do=form&fid=1
2. You can add the form at the top of your thread, with a vBulletin plugin.
Create plugin with hook showthread_complete
PHP Code:

if ($threadid == 112)
{
  
$poll .= '<iframe src="misc.php?do=form&fid=1&embed=1" style="width: 100%; height: 400px; margin: 10px;"></iframe>';


Change 112 for appropriate threadid.
3. You could redirect 'New Replies' to the form.
Create plugin with hook newreply_form_complete
PHP Code:

if (in_array($threadinfo[threadid], array(1,2,3)))

  
header'Location: http://www.your-site.com/forum/misc.php?do=form&fid=1' ) ; 


Change 1,2,3 for appropriate threadids.

bananalive 04-11-2011 12:52 PM

1 Attachment(s)
Quote:

Originally Posted by wolfey (Post 2183336)
Excellent..Thank you

1 last thing for the grid questions...how do I make it not output the Grid Row entry for one that isnt selected

1. Import attached product file

2. Create plugin with hook easy_forms_post_form_start and php code:
PHP Code:

$hide_empty_grid true


bestword 04-11-2011 04:29 PM

It's more better if it could support Unicode.

clubvr4 04-12-2011 11:55 AM

Hello great hack!

Is it possible to make attachments mandatory?

Za4a Tuner 04-12-2011 01:27 PM

Hello,
i have two question to this mod:

1.)
How can i link the "new thread"-button of a forum to a form?
In a forum with the ID = 46 the "new thread" should be replaced by a form with the ID = 4
If someone like to create a new thread, he should use the form nr. 4, wich "Post a new Thread" in the forum.

2.)
The forum above MUST have a prefix, but not always the same prefix => users should be able to use a prefix that fits to the form.
I created a custom question with the following php-code inside:
PHP Code:

require_once(DIR '/includes/functions_prefix.php'); 
$thisanswer $q[$formbit[id]]; 
if (!
$form['forumid'])
{
$form['forumid'] = 46;
}
$prefix_options fetch_prefix_html($form['forumid'], $thisanswertrue); 
$answer '<select name="' $formbit[id] . '" id="q_' $formbit[id] . '" class="bginput">'
$answer .= '<option value="">'.$vbphrase[no_prefix_meta].'</option>'
$answer .= $prefix_options
$answer .= '</select>'

The question will be shown on the form, but there are no prefixes displayed! How can i get it running?



Can anyone give me a help please?

kr Chris

Dozer826 04-14-2011 06:59 AM

One of the best mods I have on our forum, I love how much you can customize everything.

Works perfect for people creating applications to join our gaming community

Thanks!

Welshy2008 04-14-2011 07:14 AM

I am running vB4.0.7 currently and all forms have been taken from my 3.8.6 version.

I have just tried to add a new "e-mail to me" form, but I have several issues.

1. I have a prefilled username question (which doesn't align in the centre, like the others, but instead shows on the left under the question).

2. I enter an E-mail title and it doesn't save -I get diverted to http://www.myforum.com/#main-forums

3. The same thing happens when I select the tickbox for E-mail Form. (as number 2 above). Previously there was a box that appeared where I would enter the e-mail address that I want the form enailed to, this no longer shows.

4. Form Submit Limit Per User: doesn't save either

5. After Form is Submitted - Form submitted Message doesn't save.

Please can you help me with the above (or anyone else)? I desperately need your help in this, as I need to add these as soon as please.


I also have search engine friendly URLs and vBSEO installed.

Many Thanks.

zushiba 04-14-2011 04:26 PM

What would be the easiest way to go about putting a character limit on text and textarea fields?

Za4a Tuner 04-15-2011 01:05 PM

The limit ist set in the templates by the variable "maxlength=..."

kether1 04-15-2011 02:43 PM

Dom,

Is there a way to group all of a member's threads created when submitting via this forms modification?

For example:

Lets say a form can be submitted multiple times by a member.

When visiting the forum section where the form is published, is it possible to have all of 'Member A's' threads grouped together (like a sub-forum) and all of Member B's responses grouped together?

Like this:
FORUM where form creates a new thread.

Member A
----first submitted response,
----second submitted response,
----Third...

Member B
----First submitted response,

Member C
----first submitted response,
----second submitted response,
SO, when a member clicks on this forum, they see a list of sections titled with the username. And if they click that name, they see all of the threads that person created by submitting the form.

I hope I explained this where it can be understood. :)

Thanks!
Kether

SpaceStar 04-16-2011 12:14 AM

Superb. Working.

Just a simple question, maybe it's asked and answered before...

When a user has submitted the form, is there a way of validating the answered and show the result to user?

Thamks

bananalive 04-16-2011 09:08 AM

Quote:

Originally Posted by clubvr4 (Post 2183787)
Hello great hack!

Is it possible to make attachments mandatory?

Edit Form -> Form Hooks -> Form Hook: Before Submit:
PHP Code:

$currentattaches $db->query_first("SELECT COUNT(*) AS countrows FROM " TABLE_PREFIX "attachment WHERE posthash = '" $db->escape_string($posthash) . "' AND userid = " $vbulletin->userinfo['userid'] );
$attachcount $currentattaches['countrows'];
if (!
$attachcount)
{
$complete false;
$customerror .= '<div class="blockrow"><div>Error, No attachments!</div></div>';



bananalive 04-16-2011 09:15 AM

Quote:

Originally Posted by Za4a Tuner (Post 2183815)
Hello,
i have two question to this mod:

1.)
How can i link the "new thread"-button of a forum to a form?
In a forum with the ID = 46 the "new thread" should be replaced by a form with the ID = 4
If someone like to create a new thread, he should use the form nr. 4, wich "Post a new Thread" in the forum.

2.)
The forum above MUST have a prefix, but not always the same prefix => users should be able to use a prefix that fits to the form.
I created a custom question with the following php-code inside:
PHP Code:

require_once(DIR '/includes/functions_prefix.php'); 
$thisanswer $q[$formbit[id]]; 
if (!
$form['forumid'])
{
$form['forumid'] = 46;
}
$prefix_options fetch_prefix_html($form['forumid'], $thisanswertrue); 
$answer '<select name="' $formbit[id] . '" id="q_' $formbit[id] . '" class="bginput">'
$answer .= '<option value="">'.$vbphrase[no_prefix_meta].'</option>'
$answer .= $prefix_options
$answer .= '</select>'

The question will be shown on the form, but there are no prefixes displayed! How can i get it running?



Can anyone give me a help please?

kr Chris

1. Vbulletin AdminCP -> New Plugin
Hook location: newthread_form_start
Php code:
PHP Code:

if (in_array($forumid, array(1,2))) 

header'Location: http://www.youriste.com/forums/misc.php?do=form&fid=8' ) ; 


2. Add the following to the custom php question, do you get the right forumid (46) at the top of the form?
PHP Code:

print_r($form['forumid']); 


bananalive 04-16-2011 09:16 AM

Quote:

Originally Posted by Welshy2008 (Post 2184478)
I am running vB4.0.7 currently and all forms have been taken from my 3.8.6 version.

I have just tried to add a new "e-mail to me" form, but I have several issues.

1. I have a prefilled username question (which doesn't align in the centre, like the others, but instead shows on the left under the question).

2. I enter an E-mail title and it doesn't save -I get diverted to http://www.myforum.com/#main-forums

3. The same thing happens when I select the tickbox for E-mail Form. (as number 2 above). Previously there was a box that appeared where I would enter the e-mail address that I want the form enailed to, this no longer shows.

4. Form Submit Limit Per User: doesn't save either

5. After Form is Submitted - Form submitted Message doesn't save.

Please can you help me with the above (or anyone else)? I desperately need your help in this, as I need to add these as soon as please.


I also have search engine friendly URLs and vBSEO installed.

Many Thanks.

It may be caused by vbseo, can you disable it on page misc.php and see if that has an effect?

bananalive 04-16-2011 09:17 AM

Quote:

Originally Posted by zushiba (Post 2184644)
What would be the easiest way to go about putting a character limit on text and textarea fields?

Edit Question, set maxlength

bananalive 04-16-2011 09:19 AM

Quote:

Originally Posted by kether1 (Post 2184950)
Dom,

Is there a way to group all of a member's threads created when submitting via this forms modification?

For example:

Lets say a form can be submitted multiple times by a member.

When visiting the forum section where the form is published, is it possible to have all of 'Member A's' threads grouped together (like a sub-forum) and all of Member B's responses grouped together?

Like this:
FORUM where form creates a new thread.

Member A
----first submitted response,
----second submitted response,
----Third...

Member B
----First submitted response,

Member C
----first submitted response,
----second submitted response,
SO, when a member clicks on this forum, they see a list of sections titled with the username. And if they click that name, they see all of the threads that person created by submitting the form.

I hope I explained this where it can be understood. :)

Thanks!
Kether

You will need a separate modification for this which alters thread list.

bananalive 04-16-2011 09:20 AM

Quote:

Originally Posted by SpaceStar (Post 2185110)
Superb. Working.

Just a simple question, maybe it's asked and answered before...

When a user has submitted the form, is there a way of validating the answered and show the result to user?

Thamks

By using quiz mode, php hooks or <vb:if condition=""> in custom output.

Za4a Tuner 04-16-2011 01:24 PM

Quote:

Originally Posted by bananalive (Post 2185204)
1. Vbulletin AdminCP -> New Plugin
Hook location: newthread_form_start
Php code:
PHP Code:

if (in_array($forumid, array(1,2))) 

header'Location: http://www.youriste.com/forums/misc.php?do=form&fid=8' ) ; 



This works fine, now the button "New Thread" roots to the form :D

but:
Quote:

Originally Posted by bananalive (Post 2185204)
2. Add the following to the custom php question, do you get the right forumid (46) at the top of the form?
PHP Code:

print_r($form['forumid']); 


This won't work :(
The forum-id is correct (it's from my liveforum)
Can you give me a "step by step" instruction, what i have to do, that a dropdown-field with the prefixes of a specified forum will be shown?

The form should create a new thread in forum-id = 46, and the prefixes of this forum sould be listed in the form, cause they are required for a new thread!


kr Chris

ascroft 04-16-2011 09:29 PM

Hi there.

One thing I noted today, when the thread is moved to the correct forum, is that it doesn't update the 'header' type of information in the forum summary i.e. last post details, no. of threads/posts. The thread itself is there fine. Example is: http://www.shackchat.co.nz/listings/...lington-Region

I am thinking this needs more code to be added to the plugin in possibly?

Many thanks

Mark



Quote:

Originally Posted by bananalive (Post 2182257)
Try this...

AdminCP -> Plugins & Products -> Add New Plugin

Hook Location
Code:

newthread_post_complete
Title
Code:

Move Thread created by easy forms
PHP Code
PHP Code:

if ($fid == 43)
{
$forumid $q['forumid'];
$dataman =& datamanager_init('Thread'$vbulletinERRTYPE_ARRAY'threadpost'); 
$dataman->set_existing($threadinfo);  
$dataman->setr('forumid'$forumid);  
$dataman->pre_save(); 
if (
count($dataman->errors) > 0

    foreach (
$errors as $error)
    {
        
$errorss .= $error"<br />";
    }
    
$errormessage "Form failed to submit. The following error(s) occured: <br /> ".$errorss;
    eval(
standard_error($errormessage));

else 

$dataman->save();  
$foruminfo fetch_foruminfo($forumid);
$threadinfo fetch_threadinfo($newpost['threadid']);
mark_thread_read($threadinfo$foruminfo$vbulletin->userinfo['userid'], TIMENOW);    
}


Plugin is active
Code:

Yes

Change 43 to appropriate form id.


Darksome 04-18-2011 03:19 PM

New to vB but slowly picking things up. I think I will find this mod extremely useful, but I'd like to know how I can add an 'insert image' button to the vbeditor question section, next to the email and insert link buttons for example.

Or indeed, can it be replaced with all the interface options as if posting a new thread such as; post icons and the tag box?

Cheers

Cadellin 04-21-2011 07:22 AM

Firstly once again this is a fantastic mod! However I'm having some problems using this in conjunction with the GlowHost Anti-Spam when outputting a form to a thread as the anti-spam auto-moderates it as it contains URLs and the submitting users are normally new members to my site.

The easiest way around this would be have created threads all assigned to a single user rather than the user who submitted it or Unregistered. Is that possible though?

Thanks for any help :)

ascroft 04-22-2011 05:30 AM

Dom, just noted that when I manually moved a thread just now it does update the post count etc. and correctly show the most recent post in the preview - even though it was an earlier post that I moved - so hopeful there is an easy bit of code to add to make this happen as part of the plugin - thanks.

Mark

Quote:

Originally Posted by ascroft (Post 2185433)
Hi there.

One thing I noted today, when the thread is moved to the correct forum, is that it doesn't update the 'header' type of information in the forum summary i.e. last post details, no. of threads/posts. The thread itself is there fine. Example is: http://www.shackchat.co.nz/listings/...lington-Region

I am thinking this needs more code to be added to the plugin in possibly?

Many thanks

Mark


Bruno Pisarek 04-22-2011 06:43 AM

Hi,

your mod works like a charme in vb 4.1.3 - thanks! But.. ;)

The function ?Question Typest to Hide in Form Results Poll? is very useful for me. But I miss a function like ?Question Typest to Hide in Form Results Table?! Can you tell me, if it would be possible?

The view is not very clearly arranged if a user writes to many text in the "Field using vBulletin Editor".

Is it possible to hide a field in the table view?

Best regards,
Bruno

bananalive 04-22-2011 12:59 PM

1 Attachment(s)
Quote:

Originally Posted by Bruno Pisarek (Post 2187306)
Hi,

your mod works like a charme in vb 4.1.3 - thanks! But.. ;)

The function ?Question Typest to Hide in Form Results Poll? is very useful for me. But I miss a function like ?Question Typest to Hide in Form Results Table?! Can you tell me, if it would be possible?

The view is not very clearly arranged if a user writes to many text in the "Field using vBulletin Editor".

Is it possible to hide a field in the table view?

Best regards,
Bruno

Added it as an option in attached file in Vbulletin Options -> Easy Form Options

bananalive 04-22-2011 01:01 PM

Quote:

Originally Posted by ascroft (Post 2187292)
Dom, just noted that when I manually moved a thread just now it does update the post count etc. and correctly show the most recent post in the preview - even though it was an earlier post that I moved - so hopeful there is an easy bit of code to add to make this happen as part of the plugin - thanks.

Mark

In plugin, find
PHP Code:

mark_thread_read($threadinfo$foruminfo$vbulletin->userinfo['userid'], TIMENOW); 

Add below
PHP Code:

build_thread_counters($newpost['threadid']);
        
build_forum_counters($forumid); 


bananalive 04-22-2011 01:04 PM

Quote:

Originally Posted by Cadellin (Post 2186924)
Firstly once again this is a fantastic mod! However I'm having some problems using this in conjunction with the GlowHost Anti-Spam when outputting a form to a thread as the anti-spam auto-moderates it as it contains URLs and the submitting users are normally new members to my site.

The easiest way around this would be have created threads all assigned to a single user rather than the user who submitted it or Unregistered. Is that possible though?

Thanks for any help :)

Edit Form -> Form Hook: Before Submit:
PHP Code:

$vbulletin->userinfo['userid'] = 3

Change 3 to the appropriate userid. (0 for unregistered)

bananalive 04-22-2011 01:05 PM

Quote:

Originally Posted by Darksome (Post 2185998)
New to vB but slowly picking things up. I think I will find this mod extremely useful, but I'd like to know how I can add an 'insert image' button to the vbeditor question section, next to the email and insert link buttons for example.

Or indeed, can it be replaced with all the interface options as if posting a new thread such as; post icons and the tag box?

Cheers

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

bananalive 04-22-2011 01:07 PM

Quote:

Originally Posted by Za4a Tuner (Post 2185267)
This won't work :(
The forum-id is correct (it's from my liveforum)
Can you give me a "step by step" instruction, what i have to do, that a dropdown-field with the prefixes of a specified forum will be shown?

The form should create a new thread in forum-id = 46, and the prefixes of this forum sould be listed in the form, cause they are required for a new thread!


kr Chris

Try this php code instead:

PHP Code:

require_once(DIR '/includes/functions_prefix.php');  
$thisanswer $q[$formbit[id]];  
$forumid $form['forumid'] = 46
$prefix_options fetch_prefix_html($form['forumid'], $thisanswertrue);  
$answer '<select name="' $formbit[id] . '" id="q_' $formbit[id] . '" class="bginput">'
$answer .= '<option value="">'.$vbphrase[no_prefix_meta].'</option>';  
$answer .= $prefix_options;  
$answer .= '</select>'


Darksome 04-22-2011 03:15 PM

Quote:

Originally Posted by bananalive (Post 2187391)
AdminCP -> vBulletin Options -> BB Code Settings -> Allow [IMG] Code in Non Forum Specific Areas -> Yes

Thanks so much! This is such a wonderfully good mod! :up:

zushiba 04-22-2011 03:38 PM

I found a small bug when using bbocde in a section title. We needed to make the Section titles bigger to stand out more and this is the result.
http://i.imgur.com/6pMtz.jpg

It doesn't appear to affect the functionality.

bananalive 04-22-2011 05:08 PM

Quote:

Originally Posted by zushiba (Post 2187456)
I found a small bug when using bbocde in a section title. We needed to make the Section titles bigger to stand out more and this is the result.
http://i.imgur.com/6pMtz.jpg

It doesn't appear to affect the functionality.

Fixed in attached file, or use

HTML Code:

[size=3]
rather than
HTML Code:

[size="3"]

Bruno Pisarek 04-22-2011 05:30 PM

Quote:

Originally Posted by bananalive (Post 2187388)
Added it as an option in attached file in Vbulletin Options -> Easy Form Options

You are awesome - happy easter!

Best regards,
Bruno

ascroft 04-22-2011 07:01 PM

Great stuff - many thanks. :)

Quote:

Originally Posted by bananalive (Post 2187389)
In plugin, find
PHP Code:

mark_thread_read($threadinfo$foruminfo$vbulletin->userinfo['userid'], TIMENOW); 

Add below
PHP Code:

build_thread_counters($newpost['threadid']);
        
build_forum_counters($forumid); 



ascroft 04-22-2011 07:06 PM

Hi

Just wondering how viable it would be to have Easy Forms run with this style?

How VB have implemented this looks rather different from their other templates.....

Guess I will also ask the iphone/android apps possibility?

Cheers

Mark

vidmarc 04-26-2011 09:56 AM

Can this mod in any way be used to add product pages with custom fields to the vB4 CMS?

crowshead 04-27-2011 02:54 AM

i am having the form submitted to a forum that is moderated. but when the form gets submitted, the new thread shows up??

how can i have it go into the forum, but be moderated?

basically the form is ignoring forum rules - forum is setup to moderate all threads and posts, but form results get posted as new threads without being moderated.

bestword 04-27-2011 06:47 AM

When i Export forms as EXCEL,the data in EXCEL will error, i think it's because the unicode text data had be error export. would it to be repaired? Thanks.

Mimirswell 04-27-2011 02:25 PM

I have two separate forms where the first form redirects to the second. The first form creates a new thread and I want the second form to add a post to that thread when completed, how do I obtain the previous threadid (if possible)?

macroforum 04-28-2011 07:53 AM

1 Attachment(s)
Thanks for this beautiful mod!
Installed and nominated :)
I have only one problem, see attached pic please: the form results poll layout have some problems.
Thanks for help me
Antonio

iMaverick 04-28-2011 11:40 PM

Hey, really cool mod!

I have some questions though (I'm sure it's because I'm just incredibly stupid about all this).
  1. What would I do to change the "Form" in the Navbar?
  2. If I have a template edit I need to do for my Shoutbox to show up, where would I add these so in all these places my users could still be in the CBox (I've been just putting it below
    Code:

    {vb:raw navbar}:
    but I haven't found that in any of the easyform templates....what am I missing?


All times are GMT. The time now is 04:18 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.03545 seconds
  • Memory Usage 1,923KB
  • 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
  • (3)bbcode_html_printable
  • (17)bbcode_php_printable
  • (21)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