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)

The-Ensemble 09-16-2006 07:29 PM

Can you create Multiple forms with this?

Spinball 09-16-2006 09:08 PM

Quote:

Originally Posted by The-Ensemble
Can you create Multiple forms with this?

Yes, you have to create a different form (and formanswers) template and also a plugin product for each one.

FSFwebmaster 09-17-2006 12:13 AM

for some reason if i add more than 3 questions they dont show up any idea why ? this part of the form

$question1 = "What is your name?";
$explain1 = "Please enter your real name here.";

//QUESTION 2 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
$question2 = "What is your online game name?";
$explain2 = "Please enter your online game name here.";

//QUESTION 3 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
$question3 = "What is your birth date?";
$explain3 = "Please enter your birthe date here.";

//QUESTION 4 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
$question4 = "What is your email address?";
$explain4 = "Please enter your email address here.";

Abe1 09-17-2006 02:58 AM

Quote:

Originally Posted by FSFwebmaster
for some reason if i add more than 3 questions they dont show up any idea why ? this part of the form

$question1 = "What is your name?";
$explain1 = "Please enter your real name here.";

//QUESTION 2 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
$question2 = "What is your online game name?";
$explain2 = "Please enter your online game name here.";

//QUESTION 3 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
$question3 = "What is your birth date?";
$explain3 = "Please enter your birthe date here.";

//QUESTION 4 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
$question4 = "What is your email address?";
$explain4 = "Please enter your email address here.";

YOu have to edit the template also.

Spiffware 09-17-2006 05:31 AM

nice work thanks i like it alot

Limerick 09-17-2006 06:54 AM

Hello Abe,

Thank you very much for your hack which will be useful for many of us.

I'd like to know if your hack could be used in a way I've described here, and what changes would it need ?

Note that what I described there was just an idea, but your design seems to be as convenient.

Spinball 09-17-2006 07:54 AM

Hi Abe,
I have modified the form to allow the attachements, and that works (in that it allows me to add attachments). I have also re-modified the formanswers template from the original, although I don't see any reference to attachments in that.
No attachments are appearing in the preview. What am I doing wrong, please?

The-Ensemble 09-17-2006 09:52 AM

Quote:

Originally Posted by Spinball
Yes, you have to create a different form (and formanswers) template and also a plugin product for each one.

ok, that sounds kinda hard. Do I just alter the original plugin product and change a few things?
If so what things?

aceofspades 09-17-2006 10:05 AM

Can you please help me, i am getting this error message:

Quote:

Fatal error: Existing data passed is not an array
Called set_existing in /home/hiven48/public_html/forums/newthread.php(70) : eval()'d code on line 411
Called eval in /home/hiven48/public_html/forums/newthread.php on line 70
in /includes/class_dm.php on line 235
I have only changed the titles of the questions, i havent changed anything else.

The-Ensemble 09-17-2006 11:18 AM

Ignore my previous question. I just found the instructions lol

ETA: Can the form be customised to have a lot of input box and fields?

ETA (again): How would I change the navbar in php? I want it so it says
board name - usercp - usercp page - form

Does this (the questions etc.) have to be done in php? can't it be done in the template?

any idea?

zafrir 09-17-2006 12:16 PM

Can I use the hack to creat a vbulletin.org style threads?

I want to enable a specific usergroup to use the form for the first post of a thread (post a software review in my case in a predefined format) and then enable all other users to reply to that post.

How the edit post is done?? will I be able to use the form to edit posts done with the form.

The-Ensemble 09-17-2006 03:07 PM

Oh and I want to remove the toolbar and stuff from around the message area how would I do that? Because I can't see it anywhere where it says to do that. . .

Limerick 09-17-2006 03:09 PM

Quote:

Originally Posted by Limerick
Hello Abe,

Thank you very much for your hack which will be useful for many of us.

I'd like to know if your hack could be used in a way I've described here, and what changes would it need ?

Note that what I described there was just an idea, but your design seems to be as convenient.

Ok I've installed the hack so I guess it would be possible to reach my goal.
Unfortunately, I think it would be to hard for me.

But, most of all, it would need, IMHO, just one improvement.

It should be possible to call this hack from an existing thread with a special button like "Post Reply" or "New Thread", which could be named "Quote a received e-mail"

Spinball 09-17-2006 03:27 PM

