1 percl Feb 08, 2009 16:06
3 percl Feb 08, 2009 20:51
First of all Thank You for your answer, i am working on it and it seems to go well..i just have a question: is there a way to use radion buttons or dropdown menus instead of text areas in the form? And if possible how do you work that out with the mail ?
Apart from that, how do i add more variables to the send_mail function ? >< sorry i suck ><
Thank you again :)
4 edb Feb 08, 2009 21:31
Yup. You're gonna love the answer: code it like it was html ;)
After you have a text field done, or heck just view the source of your contact message form, you can get a feel for what the HTML it makes is, then just duplicate it for your purposes.
Hi percl. Welcome to the forums. This will be easy breezy pretty pleasy ... assuming you're up to copying files and hacking the living snot out of 'em. ;)
Search the forums for "custom disp" because step one will be ... well it *should be* creating a situation where "disp=clanapp" has value. But you could just hack the hell out of the real contact form so that "disp=msgform" will do the job. The thing is then you lose the message form. So find how to do that - it is in the forums somewhere - and get 'er done. I'm pretty sure it is really easy - something simple in the skin but I always over-hack everything.
ANYWAY after that you would copy /skins/_msgform.disp.php as /skins/_clanapp.disp.php and get ready to edit it. Oh wait you gotta copy /htsrv/message_send.php as /htsrv/clanapp_send.php too, and get ready to edit that one. They work hand in hand is the thing.
That will take care of getting something in place that you can then turn into what you need. And here's a hint on all the hacking you'll be doing. Back in _clanapp.disp.php find this bit:
Most of the hacking you'll have to take care of yourself. Sorry, but I ain't into building the whole thing for ya. Anyway in _clanapp.disp.php find this:
and change it to this:
Over in clanapp_send.php find this bit at the bottom:
Now totally cheat it to send to the very specific person you want:
What that is doing is saying is producing the person's name as the variable "d". clanapp_send.php knows to look for "d" and knows it is a name. So you will want to have something like this probably:
Then you gotta teach clanapp_send.php what to do with "exp", but I'll leave all the good bits up to you. Helpful hint #2: keep an eye on "d" and "f" and "g" in the clanapp_send.php file to get an idea of how to put your new fields in the same sort of way.
Have fun!