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)

PKRWUD 08-31-2004 09:42 AM

Quote:

Originally Posted by Erwin
Just add a \ in FRONT of any apostrophes you want to use IN the quotation marks.


I'm sorry, I wasn't specific enough. When ever someone fills out the form on my site, if they include an apostrophe in the box that becomes $formtitle (ie: I'm having car trouble), when they try to complete the form, they get the following error message:

Database error in vBulletin 3.0.0:

Invalid SQL:
INSERT INTO thread(title, lastpost, forumid, open, replycount,
postusername, postuserid, lastposter, dateline, iconid, visible, attach)
VALUES
('PKRWUD 'test'', 1093876723, 53,
1, 0, 'PKRWUD', 94,
'PKRWUD', 1093876723, 0, 1,
0)

mysql error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'test'', 1093876723, 53,


mysql error number: 1064

Erwin 08-31-2004 12:19 PM

Replace:

'$formtitle'

in the query with:

'" . addslashes($formtitle) . "'

PKRWUD 08-31-2004 01:16 PM

Quote:

Originally Posted by Erwin
Replace:

'$formtitle'

in the query with:

'" . addslashes($formtitle) . "'


I'm not terribly bright when it comes to this stuff, and didn't realize that I had to make that change in 3 queries in order for it to work, but I figured it out in a couple minutes. Thanks for taking the time to help! You ROCK!

Thanks again!

Take care,
~Chris

alqadir 08-31-2004 06:51 PM

Newbie question: why do we have three files here? Can't everything be put in the form.php file?

WAR 08-31-2004 07:03 PM

The second file contains example templates thatyou will need to create in addition to the generic form.php file

dndog 08-31-2004 08:56 PM

Quote:

Originally Posted by Erwin
Replace:

HTML Code:

<A HREF="$answer1">$answer2</a>
With:

The [url ] bbtag:

HTML Code:

[url="$answer1" ] $answer2 [/url ]
Remove the space in the url tags, but keep the space around $answer2.

I tried doing that, but the url came out like this:

Yahoo

kall 09-01-2004 02:08 AM

Beautiful.

One minor typo in installation.txt tho..
Quote:

3. Upload form.php

Just link to form1.php eg. http://www.yourforum.com/forums/form.php
:)

y2krazy 09-01-2004 11:21 AM

Is there a way to make a form that is created to be required by any new registration before they can do anything else? Such as a form that posts an introduction thread in a specified forum when someone registers, and it will be a requirement before said new member can do anything on the entire forum(almost like a "second" registration page). Maybe a re-direct once the registration goes through or something to the form before anything else can take place. Let me know if this can be done, or is even possible. Thanks!

Abe1 09-03-2004 12:18 AM

Thanks for the hack. I made 14 forms for my site. All leading to new threads.

I got 2 problems now. One, the posts don't count. Two, the posts don't get searched.

I fixed number one by my self.

find:
PHP Code:

$forum[forumid] = $formforumid

add before:
PHP Code:

                $DB_site->query("
                                UPDATE " 
TABLE_PREFIX "user
                                SET posts = posts + 1
                                WHERE userid = 
$bbuserinfo[userid]
                        "
); 

find:
PHP Code:

$forum[forumid] = $formreplyforumid

add before:
PHP Code:

                $DB_site->query("
                                UPDATE " 
TABLE_PREFIX "user
                                SET posts = posts + 1
                                WHERE userid = 
$bbuserinfo[userid]
                        "
); 

For the search problem, I couldn't come up with anything yet. Maybe someone else can.

dndog 09-03-2004 08:15 PM

Does anybody know how to fix my url problem? It outputs a url like this:

How can I get rid of the &quot?


All times are GMT. The time now is 10:51 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.01583 seconds
  • Memory Usage 1,755KB
  • 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
  • (2)bbcode_html_printable
  • (4)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
  • (2)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