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)

RMS-Chef 08-22-2005 08:08 PM

Quote:

Originally Posted by Abe1
This way do dont have to wait,

Find this 2 times:
$newpost['title'] =& $formtitle;

and replace the $formtitle with any varable you want from the form. If you want 2 together, put them in quotes.

Thanks Abe1 for you help and support thus far. I am having issues as to the proper code to replace $formtitle with.
I have 3 custom variables that I would like to combine to generate the thread title.
($subjecttitleans $subjectdateans and $subjectlocationans)

I have tried two different versions of code:
Code:

$newpost['title'] =& "$subjecttitleans" "$subjectdateans" "$subjectlocationans";
Code:

$newpost['title'] =& "$subjecttitleans $subjectdateans $subjectlocationans";
Both give me the following error code displayed at the top of the page (btw, line 266 is the first instance of the code replacment):
Code:

Parse error: parse error, unexpected '\"', expecting T_NEW or T_STRING or T_VARIABLE or '$' in /home/XXXXX/public_html/newthread.php(68) : eval()'d code on line 266
Also, the form does not load and instead I get a vB error message that says:
Code:

Invalid Forum specified. If you followed a valid link, please notify the administrator
Finally, if I just use one of my custom variables to replace $formtitle the form loads properly and the resulting thread title has the proper $subjecttitleans text.

Sorry, I am good with templates but ignorent on code. Any help on this would be greatly appreciated. Thanks!

Abe1 08-22-2005 08:22 PM

Quote:

Originally Posted by RMS-Chef
Thanks Abe1 for you help and support thus far. I am having issues as to the proper code to replace $formtitle with.
I have 3 custom variables that I would like to combine to generate the thread title.
($subjecttitleans $subjectdateans and $subjectlocationans)

I have tried two different versions of code:
Code:

$newpost['title'] =& "$subjecttitleans" "$subjectdateans" "$subjectlocationans";
Code:

$newpost['title'] =& "$subjecttitleans $subjectdateans $subjectlocationans";
Both give me the following error code displayed at the top of the page (btw, line 266 is the first instance of the code replacment):
Code:

Parse error: parse error, unexpected '\"', expecting T_NEW or T_STRING or T_VARIABLE or '$' in /home/XXXXX/public_html/newthread.php(68) : eval()'d code on line 266
Also, the form does not load and instead I get a vB error message that says:
Code:

Invalid Forum specified. If you followed a valid link, please notify the administrator
Finally, if I just use one of my custom variables to replace $formtitle the form loads properly and the resulting thread title has the proper $subjecttitleans text.

Sorry, I am good with templates but ignorent on code. Any help on this would be greatly appreciated. Thanks!

Drop the &

Use this:
PHP Code:

$newpost['title'] = "$subjecttitleans $subjectdateans $subjectlocationans"


RMS-Chef 08-22-2005 09:30 PM

Kick Ass! That is working flawlessly.

I eagerly await a fix to the URL parse thing.

Again, thanks so much for you help and effort.

mooj 08-23-2005 09:51 AM

Abe1 ..

it would be good if you add one (var) to count ( How many users completed and send the FORM ) in the FORM page ..

I need to use it in my Form in order to inform them the quantity .. ( it should be an optional feature )

thank you in advance Abe1 :) ..

RMS-Chef 08-23-2005 01:19 PM

Ahh, I have this working and highly customized and it is really damn near a perfect hack.

I came up with I think one last issue. When posting, it automatically subscribes the user posting to the thread. Is there any way to prevent this?

Abe1 08-23-2005 01:22 PM

Quote:

Originally Posted by RMS-Chef
Ahh, I have this working and highly customized and it is really damn near a perfect hack.

I came up with I think one last issue. When posting, it automatically subscribes the user posting to the thread. Is there any way to prevent this?

Can you see if it's deafut it to be subscibed? I'm going to go through all the settings for a post hopefully in a day or two to fix things like this and the url parsing.

RMS-Chef 08-23-2005 03:12 PM

Quote:

Originally Posted by Abe1
Can you see if it's deafut it to be subscibed? I'm going to go through all the settings for a post hopefully in a day or two to fix things like this and the url parsing.

It is not default.

Sovereign 08-23-2005 03:50 PM

This hack is awesome! I got it working and have three easy forms for requesting forums, RPG hosting or webhosting on my site. Sooooo much better than the old "post in the forum" thing...thank you thank you!

Abe1 08-24-2005 12:08 AM

Version 2.7 -
- Fixed some issues with signatures, url parsing, and subsciptions
- Option to name the post titles
- Made template XHTML 1.0 Transitional

RMS-Chef 08-24-2005 01:42 AM

Quote:

Originally Posted by Abe1
Version 2.7 -
- Fixed some issues with signatures, url parsing, and subsciptions
- Option to name the post titles
- Made template XHTML 1.0 Transitional

Not really sure about product stuff.
What would I need to do in order to upgrade with my three custom forms?

Can I just replace the code after the customizations in the plugin? Are there any required template changes?


All times are GMT. The time now is 03:32 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.01462 seconds
  • Memory Usage 1,751KB
  • 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
  • (8)bbcode_code_printable
  • (1)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