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-17-2011 12:49 PM

1 Attachment(s)
Quote:

Originally Posted by Leo777 (Post 2163136)
Installed, working perfect, Thanks for a great and complex mod.

I have one question :

Is it possible to display a form within a post/thread? Or can forms only be displayed only on their own misc.php URL? It would be great if I could add a form at the bottom of a post but I can't find any option or documentation if this is possible...

Thanks.

  1. Import attached product file
  2. Create Custom BB Code in AdminCP
    • Title:
      Code:

      Form BB Code
    • BB Code Tag Name:
      Code:

      form
    • Replacement:
      HTML Code:

      <div style="clear: both;">
      <iframe src="misc.php?do=form&amp;fid={param}&amp;embed=1" style="width: 100%; height: 500px;">
      <p>Your browser does not support iframes.</p>
      </iframe>
      </div>

    • Example:
      Code:

      [form]1[/form]
    • Use Option:
      Code:

      No
    • Remove Tag If Empty
      Code:

      Yes
    • Disable BB Code Within This BB Code
      Code:

      Yes
    • Disable Smilies Within This BB Code
      Code:

      Yes
    • Disable Word Wrapping Within This BB Code
      Code:

      Yes
    • Disable Automatic Link Parsing Within This BB Code
      Code:

      YES
  3. Use [form]1[/form] in posts

The other suggestion I can offer, I'm not sure if it will be helpful, but you can re-direct reply button to the desired form

How can I Re-direct/ force users to submit form when they click reply?
  1. Create plugin 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' ) ; 


  2. Change 1,2,3 for appropriate threadids.

bananalive 02-17-2011 01:37 PM

Quote:

Originally Posted by LoudBox (Post 2163306)
Great plugin, works very well, good job. I'm impressed.

Quick question. I've set the form to output to a thread. What I'd like is that when this thread is created by easyform, his signature is a link to that thread.

So user john submits form => thread is created yourforum.com/forum/john-thread/
Now user john has as signature a link to that thread

What's the best way to go about this?

Thanks!

  • Title
    Code:

    Change Signature to Thread Link
  • Hook
    Code:

    easy_forms_post_after_actions
  • PHP Code - change 43 to appropriate form id
    PHP Code:

    if ($fid == 43)
    {
      if (
    $complete)
      {
        
    $userinfo $vbulletin->userinfo;
        
    $threadinfo fetch_threadinfo($threadid);
        
    $usersig "[url]".$vbulletin->options['bburl']."/".fetch_seo_url('thread'$threadinfo)."[/url]";

        
    $userdata =& datamanager_init('User'$vbulletinERRTYPE_STANDARD);
        
    $userdata->set_existing($userinfo);
        
    $userdata->set('signature'$usersig);

        
    $userdata->save();
      }  


  • Active
    Code:

    Yes

moswell 02-17-2011 02:12 PM

Okay, maybe this won't do what I want it to do, but could someone provide some advice?

I'd like the form to actually be the poll: that is, what I'm really looking for is the opportunity for a user to make a multiple-question poll within a thread. I've installed the mod and played a bit with it myself, but from what I can tell, I make the form, people need to go to the url for that form, and then the results are getting posted to the thread (or wherever).

What I'd like is for someone to be able to make a form, have the form posted to a thread, and people answer the form questions. Then the form(poll) results are displayed at the top of the thread, but not posted to the thread itself.

Does this make sense, and is it possible? Thanks!

Edit: found the option for not posting to thread.

moswell 02-17-2011 04:01 PM

Okay, I've read through pretty much the whole thread and it looks like this isn't an option. I'm relatively new to vbulletin - but I can already see that the multiple-question poll is an issue.

So, two different questions:

1. Can I edit the form creation page to make it easier for users? That is, can I set the default options (like don't post to thread, etc.) for a form template? Do I need to go to the misc.php directly and edit that page?
2. Can the form results poll view be altered? I'd very much like the column that says "x users answered this question" to give a list of the users who voted as the form results table does (and like a regular poll would).

Thanks - it's a fascinating mod.

Leo777 02-17-2011 04:05 PM

Quote:

Originally Posted by bananalive (Post 2163568)
Use [form]1[/form] in posts

First I received an email notification from this forum, informing me of your reply to my post - in the email it has your original reply where you said unfortunately it's not possible to add a form within a thread. So I came to the forum to say 'Thanks Anyway', but now I see that you edited your reply and have now given full instructions for actually doing exactly what I asked... That's amazing, you are very generous. Now I must send a donation :D

Thanks so much,
Leo

LoudBox 02-17-2011 05:37 PM

Quote:

Originally Posted by bananalive (Post 2163584)
  • Title
    Code:

    Change Signature to Thread Link
  • Hook
    Code:

    easy_forms_post_after_actions
  • PHP Code - change 43 to appropriate form id
    PHP Code:

    if ($fid == 43)
    {
      if (
    $complete)
      {
        
    $userinfo $vbulletin->userinfo;
        
    $threadinfo fetch_threadinfo($threadid);
        
    $usersig "[url]".$vbulletin->options['bburl']."/".fetch_seo_url('thread'$threadinfo)."[/url]";

        
    $userdata =& datamanager_init('User'$vbulletinERRTYPE_STANDARD);
        
    $userdata->set_existing($userinfo);
        
    $userdata->set('signature'$usersig);

        
    $userdata->save();
      }  


  • Active
    Code:

    Yes

This is awesome, works great, thanks a lot.

I have 2 other questions:

1) How can I pull data from the form and put it inside the signature? For example, let's say I ask what his favorite icecream is and he answers vanilla => how do I put "vanilla" in his signature right under the link to the thread that was just created?

2) How do I force users from a certain usergroup to fill in the form before they can proceed? I'm using Force Threads but it doesn't work with a form because forced threads uses thread ids. Tried htaccess redirect but that's an endless loop. How would you got about forcing a usergroup to fill in the form before proceeding?

Thanks!

customcolor 02-18-2011 08:16 PM

Quote:

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

{
$form['forumid'] = ($qo['31']);


to
PHP Code:

$form['threadid'] = $qo['31']; 


thanks ....works great!!!

customcolor 02-19-2011 03:33 AM

Quote:

Originally Posted by customcolor (Post 2164073)
thanks ....works great!!!

well except for one little thing....when it posts it shows the post to the question as numbers of what thread it is in the post. is there a way to not make it post the answer to that question in the post?

DevinM 02-19-2011 02:13 PM

Am I simply missing it somewhere......how can I simply set a form to allow a user to attach file and when it hits submit email it to me.

Key:
1. Single Line Text Field
2. Yes/No Question
3. Radio Buttons
4. Checkboxes
5. Dropdown Select
6. Multi-Line Text Field
8. Field using vBulletin Editor
10. Custom
11. Date
12. Address
13. Scale
14. Grid

Probably a silly question but I truly dont see anything that says attach file.

Volcom13 02-19-2011 11:21 PM

I uploaded the product. But right as I try to import the XML it says Invalid File Selected.


All times are GMT. The time now is 12:05 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.02717 seconds
  • Memory Usage 1,783KB
  • 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
  • (15)bbcode_code_printable
  • (1)bbcode_html_printable
  • (5)bbcode_php_printable
  • (6)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