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)

Charles_1 02-02-2008 10:12 AM

Quote:

Originally Posted by Deety (Post 1427173)
I would like to have the form post new threads in multiple forums selected by checkboxes.

This code seems to work well for selecting one $formforumid, but the first two "else" statements would prevent multiple selections, and taking them out did no good.

I'm guessing the issue may be that $formforumid can't be assigned multiple values (i.e., $formforumid = "1,2,3" or some such), but hopefully it can and I'm just missing the language that will do it. Easy answers are nice. :p

If anyone has a suggestion to get multiple forums working, I'll make the edit to the original form and post it as an example so it's easy for the next person. Thanks for any ideas... :)

PHP Code:

if ($checkboxchoice1_1 1)
{
$formforumid "1";
}
else
if (
$checkboxchoice1_2 1)
{
$formforumid "2";
}
else
if (
$checkboxchoice1_3 1)
{
$formforumid "3";
}
else
$formforumid "4"


Quote:

Originally Posted by Grimbone (Post 1386959)
In the code below. how would I go about sending a post to 2 different forums?

Code:

$formforumid = "13";
I am trying to get this to post to both a regular section of the forums and to a private section.

Quote:

Originally Posted by CremeEgg (Post 1433057)
Anybody know what I would have to change with this section to get it to post to 2 forums?

Code:

//FORUM TO POST NEW THREAD IN
//You CAN make this number a variable. You can have a drop down menu or in the link like do=form&f=1. Make sure you add it the variables list.
$formforumid = "x";


