vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   FORM to THREAD/ FORUM/ POLL/ PM/ EMAIL - CUSTOMIZABLE FORMS - Mod Apps, Orders, News. (https://vborg.vbsupport.ru/showthread.php?t=66082)

gldtn 04-19-2005 02:23 PM

Quote:

Originally Posted by Erwin
1. You need to edit the PHP file and replace the title variable with a form variable. Not hard to figure out if you take a look at the code itself.

2. That's just a template edit. Somewhere in this thread someone posted a way to do this already.

Thanks, I got it to working the way I wanted to.. Sorry for not reading the whole thread at first. I was at work at the time.

whelck 04-20-2005 12:54 AM

Excellent work, Erwin. I've installed and it works great.

datainternet 04-21-2005 01:10 PM

Quote:

Originally Posted by Erwin
Anything is possible. :) You just add a redirect javascript to the template for the redirect I think.

Hi thank for help, but I didn't get ahead yet.

The problem is that there is no template for the redirect, it's only this line in the php file:

PHP Code:

$redirectoption "0";

$errormessage "Thanks!"//This is the thank you message 

You see that the hack by mtha is based on this hack.

Could you help me please?

Sorry but I'm just a beginner in php :(.

MFG datainternet

deb0 04-27-2005 03:32 AM

Nice work, no issues. i haven't tried the customization yet, but basic installation of flawless.

thx; Install!

SirJonathan 04-27-2005 05:51 PM

Has anyone had problems with the form not posting? I am using the form for a membership application on my site and using it to process 12 or so different questions. I've had a number of people say that they've submitted the form and then it never shows up in the approval area..

Anyone else had any trouble with this? Any suggestions?

-Jonathan

SirJonathan 05-02-2005 03:38 PM

I've had a couple more problems with this and its quite discouraging for the membership.. any ideas on why it would not actually be posting when people submit?

-Jonathan

Erwin 05-03-2005 03:21 AM

Quote:

Originally Posted by SirJonathan
I've had a couple more problems with this and its quite discouraging for the membership.. any ideas on why it would not actually be posting when people submit?

-Jonathan

It could be a million things. When you added questions, did you add the corresponding variables? You need to have a basic grasp of PHP to add more questions.

SirJonathan 05-04-2005 06:59 PM

Yes :). I added all the variables and for most people it works great. There are just some who have filled it all out, post, and it never shows up in the forum.

I've worked on the permissions and I'm pretty sure its not that.. You are required to register before you access the form. Can you think of any reasons why it would work for most people and then not for some?

-Jonathan

Razasharp 05-06-2005 02:39 PM

Hi Erwin

Great hack!

I hope you can help me :-)

