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?

Abe1 08-24-2005 01:53 AM

Quote:

Originally Posted by RMS-Chef
Not really sure about product stuff.
What would I need to do in order to upgrade with my three custom forms?

The templates dont realy need to be changed. Their basicly the same just with the XHTML rules.

Here are the plug in edits:

Find:
PHP Code:

$formtitle "Generic Form"

Add after:
PHP Code:

////////////////////////////////////////////////////////////////////////////////////////////////////
//TITLE OF THREAD/POST/PM/EMAIL (do not use quotation marks or you will get a parse error)
////////////////////////////////////////////////////////////////////////////////////////////////////

$posttitle "$formtitle"

Find (2 times):
PHP Code:

$newpost['title'] =& $formtitle

Replace with:
PHP Code:

$newpost['title'] =& $posttitle;
        
$newpost['parseurl'] = '1';
        
$newpost['emailupdate'] = '9999';

        if (
$vbulletin->userinfo['signature'] != '')
        {
            
$newpost['signature'] = '1';
        }
        else
        {
            
$newpost['signature'] = '0';
        } 


Find:
PHP Code:

$question $formtitle

Replace with:
PHP Code:

$question $posttitle


Find:
PHP Code:

$vbulletin->GPC['title'] =& $formtitle

Replace with:
PHP Code:

$vbulletin->GPC['title'] =& $posttitle


Find:
PHP Code:

vbmail($formemailaddress$formtitle$formsend); 

Replace with:
PHP Code:

vbmail($formemailaddress$posttitle$formsend); 


RMS-Chef 08-24-2005 02:28 AM

Thanks. I had completly rewritten everything above the actual script code so all I needed was the URL parse issue fixed.

All I did was add the:
Code:

$newpost['parseurl'] = '1';
$newpost['emailupdate'] = '9999';
 
if ($vbulletin->userinfo['signature'] != '')
{
$newpost['signature'] = '1';
}
else
{
$newpost['signature'] = '0';
}

twice under the "$newpost['title'] =" area and that fixed it.
It is now able to parse URLs and email addresses fine.
Thanks again Abe1!

Abe1 08-24-2005 02:31 AM

Quote:

Originally Posted by RMS-Chef
Thanks. I had completly rewritten everything above the actual script code so all I needed was the URL parse issue fixed.

All I did was add the:
Code:

$newpost['parseurl'] = '1';
$newpost['emailupdate'] = '9999';
 
if ($vbulletin->userinfo['signature'] != '')
{
$newpost['signature'] = '1';
}
else
{
$newpost['signature'] = '0';
}

twice under the "$newpost['title'] =" area and that fixed it.
It is now able to parse URLs and email addresses fine.
Thanks again Abe1!

Doing this fixes 3 things, posts get parsed, you dont subscribe to threads, and signatures show if you have one.

BTW, you can call me Abe. The username was taken when I came.

RMS-Chef 08-24-2005 02:43 AM

Quote:

Originally Posted by Abe1
BTW, you can call me Abe. The username was taken when I came.

Will do Abe, now give me a paypal address so I can donate some coinage for all your help! I not going to pay your rent or anything but you will be able to get some lunch or a couple packs of smokes...lol

Abe1 08-24-2005 02:44 AM

Quote:

Originally Posted by RMS-Chef
Will do Abe, now give me a paypal address so I can donate some coinage for all your help!

I work for free here. No need to pay me.

mooj 08-24-2005 08:08 AM

Um .. could you please ...

https://vborg.vbsupport.ru/showpost....3&postcount=44

:)

Abe1 08-24-2005 10:04 AM

Quote:

Originally Posted by mooj

A counter on how many users used a form? Sorry, not being added.

RMS-Chef 08-24-2005 07:11 PM

Well Abe, although this is working great for me, my users are never fully satisfied...lol

Again, not sure if it's possible or how involved it would be but they are looking to integrate the vB editing options/buttons (like the standard editor or WYSIWYG editor) for the "LONGQUESTION" fields.

