vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Forms Hack (https://vborg.vbsupport.ru/showthread.php?t=93970)

ChiliVB 03-14-2006 02:11 PM

I'm having a problem with unregistered users accessing/viewing a form. We would like this form application to be accessible outside the forum to unregistered users.

I currently have the USERGROUP permissions not enabled and set the same as the default form hook, as below.

Quote:

// if (!in_array($vbulletin->userinfo['usergroupid'], array(2,5,6,7))) print_no_permission();
I have tried adding usergroup 1 as an ID and enabling this setting but it did not help.

A registered user or administrator can access and submit forums without a problem. But I need for unregistered users to be able to view/submit.

Can anyone shed some light on this for me?

Elikster 03-14-2006 03:15 PM

Got it all working properly now. Found one ; that shouldn't be there that caused it not to post at all.

FLMom 03-14-2006 04:04 PM

I am about to install! Thanks :)

FLMom 03-14-2006 04:59 PM

Alright, I need help please!!

I installed this and I am assuming I did it the right way, but I can't seem to find it anywhere? In the step #3 of the install when it says "3 - To get to the form, go to: /newthread.php?do=form (change "form" to the name of your form if you have few)"
How do I go to that? I am new to this stuff and just can't figure it out. Can someone please explain this too me? TIA :D

ChiliVB 03-14-2006 05:56 PM

Quote:

Originally Posted by FLMom
Alright, I need help please!!

I installed this and I am assuming I did it the right way, but I can't seem to find it anywhere? In the step #3 of the install when it says "3 - To get to the form, go to: /newthread.php?do=form (change "form" to the name of your form if you have few)"
How do I go to that? I am new to this stuff and just can't figure it out. Can someone please explain this too me? TIA :D

I'm new to this too.. but I can maybe help a little.

In Plug-In Manager in the ACP you will see a hook called "Form Hack". That is the "main hook" referenced in the instructions. Edit form hack and follow the instructions to save a form with a new name. Then edit the "new" hook and set options the way you want them.

There are also two templates, form and formanswers, that have to be modified if you customize the appearance. I made new templates for my customized form so I always have the main one to look at for default options.

Hope this helps you a little. :)

HappyDJ 03-19-2006 09:14 PM

I still can't figure this out - how to use etc! It would be excellent if some sort of idiots guide was made to make a form or whatever!

Any takers?

silly rabbit 03-20-2006 02:25 PM

Quote:

Originally Posted by HappyDJ
I still can't figure this out - how to use etc! It would be excellent if some sort of idiots guide was made to make a form or whatever!

Any takers?

happy, while no EXPERT myself the form hack consists of three things wrapped up into one neat XML plugin - two templates and php processing code. 1)An input template(named 'form'), 2)an output template(named answers) and 3)the php processing code itself which is hooked to 'newthread_start'. The 2 templates, once installed, can be found in the vb 'Style Manager' and edited from within the admin cp (like everything else) rather than constantly reinstalling/overwriting the plugin itself (which I did initially).

The first thing I did however, to make life easier on myself, was to rename (thru search replace) all the variable references in the script itself to simplier, more generic names like 'question1', 'answer1' and $answer1 (the php references). I assume you know HTML form processing right??

Step2 (prior to loading the XML) is deciding where the output 'answers' is to go and those options are embedded in the php code itself. In my case I chose 'reply to thread' leaving the reply to 'new thread' option '0' otherwise you'll get a double post.

Having muddled thru all of that I designed my own 'custom' input 'form' (using the same 'answer' variables) and noticed 1 thing - I did not have to change the 'formname' (or modify the XML plugin) IF you manually assign the new template (in my case named 'testform') the same title $formtitle="form" as the hookcode will still execute!! In other words the only real reason I see to install a second XML is if the php processing code needs changing. Of course if ya need new / different php processing code (which you need to design) then the XML plugin and the 'formtitle' needs to change too but if Abe's processing code is good (and all ya need) you can manually force the issue AT RUNTIME . . .

Make Sense??

I am using this in conjunction with Logician's 'Webtemplates' and it works very well posting user input data into a thread of my designation . . . .

Eh, Questions??

Rabbit

|oR|Greg 03-20-2006 02:27 PM

Quote:

Originally Posted by mkdevo
is there/will there be any way to use a form to submit a new calendar event?

I would install this if an option were to also add an event to the calendar. Like a check box to add it, then a drop down for date.

silly rabbit 03-20-2006 02:43 PM

Quote:

Originally Posted by |oR|Greg
I would install this if an option were to also add an event to the calendar. Like a check box to add it, then a drop down for date.

That'd be GOOD!! And say a handy way to custom retrieve and edit / update a current event that already exists (without the help of the AdminCP)????

mrgrimes 03-22-2006 11:06 AM

Hi. I'm new to both vBulletin and php, but this hack looks like it could do what I'm after. Basically I want a form that submits a private log entry that only the user and moderator can see.

Can this hack be modified to set permissions on a new thread, and if so how?


All times are GMT. The time now is 06:10 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.02101 seconds
  • Memory Usage 1,747KB
  • 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_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