vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   New Posting Features - Form Hack (https://vborg.vbsupport.ru/showthread.php?t=126676)

optrex 12-13-2006 01:17 PM

Nice hack Abe1,

I have a couple of questions before I install.

1) Is there a need/requirement for flood control
2) Is there a need/requirement for image verification

Just wondering if these would be measures to put in to prevent "spamming" ?

blacklancer 12-14-2006 09:57 PM

I'm having problems with this hack...

I have the need for 2 forms. I made the easier one of the 2 first and tested it and it works fine. When I do the 2nd one, it gives me the following error when I try to submit the form.

Quote:

Fatal error: Unable to proceed with save while $errors array is not empty in class vB_DataManager_PM in \includes\class_dm.php on line 763
any advice on what to do??

blacklancer 12-15-2006 05:31 PM

anyone? http://www.sclc.net/forum/images/smilies/lol.gif

laittnet 12-18-2006 02:31 AM

I wanna write the form variables to the database, but it turn in to trouble if one field contains quote mark, for example " or '

PHP Code:

        //$db->query_write(" 
        //    INSERT IGNORE INTO agent_register(userid, fullname, email, phone_mobile, phone_fixed, address, city, country, agent_type, ic_owner, ic_pc, sell_already, sell_cards, cards_month, pay_direct, pay_atm, pay_transfer, pay_post, pay_mb, pay_other, otherinfo, date_submit) 
        //    VALUES 
        //    ({$vbulletin->userinfo['userid']}, {$vbulletin->GPC['answer1']},  {$vbulletin->GPC['answer2']}, {$vbulletin->GPC['answer3']}, {$vbulletin->GPC['answer4']}, {$vbulletin->GPC['answer5']}, {$vbulletin->GPC['answer6']}, {$vbulletin->GPC['answer7']}, {$vbulletin->GPC['radioanswer3']}, {$vbulletin->GPC['radioanswer4']}, {$vbulletin->GPC['radioanswer4other']}, {$vbulletin->GPC['radioanswer5']}, {$vbulletin->GPC['radioanswer5other']}, {$vbulletin->GPC['dropdownanswer1']}, {$vbulletin->GPC['checkboxanswer1_1']}, {$vbulletin->GPC['checkboxanswer1_2']}, {$vbulletin->GPC['checkboxanswer1_3']}, {$vbulletin->GPC['checkboxanswer1_4']}, {$vbulletin->GPC['checkboxanswer1_5']}, {$vbulletin->GPC['checkboxanswer1_6']}, $vbtextanswer, ". TIMENOW . ") 
        //"); 

How can I handle this problem?

DarkDraco07 12-18-2006 06:01 PM

can anyone help with my problem? i want only members that are logged in to be able to use the form =/

civil78 12-18-2006 08:32 PM

Quote:

Originally Posted by DarkDraco07 (Post 1141100)
can anyone help with my problem? i want only members that are logged in to be able to use the form =/

Search in form hack php code, this phrase

PHP Code:

//USERGROUPS ALLOWED 

It's in the start of php.

After that find this if check

PHP Code:

// if (!in_array($vbulletin->userinfo['usergroupid'], array(2,5,6,7))) print_no_permission(); 

Remove the // and in the array(2,5,6,7) set the id numbers of the user groups that you want to allow.

DarkDraco07 12-22-2006 02:55 PM

wow... how did i not see that...
thx

gullystation 12-22-2006 05:58 PM

where is this : /newthread.php?do=form ? Where do i put it, can anyone help me?

civil78 12-22-2006 06:49 PM

Quote:

Originally Posted by gullystation (Post 1143579)
where is this : /newthread.php?do=form ? Where do i put it, can anyone help me?

Go to Plugins & Products --> Plugin Manager and edit under the the Product : Form Hack the Form Hack plugin (you can add more forms if you go down in the [Add New Plugin], see the example of Form Hack and clone it) and in the inside the php code find this

PHP Code:

$formname "form"

The varieble formname is the name of your form. To call your form from your site just write "http://www.yoursitename.com/newthread.php?do= + $formname". like http://www.yoursitename.com/newthread.php?do=form

As you see you can add multiple forms just change the name in the $formname varieble in every new plugin.

Also if you want to make new forms you have to change or add a new template in Styles & Templates, the templates with names in this variebles.

PHP Code:

// Name of the main template
$maintemplate "form";
// Name of the answer template
$answertemplate "formanswers"

$maintemplate is the varieble that contains the name of the template as it show if you call the newthread.php?do=form url, and the $answertemplate contains the name of the template of the post.

I hope that you are undestand that.

elricstorm 12-26-2006 07:39 PM

I'm starting to become very proficient with this plugin and I've created 5 separate "advanced" forms, but now I'd like to take it to a new level.

I want to move the form from posting a message in a thread to posting a calendar event. How difficult would this be?

For instance, the normal forms point to newthread_start and I'm guessing I would change this to calendar_start. So my questions are thus:

1. What form elements would I use to handle date parameters that are already in the existing calendars?
2. Would the form elements have to be separate to account for single day, multi-day, and recurring events?
3. If you look at a "recurring calendar event" I would want to start the form so that it looks exactly like this, with the exception of the editor box which the rest of the form would replace so that I could choose the type of questions/answers I would use here.

I know this might sound difficult, but I feel that if I'm pointed in the right direction, I'm positive I could figure it out. I'm good at hacking/editing existing code due to having a photographic memory.

Thanks in advance.


All times are GMT. The time now is 11:01 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.02447 seconds
  • Memory Usage 1,756KB
  • 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
  • (5)bbcode_php_printable
  • (3)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