Just thought I would throw that out there to see what you think.

Thanks.

Sovereign 08-24-2005 07:15 PM

Is there a "form requires moderation" setting? Because I had a form submitted today and vB wanted to moderate it even though all usergroups have no moderation.

Abe1 08-24-2005 07:18 PM

Quote:

Originally Posted by RMS-Chef
Well Abe, although this is working great for me, my users are never fully satisfied...lol

Again, not sure if it's possible or how involved it would be but they are looking to integrate the vB editing options/buttons (like the standard editor or WYSIWYG editor) for the "LONGQUESTION" fields.

Just thought I would throw that out there to see what you think.

Thanks.

You guys want a lot. I'll have to look into that.

Abe1 08-24-2005 07:20 PM

Quote:

Originally Posted by Sovereign
Is there a "form requires moderation" setting? Because I had a form submitted today and vB wanted to moderate it even though all usergroups have no moderation.

Do you have the latest update?

RMS-Chef 08-24-2005 07:27 PM

Quote:

Originally Posted by Abe1
You guys want a lot. I'll have to look into that.

Yeah, lol.

I was looking at Editor Templates>>toolbar_on
Example being one form I am using has 3 "longquestion" fields and even if I would have to create 3 duped but renamed "toolbar_on" templates with properly named texarea filelds I would do it. Or even if I had to enter the entire code for that template and change the textarea to "longanswer1" or whatever that would be fine.

I will play around a bit later tonight but chances are I will mess things up and end up waiting on you...lol

Thanks Abe.

Da Chang Gang 08-25-2005 03:27 AM

How are you suppose to remove the radio button questions?

Abe1 08-25-2005 04:07 AM

Quote:

Originally Posted by Da Chang Gang
How are you suppose to remove the radio button questions?

In the template.

Da Chang Gang 08-25-2005 04:42 AM

It's awesome. I just finished Installing it

Mr Chad 08-26-2005 04:28 PM

Quote:

Originally Posted by Abe1
In the template.

How do i add them? I added the varubles and did the template, it shows the question, and when i click submit it doesnt show the question.

Mr Chad 08-26-2005 04:36 PM

And what if you could make a form that does not only create a thread but also fills out the profile.

I meen its like editing your profile but it makes a thread too?

what do you think, its for new member and introduceing.

RMS-Chef 08-26-2005 06:33 PM

Quote:

Originally Posted by chatbum
How do i add them? I added the varubles and did the template, it shows the question, and when i click submit it doesnt show the question.

Be sure to also add/change the variables in the "_answers" template or it will not display the info.

Abe1 08-26-2005 08:33 PM

Quote:

Originally Posted by chatbum
How do i add them? I added the varubles and did the template, it shows the question, and when i click submit it doesnt show the question.

You realy need a little knoledge of PHP and HTML to modify this hack. Take a look around how things work there, and were varable are put.

Sovereign 08-26-2005 09:10 PM

Yes I have the latest version. I have to wait for someone to submit a form because my forms (as admin) don't get moderated...

Mr Chad 08-27-2005 02:43 AM

Quote:

Originally Posted by RMS-Chef
_answers

thats it, thank you

i also removed all the <b> from the questions in the template and put them in the php, and made the forum support HTML, so i could get the bold questions in the post.

Mr Chad 08-27-2005 05:42 AM

Quote:

Originally Posted by chatbum
thats it, thank you

i also removed all the <b> from the questions in the template and put them in the php, and made the forum support HTML, so i could get the bold questions in the post.

wow this has potential, you can really make the post look nice w/ sum HTML alterations.

Mr Chad 08-27-2005 05:42 AM

wow this has potential, you can really make the post look nice w/ sum HTML alterations.

He He Ha Ha

Is is possible to change the edior the big msg uses into an actual WYSIWYG box?

RMS-Chef 08-29-2005 07:01 AM

Quote:

Originally Posted by chatbum
wow this has potential, you can really make the post look nice w/ sum HTML alterations.