I am interested in this too. I tried to find solution, but without luck :-(. Could some coder help please?

RedGTiVR6 02-03-2008 01:30 AM

Quote:

Originally Posted by RedGTiVR6 (Post 1432645)
Quick question regarding the email form functionality.

I'm going to have a field where the user can enter their email address. This form will be sent to our ticket processing que. I'd like to be able to pull the users email addy from this field and have the email be sent to the email I've entered in the code under the email that's in the field.

Hope that makes sense.

Anyone know if that's possible?

Ok - so I've figured out how to have the form go to an email address that's been entered ON the form, but I can't figure out how to have the email appear to be sent BY the email on the form...

Anyone?

cellarius 02-03-2008 12:25 PM

If you're using the form to create a new thread and you're allowing for custom thread titles (I do use the form for entering book reviews, thread title will be the book title), you need to be aware that the limit for thread titles is 85 charakters. The hack does not check for this. So if your thread title is > 85 charakters, the thread creation will fail, resulting in a "no thread specified"-error during redirection.

baz_kingfish 02-03-2008 04:28 PM

OK, I have been reading this thread most of the morning trying to decide if I have the wherewithall to implement this hack. I am a novice, but I have a pretty good confidence that I can figure it out...given a little help here....but what I am not understanding is how the "multiple" forms are created. Do you have to install the hack everytime you want to create a new form and use a different name or is there a "Add/Create new form" in the AdminCP under this Product/Plugin manager's screen that Adds the new forms and templates that then need to be edited as discussed throughout this thread? I hope it is as I have described so that once I successfully build my first form the others will be easier to figure out. Please advise. :confused:

RedGTiVR6 02-03-2008 09:25 PM

Quote:

Originally Posted by cellarius (Post 1435300)
If you're using the form to create a new thread and you're allowing for custom thread titles (I do use the form for entering book reviews, thread title will be the book title), you need to be aware that the limit for thread titles is 85 charakters. The hack does not check for this. So if your thread title is > 85 charakters, the thread creation will fail, resulting in a "no thread specified"-error during redirection.

Unless you have changed that in your settings...

RedGTiVR6 02-03-2008 09:58 PM

Quote:

Originally Posted by baz_kingfish (Post 1435463)
but what I am not understanding is how the "multiple" forms are created. Do you have to install the hack everytime you want to create a new form and use a different name or is there a "Add/Create new form" in the AdminCP under this Product/Plugin manager's screen that Adds the new forms and templates that then need to be edited as discussed throughout this thread? I hope it is as I have described so that once I successfully build my first form the others will be easier to figure out. Please advise. :confused:

There is no manager screen.

If you download and install the mod, the instructions are in the top part of the plug-in.

You don't have to install it multiple times. you just create a new plug-in and new set of templates for each form you want.

It takes a bit to understand what's going on with it and how it works but it's a great way to learn some PHP and a bit about how the forum works.

attroll 02-04-2008 01:04 AM

Quote:

Originally Posted by baz_kingfish (Post 1435463)
OK, I have been reading this thread most of the morning trying to decide if I have the wherewithall to implement this hack. I am a novice, but I have a pretty good confidence that I can figure it out...given a little help here....but what I am not understanding is how the "multiple" forms are created. Do you have to install the hack everytime you want to create a new form and use a different name or is there a "Add/Create new form" in the AdminCP under this Product/Plugin manager's screen that Adds the new forms and templates that then need to be edited as discussed throughout this thread? I hope it is as I have described so that once I successfully build my first form the others will be easier to figure out. Please advise. :confused:

Yes you have to install the hack for each form you want to use. So if you want to use it for two forms you have to have two installs.

RedGTiVR6 02-04-2008 12:26 PM

You don't reinstall it. You just create the plug-in again in the AdminCP....

attroll 02-04-2008 04:08 PM

Quote:

Originally Posted by RedGTiVR6 (Post 1436052)
You don't reinstall it. You just create the plug-in again in the AdminCP....

You are right. My explantion is wrong. You would have to create another plug-in and two more template files with different name and change that in you newly installed plug-in.

baz_kingfish 02-04-2008 05:01 PM

Bummer...:(

Guess I need to go buy "PHP for Dummies"!

Thank you for the feedback. It would be great if someone took this hack and built an AdminCP user interface. for us rookies to be able to build and hook forms from within the Admin CP. I would be willing to contribute to that effort.

Keep me posted if that becomes a reality.
KF

cookiepants 02-05-2008 05:40 AM

Is there a step by step way to customize the hack? I'm really trying to learn PHP to get this implemented on my site -- I think it would seriously rock for us! But I'm sort of lame at the PHP part.

I copied and pasted it into Notepad so I could try to read the instructions better, but I'm still a bit confused.

Thanks!
Nutmeg

cookiepants 02-05-2008 06:26 AM

once I pasted it into notepad, it was very easy to edit. Thank you!!! :up:

kartik786 02-05-2008 11:01 AM

Is it possible that members can create surveys from such forms which can be filled by other members?

A hack like that would be awesome !!

cookiepants 02-05-2008 05:31 PM

I do have one question. I'd like to add more check boxes than three. How do I do that?

PaleRiders 02-05-2008 07:40 PM

Quote:

Originally Posted by dirtycrow (Post 1075706)
hmmm. . . what am i doing wrong?

i wanted to get rid of all the radio buttons and drop downs.

I am having the exact same issue. I've gone over the hook a million times. I realize you have to edit the 'template'....but I'm not sure what template? I've searched through my Style Templates and I have a newthread....but not a newthread_start (where the hook is).

I'm obviously getting something confused here, so if someone could clear this up for me, it'd be much appreciated.

Edit: Figured it out. There is a formanswers template you need to edit, as well as the form template. Makes perfect sense now. Thanks for the great hack!

leylandfor 02-06-2008 03:53 PM

i have this working over at http://www.leylandforum.co.uk/forum/...orum%20Reviews ive noticed that the name of the form appears as the thread title, is there anyway we can make the user choose the thread title.

Im using this for a review service, where poeple can review a cafe, product, service etc.

any suggestions will be appreciated.

Elenna 02-06-2008 06:20 PM

Quote:

Originally Posted by leylandfor (Post 1437472)
i have this working over at http://www.leylandforum.co.uk/forum/...orum%20Reviews ive noticed that the name of the form appears as the thread title, is there anyway we can make the user choose the thread title.

Im using this for a review service, where poeple can review a cafe, product, service etc.

any suggestions will be appreciated.

As you know, there is a line in there that sets the thread title to the form title.

In the plugin, look for this:

Quote:

//////////////////////////////////////////////////////////////////////////////////////////////
//TITLE OF THREAD/POST/PM/EMAIL (do not use quotation marks in the title or you will get a parse error)
//You may use variables from the form for this.
////////////////////////////////////////////////////////////////////////////////////////////////////
$posttitle = "$formtitle";
Change that last "$formtitle" to the variable you gave the "Product Name".

leylandfor 02-07-2008 06:50 PM

Many thanks, much appreciated

asandhanam 02-09-2008 11:17 PM

I'm doing some additional form validation. Wondering how to display on the same page, i mean display errors on top & the form beneath. Right now the errors are displayed on newthread.php but the form doesn't show up beneath. I also set $_REQUEST['do'] to formname by default..Please help !!!

trevanh 02-12-2008 02:36 PM

I'm getting the following error in all of the forms I've created and I'm not sure where to look to solve the issue...

Warning: Cannot use a scalar value as an array in /includes/functions_newpost.php on line 356

Any help would be greatly appreciated!

Trevan

P.S. Line 356 is the main line of the following function:

else
{
$dataman->setr('forumid', $foruminfo['forumid']);
}

boomcar68 02-13-2008 04:23 PM

Hello all:

First i need to say that i am totally new with vB.
I dumped my nuke-evolution site and imported database into vb.
I must say this is alot of different then nuke :-)
But i like to learn vB alot.

::On Topic::

I installed this nice hack ,but there is only 1 issue for me.
I have 5 radioquestion down to eachother.
I renamed them all,i updated the answer template and the mainhook,all is working except
that the question aren't there only the answers and near the answers i get this error message:

answer1 = Array['radioanswer6other'];


answer2= Array['radioanswer7other'];

answer3 = Array['radioanswer8other'];

answer4 = Array['radioanswer9other'];

answer5 = Array['radioanswer10other'];

I try to find out what could be the problem,but i didnt find.
Can some1 tell me what i did wrong?

Thanks John:up:

attroll 02-13-2008 04:39 PM

Quote:

Originally Posted by boomcar68 (Post 1442293)
Hello all:

First i need to say that i am totally new with vB.
I dumped my nuke-evolution site and imported database into vb.
I must say this is alot of different then nuke :-)
But i like to learn vB alot.