Oh god! Upgraded forum to 3.6.1 and now getting this error when posting the form:
Warning: Cannot use a scalar value as an array in /incoudes/functions_newpost on line 352

The-Ensemble 09-17-2006 03:51 PM

what does it say on 352 of that file?

R.Caldwell 09-17-2006 11:58 PM

Quote:

Originally Posted by camuca
Hi, this is a very good work.

How would I implement a drop down box that would show list of the forums and allow user to post the form to.

//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 = "5";


It will be something like $formforumid = Dropdown code that shows all the forums which are then converted to ids, I guess

Any suggestions how this can be implemented

I could use some help with this section of the form as well.

Spinball 09-18-2006 05:28 AM

Quote:

Originally Posted by The-Ensemble
what does it say on 352 of that file?

($hook = vBulletinHook::fetch_hook('newpost_process')) ? eval($hook) : false;

Abe1 09-18-2006 12:20 PM

Quote:

Originally Posted by Spinball
Hi Abe,
I have modified the form to allow the attachements, and that works (in that it allows me to add attachments). I have also re-modified the formanswers template from the original, although I don't see any reference to attachments in that.
No attachments are appearing in the preview. What am I doing wrong, please?

Attachments dont show up on the preview but are still there when you click preview.

ctrl-alt-del 09-18-2006 01:43 PM

What an excellent hack!! I'll need to install this and start testing. Thanks!!

The-Ensemble 09-18-2006 02:49 PM

Quote:

Originally Posted by Spinball
($hook = vBulletinHook::fetch_hook('newpost_process')) ? eval($hook) : false;

Hopefully the coder will know whats wrong with this, because I don't sorry :(

-----
Has their been any idea how any of these can be done?

Quote:

Originally Posted by The-Ensemble
ETA (again): How would I change the navbar in php? I want it so it says
board name - usercp - usercp page - form

Does this (the questions etc.) have to be done in php? can't it be done in the template?

Also How would I make the box's bigger? I've tried in the templates and it doesnt change, how would I do it in php?

any idea?

Thanks

Wongod 09-18-2006 03:59 PM

Hey Abe,

Any progress on this? Thanks =)

Quote:

Originally Posted by Abe1
I'll have a look at the code.


Roxie 09-18-2006 04:16 PM

Ahhh. Just what I need!

Thanks.

zafrir 09-18-2006 06:26 PM

Personally I see this as one of the great hacks....
next step should be someone rais it to the next level by
writing an external wysiwyg editor enhancement to
auto generate the forms and proper hooks and answer pages.

Z

ctrl-alt-del 09-18-2006 07:15 PM

How can I use BB code for formanswers?? Can I get an example?

In other words,
I want the question headings to be bold when posted to a thread.

R.Caldwell 09-18-2006 07:19 PM

Quote:

Originally Posted by ctrl-alt-del
How can I use BB code for formanswers?? Can I get an example?

In other words,
I want the question headings to be bold when posted to a thread.

in the formanswers template, make your code look like this
PHP Code:

