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)

ThorstenA 05-13-2010 09:58 PM

Some suggestions for coding:
  • Put code that is used throughout all actions (do=whatever) on top of each plugin. Example:
    Code:

    $fid = $vbulletin->input->clean_gpc('p', 'fid', TYPE_UINT);
    or, have each action its own plugin
  • I'd love to have the program creating a database table for each form. That would be very great. You then can make a review type out of it just with adding a database key so that there can only be one entry for one userid. Querying this data would be far more easy, though.

ThorstenA 05-13-2010 10:02 PM

Security issue. A user may delete other users results by entering their formresults id.

In plugin Easy Forms Part 2 replace
Code:

if ($_REQUEST['do'] == 'deleteformresult')
{
    $caneditform = unserialize($vbulletin->options['caneditform']);
    if ($caneditform && !is_member_of($vbulletin->userinfo, $caneditform))
    {
        print_no_permission();
    }
    $id = $vbulletin->input->clean_gpc('g', 'id', TYPE_UINT);
    $fid = $vbulletin->input->clean_gpc('g', 'fid', TYPE_UINT);
    $db->query_write("DELETE FROM " . TABLE_PREFIX . "formresults WHERE id=$id");

to
Code:

if ($_REQUEST['do'] == 'deleteformresult')
{
    $caneditform = unserialize($vbulletin->options['caneditform']);
    if ($caneditform && !is_member_of($vbulletin->userinfo, $caneditform))
    {
        print_no_permission();
    }
    $id = $vbulletin->input->clean_gpc('g', 'id', TYPE_UINT);
    $db->query_write("DELETE FROM " . TABLE_PREFIX . "formresults WHERE id=$id and userid=" . $vbulletin->userinfo[userid] . "");

The $fid seems to be not needed and therefore does not need to be included in the url.

riskofficer 05-14-2010 04:22 AM

Quote:

Originally Posted by ThorstenA (Post 2036517)
Bug: Poll displays free text entries

I think solution could be as I already wrote (it is more flexible than hardcoded question types restrictions):
Quote:

Originally Posted by riskofficer (Post 2030249)
I don't use "Forum Result Poll" but may be this suggestion will be interesting: not pre-given text answers can't be "pollable", for example, when you ask users -- "what do you think about my mod" -- it can be one million different answers and in Poll Results they will show nothing interesting. But when you ask -- "how many times you have been to USA" for example, -- answers can repeat from one to another, and in Poll Results you can see interesting graphs. When you ask something and answers pre-given in check boxes, for example, Poll Results will be greate. That is why check box near question in Edit Form about Pollable or not question will be greate idea, as I think.

Sorry my English.

Like we already have checkbox about required this question or not.

riskofficer 05-14-2010 07:38 PM

1 Attachment(s)
I have prepared some suggestions about Form's "first page". May be they could be interesting (see attached picture).

riskofficer 05-15-2010 05:13 PM

1 Attachment(s)
Edit Bug (please see attached picture)

bananalive 05-16-2010 01:17 PM

Quote:

Originally Posted by riskofficer (Post 2037466)
Edit Bug (please see attached picture)

Fixed in v4.1.1

bananalive 05-16-2010 01:19 PM

Quote:

Originally Posted by ThorstenA (Post 2036517)
Bug: Poll displays free text entries

In v4.1.1 added option to hide question types

bananalive 05-16-2010 01:20 PM

Quote:

Originally Posted by ThorstenA (Post 2036458)
Bugs:
  1. I can not edit my own entry if the maximum number of entries is limited to one.

fixed in v4.1.1

bananalive 05-16-2010 01:21 PM

Quote:

Originally Posted by XLCR GODFATHER (Post 2036402)
I fully agree where leaving the delete option available makes it too easy for accidental click and should be a permission setting.

Fixed in v4.1.1
Added javascript popup to confirm the user wants to delete form result. Also added extras permissions for form results.

bananalive 05-16-2010 01:22 PM

Quote:

Originally Posted by riskofficer (Post 2036339)
Thank you! One more thing about edit is something like "Usergroups Allowed to Edit Form Results". For example I'd like to leave this option (Edit Result) only for person whos answered (starter) and admins/moderators. BTW the option to delete results is in need of permissions too, I haven't found them.

Added in v4.1.1


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