::On Topic::

I installed this nice hack ,but there is only 1 issue for me.
I have 5 radioquestion down to eachother.
I renamed them all,i updated the answer template and the mainhook,all is working except
that the question aren't there only the answers and near the answers i get this error message:

answer1 = Array['radioanswer6other'];


answer2= Array['radioanswer7other'];

answer3 = Array['radioanswer8other'];

answer4 = Array['radioanswer9other'];

answer5 = Array['radioanswer10other'];

I try to find out what could be the problem,but i didnt find.
Can some1 tell me what i did wrong?

Thanks John:up:

You need to put the question in you formanswers template also. It should look somehting like this.

$radioquestion2
$radioanswer2

boomcar68 02-13-2008 05:26 PM

Did that like this $radioquestion3
$radioanswer3
$radioanswer3other

I can see the questions now with yes/no answer but still there is a error:
Do you have an AAOtracker Account, if yes write your AAOtracker name here
yes
6uy = Array['radioanswer6other'];


Where 6uy is my giving answer in explain block

sylar 02-14-2008 10:31 AM

Seems that the developer for this does not check it that often and atroll has graciously been answer a lot of questions.

Im in need of have the code on the form hook into the code for VB so that the new thread follows the permissions that I have set on the forum the post will be going into, email, poll, attachement , etc.

I have a quick work around but working on something more permanent. If I can come up with it I will share with everyone.

My requirements are to allow only VIP members and Registered uses with over 100 posts be able to post on the forums Im using the forms. Temporarily I am using this until I find a way to hook the form code to the forum code.

if( $vbulletin->userinfo['usergroupid'] <5 ) {
if($vbulletin->userinfo['posts']<100) {
echo 'Sorry, you can not post here as you need to have 100 posts, you only have '.$vbulletin->userinfo['posts'];
print_no_permission();
}
}

As an addendum, I previously had a time limit hack on this particular sub forum that allowed member to be able to only start 3 threads on a 30 day span. This hack is not playing well with it, not at all actually. Anyone have any idea how to edit the form to do this? (check to see if member or VIP has less or equal to 3 threads in 30 days and either allow or deny ability to start one?)

Thank you

attroll 02-17-2008 03:21 AM

Quote:

Originally Posted by boomcar68 (Post 1442356)
Did that like this $radioquestion3
$radioanswer3
$radioanswer3other

I can see the questions now with yes/no answer but still there is a error:
Do you have an AAOtracker Account, if yes write your AAOtracker name here
yes
6uy = Array['radioanswer6other'];


Where 6uy is my giving answer in explain block

