vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   FORM TO FORUM/ THREAD/ PM/ EMAIL - CUSTOMIZABLE FORMS for Mod Apps, Orders, News (https://vborg.vbsupport.ru/showthread.php?t=53269)

Erwin 06-14-2003 02:46 AM

Quote:

Today at 01:36 PM Pollo said this in Post #119
Since this is hardcoded in the php file, I'm a bit confused as to how to achieve this (probably simple) modification:

//FORUM TO POST NEW THREAD IN
$formforumid = "131";

Above is original, but what I'd like is for users to be able to choose between 4 forums (submit the thread to the most appropriate forum). For example:

The forum is about motorized vehicles. Part of the entire board (4 forums) would be a place where users can submit this form (this hack) and choose if they are telling us about their motorcycle, car, boat, other and it would be submitted to the proper forum (motorcycle, car, boat, other).

If I can't get a drop down, I suppose I could just have multiple forms, and users would make the choice before they even see the form. In some ways that might work better, but I just wanted to know if it is possible to do this.

Great hack!


Can be done.

Remove the line:

$formforumid = "131";

Then, edit the template, and make a dropdown menu, with the select values being "formforumid" (using plain HTML).

This way, the user can choose which forum that the form goes into, by choose the forumid as formforumid. It's not hard to do at all.

Pollo 06-14-2003 02:57 AM

Danke! I'll give it a go and let you know how it works. I was actually looking for something similar to this, but wasn't sure how to put it all together. Far as I can tell, for these 4 forums, I would go to the admin cp under User Groups > Forum Permissions and choose a forum (do this for all 4 forums eventually), and 'Use custom settings:' and then check off 'no' to 'Can post new threads' so that this form will be the only way users will be able to start threads. Sound about right? I might be missing something.

Erwin 06-14-2003 03:07 AM

Yes, that's right. :)

tomjinx1 06-14-2003 04:01 AM

Erwin... great hack... how hard would it be to have the answers go into the database instead of a forum thread?

Since I can't get text boxes to work with the registration form for VB I was wanting to have the users answer go into the database and then me pull them out and displaying them in a memberslist type situation. I have the memberslist php file created but I'm can't figure out how to get these answers to go into the database...

Erwin 06-14-2003 04:34 AM

Quote:

Today at 03:01 PM tomjinx1 said this in Post #124
Erwin... great hack... how hard would it be to have the answers go into the database instead of a forum thread?

Since I can't get text boxes to work with the registration form for VB I was wanting to have the users answer go into the database and then me pull them out and displaying them in a memberslist type situation. I have the memberslist php file created but I'm can't figure out how to get these answers to go into the database...

You don't need my hack. :) All you need is to create a custom user profile field, note down the custom profile field id, and make a form that inserts data into that custom profile field. If you make it editable by the user, the user can even do it in their profile. It would be easy to list that out in a memberlist fashion.

Conundrum9 06-23-2003 01:10 PM

This hack is great and is exactly what I was looking for.

However, is it possible to have users fill in who they want to PM the form too rather then having it be sent to a specific userid every time? (like the field in a normal PM newmessage)

proxyMX 07-09-2003 06:36 PM

I would install this but i need to know if these features are planned

+ Easy multiple form creation from the admin cp for mutliple forums

I need different forms for four different forums, anyway i should go about this?

proxyMX 07-09-2003 07:12 PM

This hack sucks
THe form isnt as customisable as it claims, youve got to have the radio areas and everything

my form dosent NEED radio buttons, but they show up, and it seems i can only make one text box when i need like 10

proxyMX 07-09-2003 07:16 PM

what do i have to do to get my form to display properly

http://boo.hosting-talk.net/submitmovie.php

proxyMX 07-09-2003 07:34 PM

ALSO, its now posting blanks on my forums, ill stick to making my users copy a form and paste it into a new thread i think,

Im really bugged, this couldve been a great hack, but it means not only Editing

+ The Form itself but also 2 Templates for every form i post, then when it displays properly, it dosent even post properly.

Uch im still desperate for a similar form system

retsell 07-09-2003 08:15 PM

Fatal error: Call to undefined function: gettemplate() in /home2/cms/public_html/forums/form1.php on line 214

Any ideas?

PixelFx 07-09-2003 09:56 PM

proxyMX,
the hack is awesome, but takes you knowing how to edit html to make the forms the way you want. It has a lot of freedom. The form template is just an example of what you can do, you as a webmaster need to make the form specific for your site.

Erwin
gave you the fishing pole the tactle and the gear need to make forms, the exmaples are very clear and easy to install and setup. Rather than flaming the forum/hack try making your form, if you don't know html goto w3schools.com and read it for an afternoon.

Peace

MetroSports82 07-10-2003 01:22 AM

^ditto, yea exactly what he said. :)

