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 06-21-2010 01:46 PM

Quote:

Originally Posted by Alisa Lindsay (Post 2056053)
Hello everyone.

I use Easy Forms at both my sites and if I neglected to say it before, let me say now, what a wonderful mod!

Was wondering, however, is there a way to require the answer to one of the questions be an image?

Thanks and Warmest Regards,

Alisa

Form Hook: Before Submit:
PHP Code:

if (empty($postattach))
{
    
$currentattaches $db->query_read("
    SELECT dateline, filename, attachmentid
    FROM " 
TABLE_PREFIX "attachment
    WHERE posthash = '" 
$db->escape_string($posthash) . "'
    AND userid = " 
$vbulletin->userinfo['userid']
    );

    while (
$attach $db->fetch_array($currentattaches))
    {
        
$postattach["$attach[attachmentid]"] = $attach;
        
$attachcount++;
        
$formoutput str_replace('[attach]'.$attachcount.'[/attach]','[attach]'.$attach['attachmentid'].'[/attach]',$formoutput);
    }


Then use this in Custom Form Output:

Code:

[attach]1[/attach]

Ocean-Wonders 06-21-2010 04:21 PM

Love the mod but im getting database errors about my max_packet_size. It doesn't happen all the time but it's quite frequent.

Xencored 06-21-2010 06:21 PM

Quote:

Originally Posted by bananalive (Post 2056918)
Form Hook: Before Submit:
PHP Code:

if (empty($postattach))
{
    
$currentattaches $db->query_read("
    SELECT dateline, filename, attachmentid
    FROM " 
TABLE_PREFIX "attachment
    WHERE posthash = '" 
$db->escape_string($posthash) . "'
    AND userid = " 
$vbulletin->userinfo['userid']
    );

    while (
$attach $db->fetch_array($currentattaches))
    {
        
$postattach["$attach[attachmentid]"] = $attach;
        
$attachcount++;
        
$formoutput str_replace('[attach]'.$attachcount.'[/attach]','[attach]'.$attach['attachmentid'].'[/attach]',$formoutput);
    }


Then use this in Custom Form Output:

Code:

[attach]1[/attach]

Thank you so muchy <3

bananalive 06-21-2010 08:31 PM

Quote:

Originally Posted by Ocean-Wonders (Post 2056998)
Love the mod but im getting database errors about my max_packet_size. It doesn't happen all the time but it's quite frequent.

The only thing I can suggest is to increase your server's max_packet_size. (Or ask your host to do it.)

Mimirswell 06-21-2010 10:08 PM

Quote:

Originally Posted by bananalive (Post 2056010)
Check that the question hash of the forumid question is 737

It was but just to make sure, I recreated the question and updated to the new question hash and it still failed. I double checked the forumid as well.

I'm also having a problem where when a user hits preview, it automatically fills in all dropdown select boxes with the first selection.

Dragonsys 06-22-2010 03:41 AM

Quote:

Originally Posted by Mimirswell (Post 2057144)
I'm also having a problem where when a user hits preview, it automatically fills in all dropdown select boxes with the first selection.

yeah, it does this on my site as well.

StagKill 06-22-2010 01:40 PM

I was wondering if it is possible that, that the form which is produced can be automatically posted as a thread in a certain category?

Like introduction, applications?

Dragonsys 06-22-2010 03:14 PM

Quote:

Originally Posted by StagKill (Post 2057456)
I was wondering if it is possible that, that the form which is produced can be automatically posted as a thread in a certain category?

Like introduction, applications?

you can have the form results be added as a thread (or a reply) in which ever forum/thread you want.
That is one of the options when you create/edit the form

StagKill 06-23-2010 04:10 AM

Quote:

Originally Posted by Dragonsys (Post 2057510)
you can have the form results be added as a thread (or a reply) in which ever forum/thread you want.
That is one of the options when you create/edit the form

Thanks,

Sorry I didnt use the application and posted, I got it working the way I wanted :).

One more thing if possible in vB 4.0, when we click new thread in a particular category say introductions it should redirect to a form is that possible?
Also, when we click new post in a particular thread, lets say "All reports here", it should redirect to another form. Is that possible?

leia 06-25-2010 02:03 PM

Very awesome mod. :) Nominated!

One question that is probably very easy. I skimmed the thread but didn't see an answer.

In the custom output, what would I need to write to have certain content only appear if an optional field is completed?

i.e. User ticks boxes indicating damages on item. I want it to display: "Seller reports the following damages: (answer output)." If they don't tick any boxes, I don't want any part of the sentence. (I'm also using it for linked images, so I don't want the IMG tags to appear if they haven't pasted a URL in one of the optional fields).

Thank you again for the mod. :)


All times are GMT. The time now is 12:47 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.02080 seconds
  • Memory Usage 1,763KB
  • 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
  • (2)bbcode_code_printable
  • (2)bbcode_php_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (5)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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