Is there anyway to modify the hack so that I can have 3 form fields for the TITLE? I dont actually need to make use of the full hack as all I am trying to do it 'force' people to add certain things in the titles of one particular forum (which uses a seperate style so no probs in modifying it's templates).

so for eg I could have 3:

Field 1 [item for sale]: Grandfather clock

Field 2 [price]: ?400

Field 3 [city]: London

then the title for that thread would read: Grandfather clock ?400 London

In the threadbit template I did try to copy/duplicate:

PHP Code:

<!-- subject field -->
        <
table cellpadding="0" cellspacing="0" border="0" class="fieldset">
        <
tr>
            <
td class="smallfont" colspan="3">$vbphrase[title]:</td>
        </
tr>
        <
tr>
            <
td><input type="text" class="bginput" name="subject" value="$subjectsize="40" maxlength="85" tabindex="1" /></td>
            <
td>&nbsp;&nbsp;</td>
            <
td><img id="display_posticon" src="$selectedicon[src]alt="$selectedicon[alt]/></td>        </tr>
        </
table>
        <!-- / 
subject field --> 

but it only 'took' what was placed in the second field :-(

Would really appreciate some help on this..
Thanks in advance.

Spinball 05-07-2005 06:08 PM

Razasharp,
you need to input 3 fields - lets name them subject1, subject2 and subject3.
Then you'll need to edit the php script which processes your forum to set the subject
PHP Code:

$subject $subject1 " " $subject2 " " $subject3

I would put some validation in there, too, to make sure they entered all 3 fields.

Spinball 05-07-2005 08:50 PM

Erwin, I'm trying to integrate the standard vB posting message box with smilies and BBcode stuff etc.
I've had a stab based on the goings on in newthread.php and the newthread template, and have nearly got it going.
In the template I added $messagearea.
And in my form.php I added
PHP Code:

$phrasegroups = array('threadmanage''posting');
$specialtemplates = array(
    
'bbcodecache'
);
require_once(
'./includes/functions_newpost.php');
require_once(
'./includes/functions_editor.php');
require_once(
'./includes/functions_bigthree.php'); 

near the top and at the bottom
PHP Code:

construct_edit_toolbar($newpost['message'], 0$foruminfo['forumid'], $foruminfo['allowsmilies']); 

just before
PHP Code:

eval('print_output("' fetch_template('form_new') . '");'); 

The only problem is that the buttons (e.g. the B (bold) button) don't highlight when mouse overed and when clicking them, nothing happens.
Submitting the forum works ok using $message.
Can you help at all?

Erwin 05-10-2005 02:31 AM

Quote:

Originally Posted by Spinball
Erwin, I'm trying to integrate the standard vB posting message box with smilies and BBcode stuff etc.
I've had a stab based on the goings on in newthread.php and the newthread template, and have nearly got it going.
In the template I added $messagearea.
And in my form.php I added
PHP Code:

$phrasegroups = array('threadmanage''posting');
$specialtemplates = array(
    
'bbcodecache'
);
require_once(
'./includes/functions_newpost.php');
require_once(
'./includes/functions_editor.php');
require_once(
'./includes/functions_bigthree.php'); 

near the top and at the bottom
PHP Code:

construct_edit_toolbar($newpost['message'], 0$foruminfo['forumid'], $foruminfo['allowsmilies']); 

just before
PHP Code:

eval('print_output("' fetch_template('form_new') . '");'); 

The only problem is that the buttons (e.g. the B (bold) button) don't highlight when mouse overed and when clicking them, nothing happens.
Submitting the forum works ok using $message.
Can you help at all?

Ahhh... :) I wish I had time to look into that, but I don't. It's to do with the javascript files - make sure they are included. And they are being referred to correctly.

Bubble #5 05-13-2005 03:58 AM

We are using the standard form.txt but our submit and reset buttons won't center. No matter what we try to do they stay left aligned :( Is there anyway that we can fix this?

specting 05-18-2005 11:51 AM

Hello Guys:

I'm a starting user that need to instal this hack and have several questions:

- I have add the templates but I don't not How can I applied this templates to one Sub-forum? We have several subjects and each sub-forum has a diferent forms.

- In other hand we have several kinds of users: Administrator, moderator and standar user. We wnat that this form will be only applied to the standar users. How might I configurated the privileges?

Thank you very much fro your help in advance.

Javi.

DogGunn 06-02-2005 09:21 AM

I just get a blank screen.. Help?

Marco van Herwaarden 06-02-2005 12:47 PM

Quote:

Originally Posted by DogGunn
I just get a blank screen.. Help?

Double check your edits and use a good editor.

mustang_lex 06-02-2005 01:33 PM

I think this may be the answer to my questions.

Can this hack incorporate a photo upload requirement as well?

Erwin 06-02-2005 11:29 PM

Quote:

Originally Posted by mustang_lex
I think this may be the answer to my questions.

Can this hack incorporate a photo upload requirement as well?

There is a way to do it where you can add attachments via an edit.

mustang_lex 06-03-2005 09:17 PM

Ok. cool. how? :nervous:

mustang_lex 06-04-2005 01:13 AM

I don't get it i got a blank page. :ermm:

mustang_lex 06-04-2005 01:14 AM

Quote:

Originally Posted by DogGunn
I just get a blank screen.. Help?

Ya I did too??????????

mustang_lex 06-04-2005 01:19 PM

OK, now that I admit I'm new at this hacking thing, when you say add these templates you actually have to add them in Admin CP. Since I did that. Its all working great. Now I need to cusomize it. Here goes nothing :speechless:

mustang_lex 06-05-2005 11:44 PM

My form works great. Once question. My form is asking questions that the member may have entered in their profile. Such as hobbies for example. How can I have the text field that they will fill in on the form (such as hobbies) default to having the same text in their profile?

Erwin 06-06-2005 12:06 AM

Quote:

Originally Posted by mustang_lex
My form works great. Once question. My form is asking questions that the member may have entered in their profile. Such as hobbies for example. How can I have the text field that they will fill in on the form (such as hobbies) default to having the same text in their profile?

In the variable for the answer, put down $bbuserinfo[fieldx] where fieldx is the custom profile field number.

mustang_lex 06-06-2005 05:20 PM

Awesome!!! i added
Quote:

value="$bbuserinfo[field7]"
To my input fields (changing the fieldID) and its cool. When the person opens the app. if the questions were allready filled out in their profile, it will be automatically added in each text field. This ROCKS!!!!! Thanks

mustang_lex 06-06-2005 05:26 PM

I would like to incorporate an upload field. Is this possible. When the person submits, the photo is uploaded to a folder on the server, and the file title is displayed in the formanswer (mine inwhich is submitted to a group)

paul41598 06-07-2005 07:44 PM

Is it possible to put a form (this form) somehow in a new thread, and then users can view that thread, choose all the selections, submit it, and then write it out to a new thread? Almost like a question form in a thread, and then the results goto a result thread.

Spinball 06-08-2005 01:39 PM

Erwin,
do you think it would be possible to add the code to subscribe people to new threads if they have automatic subscriptions switched on?
For our use - the creation of classified adverts - it's particularly needed.
Thanks

paul41598 06-08-2005 07:19 PM

I have figured out a way to do dropdowns if anyone is interested

Cyricx 06-13-2005 12:57 PM

Hmmm, found a bug, when a user fills out a form and uses a ' like

Suzuhara's

It gives an invalid sql error

Database error in vBulletin 3.0.7:

Invalid SQL:
INSERT INTO vb3_thread(title, lastpost,
forumid, open, replycount,
postusername, postuserid, lastposter,
dateline, iconid, visible, attach)
VALUES
('Aged bowman Requests
Suzuhara's Care Package', 1118670743, 176,
1, 0, 'Aged bowman', 593,
'Aged bowman', 1118670743, 0,
1,
0)

mysql error: You have an error in your SQL syntax near 's Care
Package', 1118670743, 176,
1, 0,' at line 5

mysql error number: 1064

Spinball 06-13-2005 01:11 PM

Cyricx,
do you see
PHP Code:

$formtitle 

in the following bit of the hack where it inserts the thread?
PHP Code:

                    $DB_site->query("
INSERT INTO " 
TABLE_PREFIX "thread(title, lastpost, forumid, open, replycount,
postusername, postuserid, lastposter, dateline, iconid, visible, attach)
VALUES ('"
.addslashes(htmlspecialchars($bbuserinfo[username])).$formtitle', " TIMENOW ", $formforumid,1, 0, '" addslashes($bbuserinfo['username']) . "', $bbuserinfo[userid],
'" 
addslashes($bbuserinfo['username']) . "', " TIMENOW ", 0, 1,
0)
"
); 

