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)

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 06:29 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.02060 seconds
  • Memory Usage 1,763KB
  • 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
  • (5)bbcode_php_printable
  • (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