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)

Stryker412 08-20-2008 07:13 PM

Quote:

Originally Posted by farplane dragon (Post 1603160)
Yeah, yeah, cool. Thanks for the help so far. I actually got the answer all problem fixed, it's just the "getting stuck on the thank you screen" I have to figure out.

What do you mean by this?

Daggerzz 08-20-2008 08:13 PM

I am sure that this question has been asked. With over 80 pages, it is probably in there somewhere, but I have not found an exact match to my problem. So maybe someone can help me.

I want to call my copy of the hack in this way:

PHP Code:

/newthread.php?dp=myform&p=### 

where ### is the post I want to reply to.

I can generate this link without problem. My form begins executing. I can echo to the screen for verification, the "p" variable, by accessing $_REQUEST['p'].

I want to set the variable $formreplythreadid to this "p" variable. I have tried various variations:
PHP Code:

$formreplythreadid $_REQUEST['p']; 

or this
PHP Code:

$x $_REQUEST['p'];
$formreplythreadid $x

I also attempted to add a variable to the form like other user input variables, using
something like this:
PHP Code:

// Part 1
$vbulletin->input->clean_array_gpc('p', array(
'var1' => TYPE_STR,
'wheretogo' => TYPE_STR,
));

// Part 2
$var1$vbulletin->GPC['var1'];
$wheretogo$vbulletin->GPC['wheretogo']; 

With the value defined in this way, I tried to assign to it in two different ways. First I tried to directly assign to it:
PHP Code:

$wheretogo $_REQUEST['p']; 

and lastly I tried to allow the user to input the value via the form input screen. This works so I know a variable will work. But I cant figure out how to have the program assign the variable

In all cases, I could echo the value to the screen with success; however, in all cases when I tried to assign my variables value to $formreplythreadid, the value seems to be empty.

How can I set the value $formreplythreadid to a value that is generated at runtime?

farplane dragon 08-20-2008 09:14 PM

Quote:

Originally Posted by Stryker412 (Post 1603218)
What do you mean by this?

Normally, I'd see the thank you screen then get redirected back to forumhome I believe. Now, I see the thank you screen and that's it, it doesn't redirect to anywhere.

skulldred 08-20-2008 09:54 PM

Hi Daggerzz i have the same problem but with threads... I guess that is the solution... :

//ENABLE FORM TO REPLY TO EXISTING THREAD - 1 = yes, 0 = no
$formreply = "1";
if ($dropdownanswer1 == 'Mage'){
$formreplythreadid = "43";}
if ($dropdownanswer1 == 'Warlock'){
$formreplythreadid = "34";}
if ($dropdownanswer1 == 'Warrior'){
$formreplythreadid = "41";}
if ($dropdownanswer1 == 'Rogue'){
$formreplythreadid = "42";}
if ($dropdownanswer1 == 'Priest'){
$formreplythreadid = "40";}
if ($dropdownanswer1 == 'Hunter'){
$formreplythreadid = "46";}
if ($dropdownanswer1 == 'Paladin'){
$formreplythreadid = "45";}
if ($dropdownanswer1 == 'Shaman'){
$formreplythreadid = "44";}
//EXISTING THREAD ID FOR FORM TO REPLY IN

Can you explain me where you have added this code please? $x = $_REQUEST['p'];

Daggerzz 08-20-2008 11:50 PM

Quote:

Originally Posted by

Can you explain me where you have added this code please? $x = $_REQUEST['p'
;

I put this in the form hack right after I defined the variables. i know this is teh right value because i can make it display the number. The problem is if iIuse that as a variable for $formreplythreadid it gives me an error. I need to be able to post this to any number of threads so a drop down box would not work.

Stryker412 08-22-2008 09:05 PM

Quote:

Originally Posted by farplane dragon (Post 1603301)
Normally, I'd see the thank you screen then get redirected back to forumhome I believe. Now, I see the thank you screen and that's it, it doesn't redirect to anywhere.

That's how it is on mine too, it never redirected. I would like to know if you find out how.

Also, I'd like to beg/plead one more last time if someone can help me set up a birthday question so the three drop down menus are side by side on the same line.

BlueBulletRL 08-24-2008 03:43 PM

Also I will plead again someone please help me!

cragtay 08-25-2008 07:20 AM

I make my question in a quote because after posted this, I saw Daggerzz's post. The problem is similar. However, I typed my question so I don't want to delete it :">


Quote:

For example, I have 2 categories: A and B, and in each category, there are 3 forums.
The forum ids are 2, 4, 6 (3 forums in category A) and 5, 7, 9 (3 forums in category B).

I want to design 2 forms (newA and newB) for each category. 3 forums in each category will use a common form.

http://mydomain.com/newthread.php?do=newA&f=2
http://mydomain.com/newthread.php?do=newA&f=4
http://mydomain.com/newthread.php?do=newA&f=6

http://mydomain.com/newthread.php?do=newB&f=5
http://mydomain.com/newthread.php?do=newB&f=7
http://mydomain.com/newthread.php?do=newB&f=9

How can I do that?

I think that I should get the forumid from the URL to put into the variable $formforumid in the form template (newA or newB). Is it possible?
If I don't make that number a variable, then I have to make 3 separate forms, whose the contents are same, but names are different, for each category. In the example, there are only 6 forums. However, in practically, there may have more forums that 6. Make seperate form for each forum is really not effective way.

Could someone help me?

Stryker412 08-25-2008 12:55 PM

Thanks to Abe I was able to get the triple drop down question working.

Vackrick 08-26-2008 02:25 AM

Parse error: syntax error, unexpected T_VARIABLE in /home/shawnyue/public_html/forum/newthread.php(74) : eval()'d code on line 191


All times are GMT. The time now is 11:02 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.02357 seconds
  • Memory Usage 1,761KB
  • 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
  • (5)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