well if you put
PHP Code:

" . addslashes($formtitle) . " 

instead, this will fix it.
Try it and see if it still breaks when you use a quote in the title.

mustang_lex 06-14-2005 07:25 PM

Although this bug hasn't been picked up by me yet. I like to fix it. and I have no clue what you ment at the last post spinball, Please send details. Thanks

Spinball 06-15-2005 08:33 AM

Quote:

Originally Posted by mustang_lex
Although this bug hasn't been picked up by me yet. I like to fix it. and I have no clue what you ment at the last post spinball, Please send details. Thanks

Sorry but I can't teach you PHP. I suggest you buy a PHP and MySQL book and learn it like I did. It will serve you well to best maintain your forum.

jeepinaround 06-15-2005 08:35 PM

Ok I had this working at one point in time. Some of the modifications I have done is...
Having the first question answered as the title to the thread
The option to redirect to the form when posting a new thread

For some reason now when you fill out the form and hit submit it creates a new thread with the answer to the first question as the title but nothing in the actual post it is blank other than a signature. I took all day from work and read every page of this thread and did not find a similiar problem. Does anybody have any ideas? The only thing I can think of that I did was upgrade to 3.0.7 since I originally had this working.

sdsvtdriver 06-16-2005 04:51 AM

I'd like to change the subject to be, say the answer to normal question1. how easy is this to change?

jeepinaround 06-16-2005 12:12 PM

It was easy, just some code to change. It is posted in this thread some where.

GiJoe 06-17-2005 02:05 AM

Quote:

Originally Posted by paul41598
I have figured out a way to do dropdowns if anyone is interested

Yes :nervous:

MrTchMan 06-18-2005 04:47 PM

I am having a problem. I have set up the form to require all information to be filled in. I was testing it out and if I complete the form it would give me a error message. When I hot the back button the error message stays up and I have to refresh the form before it will come back up and I loose all the information. Any Ideas???

Thanks

jeepinaround 06-20-2005 05:06 PM

Can no one help me out? After filling out the form I get a blank thread. No errors or anything.

Marco van Herwaarden 06-20-2005 07:49 PM

Please double check edits/templates.


All times are GMT. The time now is 10:19 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.01737 seconds
  • Memory Usage 1,864KB
  • 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
  • (12)bbcode_php_printable
  • (11)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (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