In the plugin towards the bottom you will find a code like this
Code:

    {
        if ($normalanswer1 == '' OR $radioanswer1 == '' OR $radioanswer2 == '' OR $radioanswer3 == '' OR $answer1 == '' OR $answer2 == '' OR $answer3 == '' OR ($checkboxchoice1_1 AND $checkboxchoice1_2 AND $checkboxchoice1_3) OR $longanswer1 == '')

You need to make sure you added the "radioanswer6other" statements in there in the proper format.

georg08 02-22-2008 03:58 PM

Hello,
I'm using vB 3.6.8 Patch2 in the German Translation and I installed the original English Form Hack 4.0 Version with the parameters $formforum="1", $formforumid="10" and usergroups 2,5,6,7. ACP -> Plug-in [x] activated. But till now, I couldn't succeed in seeing the form in any place in my forum. The form never appears. What may be the reason?
Thanks and greetings
George

zmmmzz 02-23-2008 02:49 AM

you can see it if you enter this address

http://yoursite.com/forum/newthread.php?do=form

replace "yoursite" for your own domain and "forum" for the name of the folder in which you installed the forum.

kursed 02-23-2008 08:01 PM

I'm currently using vB 3.6.8 - whenever uploading a file, using this hack, it gives me an error; 'Could not create file system directory to hold your attachment.'

How can I correct this?

kursed 02-23-2008 08:43 PM

Also, it gives me the option to upload files as an administrator but not as a regular registered user. What might be the reason behind that?

kursed 02-23-2008 09:55 PM

Ok, I've managed to solve both of my above issues. There is just one thing left now. Is there anyway that I can make entries made through this hack to appear in a single thread, instead of it making a new thread every time someone submits it.

Elenna 02-25-2008 02:22 AM

Kursed,

Yes, there is an option to have it reply to an existing thread.

Search for this text:
Quote:

////////////////////////////////////////////////////////////////////////////////////////////////////
//CHOOSE WHETHER YOU WANT FORM TO BE POSTED IN A NEW THREAD, NEW POLL, REPLY TO EXISITING THREAD, PMed OR EMAILED
///////////////////////////////////////////////////////////////////////////////////////////////////
A few lines under it, you'll see the following option:
Quote:

////////////////////////////////////////////////////////////////////////////////////////////////////
//ENABLE FORM TO REPLY TO EXISTING THREAD - 1 = yes, 0 = no
$formreply = "0";
//EXISTING THREAD ID FOR FORM TO REPLY IN
$formreplythreadid = "12345";
////////////////////////////////////////////////////////////////////////////////////////////////////
Set $formreply to 1, and set the $formreplythreadid to the thread ID of the thread you want the replies to continue to be posted to.

Note: You probably want to look just under the first text and turn off posting new thead, as I believe it might do both if you don't!

Kwikms 02-25-2008 12:34 PM

@sylar - I hope this one will work for me togehter with hits form hack - https://vborg.vbsupport.ru/showthread.php?t=96848


Does someone know how I could have the new topic created by this form automaticly be closed?

RedGTiVR6 02-27-2008 05:22 PM

Any word if this will work on 3.7?

attroll 02-28-2008 05:05 AM

Quote:

Originally Posted by RedGTiVR6 (Post 1452272)
Any word if this will work on 3.7?

Yes it works.

DivineMessenger 03-03-2008 09:31 PM

I keep getting an error in my newthread.php on line 395 and I have no idea why. Does anyone know what causes this? I change lil stuff and the error moves around a lil to different lines in that same file... any ideas?

Kwikms 03-04-2008 08:47 AM

@Divine - Could be everyting, like a forgotten ; or one " to much where it shouldnt be.

Deep-X 03-04-2008 10:47 PM

No Divine is right since version 3.6.8 patch 2 this now creates a new error in newthread.php on line 654 and such. I had to disable the hack to get it from displaying the error code on all new posts.

Please advise

DivineMessenger 03-04-2008 11:34 PM

I'll pay someone $10 to get mine working! lol

AWMGolfer 03-04-2008 11:40 PM

I'm using it on 3.7 with no problems and love it!!

DivineMessenger 03-05-2008 03:32 AM

Show off lol


All times are GMT. The time now is 10:55 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.02525 seconds
  • Memory Usage 1,859KB
  • 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
  • (1)bbcode_php_printable
  • (16)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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