vb.org Archive

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

asabet 09-26-2012 02:07 PM

Is there any way to prevent users from submitting a form more than once per X hours? I am using it to allow people to submit listings in a classifieds forum.

Previously the members just created regular threads in that forum, and I used this mod to prevent them from posting more than one listing per 8 hours. However, that mod seems to have no effect when the threads are auto created by submitting a form.

This is the code used by my current max posts mod:

Code:

if ($foruminfo['forumid'])
{
$ugroupids = $vbulletin->userinfo['usergroupid'] . iif($vbulletin->userinfo['membergroupids'], "," .

$vbulletin->userinfo['membergroupids']);
        $fids = $forumid . iif($foruminfo['parentlist'], "," . $foruminfo['parentlist']);
        $result1 = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "forumpermission
        WHERE ( forumid IN($fids) AND usergroupid IN ($ugroupids)) AND
        (maxthread=0 AND perhour=0)");

        if (empty($result1))
        $result = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "forumpermission
        WHERE forumid IN($fids) AND usergroupid IN ($ugroupids)
        ORDER BY forumid DESC, maxthread DESC");

        if ($result)
          {       
        $maxtime = TIMENOW - ($result['perhour'] * 3600);
        $sql = $db->query_first("SELECT count(*) as totalthread FROM " . TABLE_PREFIX . "thread WHERE dateline >=

$maxtime
        AND forumid IN($fids)
        AND postuserid = " . $vbulletin->userinfo['userid'] . " ");
        if ($sql['totalthread'] >= $result['maxthread'])
        eval(standard_error(fetch_error('no_new_thread_permission', $result[maxthread], $result[perhour])));
        }
        }

I want to limit all users to a max of 1 form submission per 8 hours in forum # 17. Is there a modified version of the above code I could put in the Form Hook: Form Start: field to have it work?

bulbasnore 09-29-2012 06:13 PM

Installed.

Anyone have the help file cached? I've searched through the forum for it, and can't come up with an alternate location to download it (link is failed).

blind-eddie 10-09-2012 02:04 PM

I know this is old, but I have questions.
I am running 3.8.4.
I have an extra unused vbulletin lic & am throwing up an ibproarcade site for my son/extended family & their friends without really using forums exept for automaticaly sending game reports to new thread, with no posting allowed. Its in the beginning stages with default games only, I have thousands of games still to load & a many site edits to make to have it the way I want.


================================================== ======

Quote:

Originally Posted by subvertbeats (Post 1775680)
Do you know of (or can you add) a way to view the forms without forum header and footer? (ideally add an option with the definition of each form to use a given vB style)
Im trying to use the forms inside an iframe on page outside of the main forums, and this page already has its own separate header/footer,

Thanks!

Quote:

Originally Posted by bananalive (Post 1775813)
Find in Plugin: Easy Forms Part 1:
PHP Code:

    eval('$html = "' fetch_template('form_view') . '";');
    
$canviewformlist unserialize($vbulletin->options['canviewformlist']);
    if (!
$canviewformlist OR !is_member_of($vbulletin->userinfo$canviewformlist))
    {
        
$navbits construct_navbits(array(
            
'' => construct_phrase($vbphrase['view_form'], $form['title'])
        ));
    }
    else
    {
        
$navbits construct_navbits(array(
            
'misc.php?do=forms' $vbulletin->session->vars['sessionurl_q'] => construct_phrase($vbphrase['forms']),
            
'' => construct_phrase($vbphrase['view_form'], $form['title'])
        ));
    }
    eval(
'$navbar = "' fetch_template('navbar') . '";');
    eval(
'print_output("' fetch_template('shell_blank') . '");'); 

Replace:
PHP Code:

    eval('print_output("' fetch_template('form_view') . '");'); 


Exactly what I needed, Thank you.
I have the report game form showing in a popup with your edits above, but I loose all site colors.
What would I need to do too get the site colors to show on form popup?

Note: Site colors are lost on all forms even normal forms not in a popup.

================================================== ============

Quote:

Originally Posted by subvertbeats (Post 1776275)
thanks bananalive!

Any idea how to achieve this per form (some forms are specifically for a site outside of the forums and other are for the forums themselves)

PS: currently using a conditional in the header, footer and navbar templates to remove them globally for misc.php.

Quote:

Originally Posted by bananalive (Post 1776677)
Find in Plugin: Easy Forms Part 1:

PHP Code:

        eval('$html = "' fetch_template('form_view') . '";');
        
$canviewformlist unserialize($vbulletin->options['canviewformlist']);
        if (!
$canviewformlist OR !is_member_of($vbulletin->userinfo$canviewformlist))
        {
            
$navbits construct_navbits(array(
                
'' => construct_phrase($vbphrase['view_form'], $form['title'])
            ));
        }
        else
        {
            
$navbits construct_navbits(array(
                
'misc.php?do=forms' $vbulletin->session->vars['sessionurl_q'] => construct_phrase($vbphrase['forms']),
                
'' => construct_phrase($vbphrase['view_form'], $form['title'])
            ));
        }
        eval(
'$navbar = "' fetch_template('navbar') . '";');
        eval(
'print_output("' fetch_template('shell_blank') . '");'); 

Replace:

PHP Code:

if (!$noheader)
{
        eval(
'$html = "' fetch_template('form_view') . '";');
        
$canviewformlist unserialize($vbulletin->options['canviewformlist']);
        if (!
$canviewformlist OR !is_member_of($vbulletin->userinfo$canviewformlist))
        {
            
$navbits construct_navbits(array(
                
'' => construct_phrase($vbphrase['view_form'], $form['title'])
            ));
        }
        else
        {
            
$navbits construct_navbits(array(
                
'misc.php?do=forms' $vbulletin->session->vars['sessionurl_q'] => construct_phrase($vbphrase['forms']),
                
'' => construct_phrase($vbphrase['view_form'], $form['title'])
            ));
        }
        eval(
'$navbar = "' fetch_template('navbar') . '";');
        eval(
'print_output("' fetch_template('shell_blank') . '");');
}
else
{
        eval(
'print_output("' fetch_template('form_view') . '");'); 


Form Hook: Form Start:
PHP Code:

$noheader true


How does this work on a per form basis?

Thank you

jorge_kai 11-08-2012 04:38 PM

best mod ever!

TheKdd 11-13-2012 05:30 PM

Does anyone know if there is a way to make this sit on the "Thank you for filling out the form" page longer before redirect? It goes so fast that people can't read what I wrote. I could turn redirect off, but then it just has a button that takes them back to the form.

Or... could I change the address of the button so when they click it, it takes them elsewhere?

brad heffernan 01-09-2013 06:11 AM

If people are having problems installing this open the product-easyforms v3.6.xml

search for
PHP Code:

TYPEMYISAM 

replace with
PHP Code:

ENGINEMYISAM 

The keyword TYPE is removed since MySQL 5.1, use ENGINE

I did not read through all 109 pages as i dont have that amount of spare time on my hands so, Im sorry if this is already posted. Just like to help.

hpidriver 02-15-2013 09:49 PM

Quote:

Originally Posted by bananalive

Is there any way to dynamically set the Forum ID where thread is posted?

NomNomNom 02-17-2013 10:21 PM

Hi,

I'm sure this is possible, but I'm having trouble with it. Can EasyForm be setup so that a user can see the results of their submissions, but not see anybody elses responses? I permissioned it as I thoght appropriate, and the use gets a 'view your results' link, but when clicked, they get a 'do not have permission' page. The other way I configured it allowed them to view *all* results. Is it possible to do this for just their results?

Many thanks, and good work on a great plugin.

Hamma 02-28-2013 04:24 PM

Does this allow attachments yet?

Simon Lloyd 03-01-2013 01:19 PM

Yet? it does already allow them :)


All times are GMT. The time now is 10:22 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.02849 seconds
  • Memory Usage 1,798KB
  • 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
  • (1)bbcode_code_printable
  • (7)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)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