proxyMX, this hack works perfectly, and its as user friendly/customizable as it gets around here. but...to say that it "sucks" shows absolutely no class, mind you giving the least amount of credit to the creator of this hack (Erwin)...seriously, was that even necessary? that was not cool... :dead:

proxyMX 07-10-2003 01:57 AM

Well i just think its been over-rated, its not perfoming as it said it would, i know html and some php, and ive had to edit ALL of the files not just one for it even to display properly, and now the thing dosent even post. ive given up and taken it off

Erwin 07-10-2003 06:44 AM

No comments. :)

proxyMX 07-10-2003 09:42 AM

Erwin, im not dissing you man, you make some great hacks, its just this one dosent do "What is says on the box" Alot of people here have had problems with it posting, and ive had to edit ALL the files just to get one form to display properly.

The instructions say the only file you need to edit is the php file which is nonsense, if you do theres radio buttons etc everywhere, I suppose its because im DESPERATE for a hack like this, and have been waiting for one for quite some time. Instead ive got a half-baked version :(

Talisman 07-10-2003 05:49 PM

Erwin, this hack really rocks. I love it..... and I'm using it to create a bunch of forms for different purposes, and even setting up multiple templates to choose from so we can do similar forms for the same function and still vary the layout sometimes, too, (not just changing the variables) so they don't all look the same.

I did run into a problem I can't figure out though...... and I need your help (in a hurry, if you please?)...

On a registration form, our first question asks the member's username. But we have the form fill that in automatically using $bbuserinfo[ username] -- since the system already knows who they are.

But in the third question, we ask them to enter their Player Name (for the event they're registering for). In most cases, the Player Name and their Username are identical. And any time the $answer3 text field matches $bbuserinfo[ username], the silly thing shows up totally blank.

How do I get around this?

Talisman 07-10-2003 06:13 PM

Btw.... for the guys having problems getting the forms they want set up the first time. Once you get through that part once or twice, it's really easy to design the custom forms you want, then just rename new files and change the content on your variables every time you use it after that.

As soon as I get this registration thing of mine online, I can show that as an example, along with an expanded version of a moderator application form we're using now. And I'm sure others can help you customize your files/templates how you want them if you tell us what you need.

PixelFx 07-10-2003 06:56 PM

it's an awesome hack, so far I haven't had any problems, and it does everything my mods needed. It's a real time saver thank you.

Talisman 07-10-2003 07:57 PM

Okay, here's a simple one. Frustrating though, because I thought I should be able to figure it out myself... :(

Anyway, when the form posts as a reply to an existing thread, how do I get this to increment the thread's count and mark the post as "new?"

Erwin 07-12-2003 01:44 AM

Quote:

Yesterday at 04:49 AM Talisman said this in Post #137
But in the third question, we ask them to enter their Player Name (for the event they're registering for). In most cases, the Player Name and their Username are identical. And any time the $answer3 text field matches $bbuserinfo[ username], the silly thing shows up totally blank.

How do I get around this?

That's weird... if you'ven put the variables in the right place there should be no blanks. Did you do this:

$answer3="$bbuserinfo[username]";

??

Quote:

Anyway, when the form posts as a reply to an existing thread, how do I get this to increment the thread's count and mark the post as "new?"
This should be done automatically. The thread count should go up, and the post marked new automatically.

Talisman 07-12-2003 03:11 AM

Quote:

Today at 07:44 PM Erwin said this in Post #141
That's weird... if you'ven put the variables in the right place there should be no blanks. Did you do this:

$answer3="$bbuserinfo[username]";

Well....... no, I didn't do it that way. Guess that's why it didn't work. ;)

In my "post" template, I had it down like this:

$question1: $bbuserinfo[ username]

$question2: $answer2

$question3: $answer3

$question4: $answer4

---------------------------

Though I hard-coded the $bbuser-thing into the "post" template and didn't input an answer for question 1 in the main form template ... I didn't use an $answer1 variable at all, so I had not defined $answer1 in the php file.

The form that posted looked like this:

(1) Your Username: Talisman

(2) Your first name: Susan

(3) Your boat name:

(4) Your country flag: USA

Every time I tested it, the boat name ($answer3) came up blank when it exactly matched the content of my $bbuserinfo[ username] variable.

I confirmed this by entering a different boat name (that didn't match my username). When the $answer3 boat name was different from the username..... it worked.

Now, I'll go try it the way you showed, Erwin.

Be back soon to let you know how that turns out.

Cheers!

retsell 07-12-2003 03:34 AM

Erwin, can you help me out with why I would get the following error message when trying to run form1.php?

Fatal error: Call to undefined function: gettemplate() in /home2/cms/public_html/forums/form1.php on line 214

The form is located at:

http://forums.classicmortgageservices.net/form1.php

I haven't even begun to customize it, Im just trying to get it working. I added the templates exactly as the instructions said...

Thanks,
Ryan

Talisman 07-12-2003 04:18 AM

I can see that problem, retsell.

Your error message points to "/forums/form1.php" but the link you show uses a different directory structure for your "forums" subdirectory.

retsell 07-12-2003 04:22 AM

Quote:

Today at 06:18 AM Talisman said this in Post #144
I can see that problem, retsell.

Your error message points to "/forums/form1.php" but the link you show uses a different directory structure for your "forums" subdirectory.


Im confused.
http://www.classicmortgageservices.net/forums/form1.php

its the same as:

http://forums.classicmortgageservices.net/form1.php

forums.classicmortgageservices.net is just a subdomain that points to /forums

Am I not understanding you?

Talisman 07-12-2003 04:30 AM

Ok, sorry for the confusion, retsell...... I thought the link would be literal. Was going for a solution that was too obvious, I guess. :(

proxyMX 07-12-2003 04:35 AM

this hack scares me, I really REALLY want to use it, but its not working correctly, shame because its JUST what i need

Erwin 07-12-2003 04:40 AM

Put the form1.php file in the same directory as your forums.

It cannot find the nopermission function ie. cannot find your global.php

proxyMX 07-12-2003 04:41 AM

woooooh hold the press! i finally got this godamn thing working

thirteen template edits and ten file edits down the line, duno what the problem was.

anyways is their anyway of making one of the submitted fields the title of the thread?

Erwin 07-12-2003 04:41 AM

Quote:

07-10-03 at 08:42 PM proxyMX said this in Post #136
Instead ive got a half-baked version :(
This hack is not half-baked. If you cannot install it, please don't blame the hack or the hacker. I've tried making it as simple as possible. It's for you to customize and change - you are never meant to use it without modifying it to suit you forums.

proxyMX 07-12-2003 04:44 AM

yeah sorry, it was late, i was on my period, wait im a guy, i cant use that excuse...eeek!

Anyways, ive finally figured out the problem, a few bad named variables. How simple. Doh.

And i was wondering if there was anyway to make it so when a user submits the form, that the thread is named after a selected submitted field?

Erwin 07-12-2003 04:48 AM

Yes, can be done.

In form1.php (or whatever you've called it),

FIND:

PHP Code:

".addslashes(htmlspecialchars($bbuserinfo[username]))." $formtitle 

Replace with:

PHP Code:

$answer1 

Or whatever the variable is. :)

Remember, do the above THREE TIMES - you need to change the title three times in the code.

retsell 07-12-2003 04:50 AM

the file is in the same dir.

Erwin 07-12-2003 04:52 AM

I can't explain it, retsell - I suggest re-installing the hack to see if it works - it does work, but I don't know why you are getting that server error.

proxyMX 07-12-2003 04:53 AM

thanks erwin
keep making brilliant hacks, dont listen to crackpots on methadone like me.

retsell 07-12-2003 04:54 AM

Quote:

Today at 06:40 AM Erwin said this in Post #148
Put the form1.php file in the same directory as your forums.

It cannot find the nopermission function ie. cannot find your global.php


They're together.

[Why did you post the whole PHP file in this post? What's the point of that? - Erwin]

retsell 07-12-2003 04:56 AM

Quote:

Today at 06:52 AM Erwin said this in Post #154
I can't explain it, retsell - I suggest re-installing the hack to see if it works - it does work, but I don't know why you are getting that mysql error.

it's a mysql error?

Erwin 07-12-2003 05:01 AM

It's an undefined function error - the gettemplate function could not be found. Makes no sense.

Also, there is no point reposting the whole PHP file out like that for unlicensed users to copy and use. They can't see [php] tag code, but you reposted the whole file in normal text. What was the point of that?

Anyway, like I said, reinstall the hack following the instructions exactly.

proxyMX 07-12-2003 05:06 AM

Ret, its probobly something simple like mines, check all the names of all the templates and the files and then check all the variables and make sure they all match up!

Talisman 07-12-2003 05:25 AM

Geez, you guys can sure cover a lot of ground while I'm away.

Erwin, that $bbuser-thing worked brilliantly. Thanks for telling me it needed to be defined as a variable in the php file.

Don't know why the forum/thread post counts don't update when the submitted form posts as a reply. When I click the update counters links in the ACP, everything shows up like normal. Wonder what's wrong with that.

I saw a few pages back that we can check to make sure the member has the minimum post count required before the form submits.... I'll use that for our moderator app.

We'd also want the form to check the member's join date. We don't want new members joining one day and applying to become a moderator a day later. We'd rather make them wait two weeks or a month and also make sure they've made 10 or 25 posts before they can apply.


All times are GMT. The time now is 05:16 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.02791 seconds
  • Memory Usage 1,843KB
  • 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_php_printable
  • (9)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