[b$formquestion [/b] - Note the spaces in between the [b][/b


Abe1 09-18-2006 07:26 PM

You can also do this:

HTML Code:

[b]$formquestion [/b]
or
HTML Code:

[b]$formquestion
[/b][b]$formquestion
[/b]


ctrl-alt-del 09-18-2006 07:31 PM

Thanks, I tried the obvious, but received an error message. I'll try the suggestions above.

ctrl-alt-del 09-18-2006 08:06 PM

A WYSIWYG editor would put this hack over the top!

I have yet another question I'm hoping be answered with relative ease. Is it possible to add a drop down menu to a form that posts either a new thread or reply to a thread in a specific form based on the selection of the drop down?

Example: Selections could be The Lounge, vBulletin Discussions, Service Requests, etc. Submitting the form would create the thread in the drop down selection. Thanks!!

ctrl-alt-del 09-18-2006 08:22 PM

I imagine it's not as simple as:

$formforumid = "$dropdownanswer1";

I need a way of associating the selection to a forumID. Thanks again!

The-Ensemble 09-18-2006 09:25 PM

Ok, My forms are done I just need this edit and then I'm tottally done.

How would I change the navbar in php? I want it so it says
board name - usercp - usercp page - form

R.Caldwell 09-18-2006 11:40 PM

Quote:

Originally Posted by ctrl-alt-del
I imagine it's not as simple as:

$formforumid = "$dropdownanswer1";

I need a way of associating the selection to a forumID. Thanks again!

I've tried various ways of getting this to work, and all I get is some wierd errors...

I have PM'd Abe1, but have yet to hear anything back.
If you would like to Collab on it, let me know.

Abe1 09-19-2006 02:59 AM

Quote:

Originally Posted by ctrl-alt-del
A WYSIWYG editor would put this hack over the top!

I have yet another question I'm hoping be answered with relative ease. Is it possible to add a drop down menu to a form that posts either a new thread or reply to a thread in a specific form based on the selection of the drop down?

Example: Selections could be The Lounge, vBulletin Discussions, Service Requests, etc. Submitting the form would create the thread in the drop down selection. Thanks!!

There is a WYSIWYG editor already.

Abe1 09-19-2006 02:59 AM

Quote:

Originally Posted by R.Caldwell
I've tried various ways of getting this to work, and all I get is some wierd errors...

I have PM'd Abe1, but have yet to hear anything back.
If you would like to Collab on it, let me know.

I dont have time to write up all the info. Basicly make sure you are using the right varible. It has to be imported the same way as all other answers are imported.

ctrl-alt-del 09-19-2006 03:00 AM

Yes, I meant for the forms.

Abe1 09-19-2006 03:02 AM

Quote:

Originally Posted by ctrl-alt-del
Yes, I meant for the forms.

There is a WYSIWYG editor in the form. What are you talking about????

ctrl-alt-del 09-19-2006 03:07 AM

:) Apologies, we're missing each other....I know there's a WYSIWYG editor when you're entering/submitting information within a form. But it would be great to have one when creating the forms. (form and formanswers in addition to the separate plugin/hook that needs to be created)

I know it's probably a huge task to undergo something like this.

Can you help us figure out the drop down box question?

R.Caldwell 09-19-2006 01:33 PM

so I need to have the forumID in the answer templates?

I didn't put it in there because I thought it wouldnt matter, I will try what I was doing last time and see if I can get it to work.

UManiac 09-20-2006 03:53 AM

Does this ONLY work on 3.6?

Abe1 09-20-2006 10:05 AM

Quote:

Originally Posted by UManiac
Does this ONLY work on 3.6?

I think if you try to import this into vb3.5 you may get an error.

Also, I'm not sure the attachments work the same in vb 3.5

R.Caldwell 09-20-2006 01:33 PM

Ok, I have tried just about everything I can think of, I get these errors when submitting -

Code:

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

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

This happens when I have send PM enabled. With my addon's for the drop down forum menu.

Here is a snip of my code I have on my form now.

PHP Code:

// Part 1 
$vbulletin->input->clean_array_gpc('p', array( 
'dropforum1' => TYPE_STR
'dropforum2' => TYPE_STR

There is more code after this, this is only the relevent selections.

PHP Code:

// Part 2 
$dropforum1 $vbulletin->GPC['dropforum1']; 
$dropforum2 $vbulletin->GPC['dropforum2']; 

There is more code after this, this is only the relevent selections.

PHP 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 "$dropdownforum1"

$dropforum1 "2"
$dropforum2 "4"

Form Template additions
PHP Code:

<tr>
<
td class="alt1" valign="middle">
<
b>$dropdownforum1</b>:
<
td class="alt1" valign="middle" colspan="2">
<
select name="dropdownforum1">
<
option value="$dropdownforum1<if condition="$dropdownforum1 == $dropforum1">selected="selected"</if>>$dropforum1</option>
<
option value="$dropdownforum1<if condition="$dropdownforum1 == $dropforum2">selected="selected"</if>>$dropforum2</option>
</
select></td>
</
td>
</
tr

Form Answers template
PHP Code:

$dropdownforum1
$dropforum1
$dropforum2 

I dont know why it isn't working, I'm sure its something small I have missed, I am using Drop Down choices throughout the form, so I know my coding is correct for that on my form. I'm just not sure where I missed something or what, but maybe this can help someone else out.

I'm also willing to pay for service to help me get this form working with the Drop Down Choice for which form to post to.


All times are GMT. The time now is 03:42 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.04846 seconds
  • Memory Usage 1,856KB
  • 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
  • (2)bbcode_html_printable
  • (6)bbcode_php_printable
  • (17)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)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