He He Ha Ha

Is is possible to change the edior the big msg uses into an actual WYSIWYG box?

Quote:

Originally Posted by RMS-Chef
Well Abe, although this is working great for me, my users are never fully satisfied...lol

Again, not sure if it's possible or how involved it would be but they are looking to integrate the vB editing options/buttons (like the standard editor or WYSIWYG editor) for the "LONGQUESTION" fields.

Just thought I would throw that out there to see what you think.

Thanks.

Quote:

Originally Posted by Abe1
You guys want a lot. I'll have to look into that.

^^^^^^^^^^^^^^^^^^^^^^^

Abe1 08-29-2005 09:42 AM

Quote:

Originally Posted by RMS-Chef
^^^^^^^^^^^^^^^^^^^^^^^

Sorry, I didn't work on yet.

RMS-Chef 08-29-2005 07:41 PM

Take you time Abe. You have already been a huge help.
I was simply pointing it out to chatbum. :)

wimminrule 09-08-2005 12:51 AM

Hi there - I completely LOVE your form. I am a complete newbie to PHP. I have all of it working except for one part, and was hoping someone could help me with it. :)

We want the form we created completed before we validate registrations. So, I modified the moderateuser in the phrase manager to say the following:

Thank you, {1}! We require one additional step in the registration process. Please click<a href="http://phenomsonline.com/board/newthread.php?do=form"> here</a> and tell us a little more about yourself.

instead of:

Thank you for registering, {1}. Your account has been submitted for moderation by an administrator and will be activated shortly. You will be notified by email when this happens. To return to the forums, click <a href="{2}.php{3}">here</a>.

My problem arises when the new user clicks on the link to the form. It doesn't carry over their username. Consequently, the post will not post to the thread that I have specified for it to reply to. Can anyone help me with this? I'd be most grateful.

Thanking you in advance!

Abe1 09-08-2005 01:43 AM

Quote:

Originally Posted by wimminrule
Hi there - I completely LOVE your form. I am a complete newbie to PHP. I have all of it working except for one part, and was hoping someone could help me with it. :)

We want the form we created completed before we validate registrations. So, I modified the moderateuser in the phrase manager to say the following:

Thank you, {1}! We require one additional step in the registration process. Please click<a href="http://phenomsonline.com/board/newthread.php?do=form"> here</a> and tell us a little more about yourself.

instead of:

Thank you for registering, {1}. Your account has been submitted for moderation by an administrator and will be activated shortly. You will be notified by email when this happens. To return to the forums, click <a href="{2}.php{3}">here</a>.

My problem arises when the new user clicks on the link to the form. It doesn't carry over their username. Consequently, the post will not post to the thread that I have specified for it to reply to. Can anyone help me with this? I'd be most grateful.

Thanking you in advance!

I dont think when you register vb automaticly logs you in. You have to then sign in. But I'll try to look for a solution for you.

As for the were the form info gets posted, i can't help you with out you showing me the settings you did and exacly what you want done and were it goes now instead.

wimminrule 09-08-2005 01:54 AM

Thank you for responding, Abe! Everything else is working perfectly, as far as the posting issue. I had it set to reply to a specific thread in our Adminstrator's Corner Forum. Before I modified the moderateuser to point to the form, if I manually entered the location of the form (http://phenomsonline.com/board/newthread.php?do=form) and completed it, it posted just fine.

Now, however, I have no idea where it goes with the Unregistered user. I assume that since it has no permission to post, it just goes off into neverneverland, although it says that the form completed successfully.

wimminrule 09-08-2005 01:56 AM

Oh, and I just tried registering a new member and not clicking on the link to the form, but instead going to the index, and it says I'm logged in, so it must be passing that (username) variable somehow, correct? TIA.


All times are GMT. The time now is 01:28 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.01708 seconds
  • Memory Usage 1,876KB
  • 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
  • (10)bbcode_code_printable
  • (11)bbcode_php_printable
  • (24)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