![]() |
Quote:
If you're asking me, I don't have a clue. Sorry. |
Quote:
I get the navbar when you are answering the questions but not once you submit and get redirected to the "thanks" message. |
Quote:
HTML Code:
<a href="<if condition="$foruminfo['forumid'] == 123">form123.php<else /><if condition="$foruminfo['forumid'] == 456">form456.php<else />newthread.php?$session[sessionurl]do=newthread&f=$foruminfo[forumid]</if></if>"> http://www.vbulletin.com/docs/html/m...e_conditionals |
Erwin,
I'm trying to make a form where someone can type the name of a website in $answer2 and then paste the link in $answer1 and it will link the word in the post. Here is my edited formanswers template: PHP Code:
PHP Code:
|
I got it to work, now my form.php files overwrites my newthread.
What I did was in the forumdisplay file I redirected the newthread commnd to point to filesCommand.php and in the redirection sent the current forum number. In the filesCommand.php I created multiple global arrays which stored command forum families for thread posting. I then did a CASE compare to see which form.php file should be called. Along with the form.php call I also sent the forum number and a series of on/off commands which enable and disable certain questions. This allows me to have a few generic form.php which are customized during call. The only draw back I have right now is changing the number and type of questions since an external file handles this, so all you really need is one form.php that can customize itself during call. If anyone is interested in the alterations I have made email me. I have a word document which highlighted all my edits. I have not put my comments in yet, but when I do I will post a link. Thanks for all you help guys. |
Quote:
My bad, add $navbar directly underneath $header in the STANDARD_ERROR template. :) |
Quote:
I am still very much a rookie at all this, but I can rebuild carburetors in my sleep. lol. Thanks for posting your findings!!! Take care, ~Chris |
Erwin-
I have discovered one small problem. If there is an apostrophe in the thread title, I get a MySQL error. |
Quote:
HTML Code:
<A HREF="$answer1">$answer2</a> The [url ] bbtag: HTML Code:
[url="$answer1" ] $answer2 [/url ] |
Quote:
|
Quote:
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 |
Replace:
'$formtitle' in the query with: '" . addslashes($formtitle) . "' |
Quote:
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 |
Newbie question: why do we have three files here? Can't everything be put in the form.php file?
|
The second file contains example templates thatyou will need to create in addition to the generic form.php file
|
Quote:
Yahoo |
Beautiful.
One minor typo in installation.txt tho.. Quote:
|
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!
|
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:
PHP Code:
PHP Code:
PHP Code:
|
Does anybody know how to fix my url problem? It outputs a url like this:
How can I get rid of the "? |
Anyone know if it would be possible to add something like a drop down menu that could list of admin defined forums in which the form would be submitted as a new thread?
I am helping a friend with writing style forum so he has many categories/forums to submit writing. Rather than creating 20 forms that are identical other than the forum they would be submitting to, it would be great to have one form with the user defining which forum to send it to as a new thread. |
Quote:
I am not sure if anyone else would do it this way but I have a lot of different forms and instead of typing the name of each form file name such as: Code:
<if condition="$foruminfo['forumid'] == 123">form123.php<else /> Code:
<if condition="$foruminfo['forumid'] == 123">form$foruminfo[forumid].php<else /> This brings me to another question, would it be possible to just have one if statement and use an array of some sort like: Code:
<if condition="$foruminfo['forumid'] == 123,124,125,126">form$foruminfo[forumid].php<else /> |
Erwin I would also like to add my vote for allowing attachments in the form should it be used to create a new thread. You mentioned earlier that this might be hard while simply uploading an image to the db wouldn't be as hard. Could you give us some example code on how to allow someone to uplaod to db and then show the template mod that would be needed to display that image in the thread?
I like a previous poster am trying to use this for a classifieds section. |
Nice modification. I have it working well on my site :)
I use my forms to just send an email to my address. Is it possible for it to send to multiple addresses? If so how? Thanks! |
Quote:
Look for this: PHP Code:
PHP Code:
Anyone figured out yet how to make a thread made by these forms search able? |
Quote:
|
Quote:
|
This is a long thread so I'm sorry if these questions have been asked, I skimmed through it but didn't see the answers...
What would I need to do to get the thread title to be the answer from the first question? I'm using it for recipes, the first question is the recipe name, I want that to be the thread title. Is there any way to use BB code? When I try putting it in the formanswers template I get an error when trying to save it. I want the questions to be in bold so that they stand out from the answers. This is an awesome hack, thanks! |
Quote:
http://"/;www.yahoo.com" Please let me know what I Can do to fix this... |
Does anyone have any idea how I can add a flood check to this?
|
Quote:
Find PHP Code:
PHP Code:
Quote:
Quote:
Also, make sure you use my hack (look a few posts earlier) if you want the form to count as a post. |
Erwin it appears you have some extra code at the bottom of the form template that throws it off
PHP Code:
|
Quote:
|
Quote:
|
Quote:
I can see it's not difficult, but I just need the time for it. I could just add an if/else statement so that they see a huge link to the form if they have < 1 post(if conditional), and if they have done the form, then they will see the normal forums view(else conditional). Thanks for the tip! ^^ |
Can I use this hack with the Article hack? I just want people to post articles in a specific format. How can I do that? Thanks a lot
|
Line 250 need to be fixed.
switch between lastposter and lastthread change PHP Code:
PHP Code:
|
Fixed my ZIP mtha - thanks.
|
Alright, PTL!!! That is awesome!!!! Thank God for you!!!
|
I have it set to PM me when someone fills out the form. Works great but something is wrong because I do not get an email saying I have a new PM....
|
All times are GMT. The time now is 11:56 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|