Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Mod Name / Version - Contact Form 1.3
    Version 1.1 moves the AutoReply Subject String to the Language File - thanks Astaran
    Version 1.2 adds support for the $tbopen and $tbclose table wrapper in UBBThreads 6.2 - Thanks Dalantech
    Version 1.3 fixes a few template issues with Table Wrappers - thanks Dalantech.

Description - This replaces the email link in the footer with a link to a "contact us" page. This hides the email address from Spam Bots, and allows you to request all the needed info from your users (browser type, OS, nature of problem, etc...)

Sick of getting the generic "I can't login" or "I can't post" questions via email, only to have to write back and request more information (like Username, Browser type etc...)? This Contact Form will request as much information as possible... and even send along their IP address and User Agent info.

Features -
  • - Template Based, so you can easily modify the form
  • - Language File dependant, so you can easily modify the text, options and messages
  • - Offers them a link to the FAQ of their language before they ask their question
  • - Automatically grabs the username if the user is logged in
  • - Automatically grabs their email address if the user is logged in
  • - Verifies the email address they give for a response is valid
  • - Passes their IP Address and User Agent information to you
  • - Requests specific troubleshooting information
  • - Requires the email, type of problem, and details of problem to be filled in
  • - Choose to send emails to All Admins, or a list of specific users
  • - Choose to send an "auto reply" confiming that the email was received
  • - Auto reply message can be easily customized in the language file
  • - Uses the PHP's built in mail() command - no sendmail settings to configure
  • - If mail fails, user is given a message, and the direct email link to the admin
  • - Only touches one template file in threads - NO SCRIPTS ARE MODIFIED
  • - Preserves the "Cat" variable passed from Threads.
  • - Super Simple install
  • - Optional step so that Who's Online shows the user's location when they are filling out the form


Demo - Here.

Working Under - UBB.Threads 6.1.1 AND will work with 6.2

Pre-requisites - none

Author - Joshua Pettit aka JoshPet - www.joshuapettit.com
for discussions and bug reports come to www.ubbdev.com

Credits - Astaran, Dalantech

Files Altered - ubbt_footer.tmpl, (optional - online.php language file)

Database Altered - none

New Files - contactus.php, docontactus.php, /templates/default/contactus.tmpl, /templates/default/contactusconfirm.tmpl, /languages/english/contactus.php

Any other info - Using this will save you tech support time, as you'll have as much information as possible when people contact you. No more generic emails saying "I can't login". It will also reduce spam, as you admin email address is removed from the page (and hidden).
Also.... this is more of an add-on (all new files) than a mod. It's really just one line of template editing needed. No threads scripts are touched.

Thanks to Dave_L and Gardener for helping me to find glitched line returns in my templates.

Note: To use this mod with 6.1, you'll need to comment out all the "get_input" lines at the top of docontactus.php.
Attachments
60992-ContactForm1.3.zip (0 Bytes, 346 downloads)

Last edited by JoshPet; 02/25/2003 6:41 PM.
Sponsored Links
Daine #228312 11/25/2002 3:59 AM
Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
Looks nice, I'll try an install on my board.

Daine #228313 11/26/2002 2:52 PM
Joined: Mar 2002
Posts: 15
Newbie
Newbie
Offline
Joined: Mar 2002
Posts: 15
It appears to work with 6.0.1 if you add an entry for the database prefix in config.inc.php
$config['tbprefix'] = "w3t_";

This will save me a lot of time dealing with the users that think I'm psychic and know what id they use.

Thanks,
Greg

Daine #228314 11/26/2002 4:31 PM
Joined: Aug 2002
Posts: 1,191
Kahuna
Kahuna
Joined: Aug 2002
Posts: 1,191
It works very well first time.

Thanks a lot Josh!

Warm regards

Nikos


Nikos
glen #228315 11/27/2002 12:02 AM
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Great idea. Yeah, it's completely independent of threads...

So compatibility isn't much trouble.

Thanks for the tip.

Sponsored Links
Daine #228316 11/27/2002 1:43 AM
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
ooohh... this needs to be included in the base code, thanks Josh


- Allen wavey
- What Drives You?
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
I agree.

I've been using an older version of this (I never released because I was so new to it I was embarassed to show anyone my code ) for some time. It's worked very well... and cut down on all the spam and viruses I would get from the Contact Us Link.

Test something.... make a new email address that you use ONLY for the "Contact Us" link.
Give it a few weeks... you WILL get all sorts of spam, viruses etc.... to that address.

Guess I should have used Dave's spider food.

Maybe Rick will find it worthy.

Daine #228318 11/27/2002 2:03 PM
Joined: Nov 2000
Posts: 210
Member
Member
Offline
Joined: Nov 2000
Posts: 210
Very Cool thanks Josh!

Pappy

Daine #228319 11/30/2002 8:24 AM
Joined: Dec 2000
Posts: 1,471
Addict
Addict
Offline
Joined: Dec 2000
Posts: 1,471
Very nice one Josh!

Just one little improvement:
Put the subject of the AutoReply Mail also in the language file.

Maybe this one could be enhanced to send the mail to different recipients depending on the problem type?
Different AutoReplies for each problem type would also be an nice thing. I get many mails regarding the "invalid host" error message. The auto-reply could provide instructions for NIS etc.

Would be some kind of support ticket system, but it would save a lot of time i think.

Daine #228320 12/03/2002 2:04 PM
Joined: Nov 2001
Posts: 25
Junior Member
Junior Member
Offline
Joined: Nov 2001
Posts: 25
JoshPet-
thanks for the mod, i installed but nothing pops up, could ya help a noob out?

http://www.cascadeclimbers.com/threadz/contactus.php?Cat=

thanks

Sponsored Links
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
My guess would be that you haven't added the language file into the /languages/english directory and make sure it's readable.

Without the language file, it'll show a blank page.

Hope that helps.

Daine #228322 12/08/2002 9:27 AM
Joined: Nov 2001
Posts: 25
Junior Member
Junior Member
Offline
Joined: Nov 2001
Posts: 25
Thanks I'll try that out whilst i'm slacking at work today.

-n00b

Daine #228323 12/08/2002 10:47 AM
Joined: Nov 2001
Posts: 25
Junior Member
Junior Member
Offline
Joined: Nov 2001
Posts: 25
man o man, i've reinstalled all the files and still no luck. checked permissions as well. I really appreciate the mod/help josh!

w

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Updated First post in this thread to version 1.1

    Version 1.1 moves the AutoReply Subject String to the Language File - thanks Astaran and verifies that this works and is tested with a live UBB.Threads 6.2 site.

Demo here: http://www.measurection.com/forums/contactus.php



Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
This will work with 6.2.1.

Joined: Feb 2001
Posts: 2,268
Junior Member
Junior Member
Offline
Joined: Feb 2001
Posts: 2,268
Hey Josh,

I've modified your script and templates to use the $tbopen and $tbclose variables. Check out my contact link, and if you like it I'll zip up the files that I changed and email them to you

P.S. Had to do it cause it looks better with my table wrappers mod

Joined: Feb 2001
Posts: 2,268
Junior Member
Junior Member
Offline
Joined: Feb 2001
Posts: 2,268
BTW: IMHO your hack is so cool it should be a standard part of Threads...

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Thank you.... good point. That had been changed in 6.2.... but when I wrote it, I geared it towards user numbers to be ready for 6.2. Yeah, if you zip it, I'll add it to the first post.

Thanks.

Joined: Feb 2001
Posts: 2,268
Junior Member
Junior Member
Offline
Joined: Feb 2001
Posts: 2,268
Use something like Beyond Compare to see the changes I made
Attachments
65456-ContactForm1.1.zip (0 Bytes, 31 downloads)

Last edited by JoshPet; 01/19/2003 9:48 PM.
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Thanks.

I updated the documentation (giving you credit) and attached version 1.2 to the first post in this thread.....

Version 1.2 offers support for the $tbopen and $tbclose table wrappers in UBBThreads 6.2

Thanks Dalantech!

Joined: Feb 2001
Posts: 2,268
Junior Member
Junior Member
Offline
Joined: Feb 2001
Posts: 2,268
After all the help you've given me "thanks" is the last thing you need to say...

Joined: Jul 2002
Posts: 79
Power User
Power User
Offline
Joined: Jul 2002
Posts: 79
Sorry to be a pain but I have a problem
Everything looks really good until you click the Submit Query button. Then you get the following message:

"You must fill in an Email address, Choose a Problem Type, and enter the Details of your problem."

The fields are definitely filled in

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Try adding this to the docontactus.php file just after the require statements at the top.... let me know if it works. I think this has to do with Register Globals being on or off.

Code
<br />	$Useremail = get_input("Useremail","post");<br />	$Useragent = get_input("Useragent","post");<br />	$IPAddress = get_input("IPAddress","post");<br />	$ToEmail = get_input("ToEmail","post");<br />	$autoreply = get_input("autoreply","post");<br />	$Username = get_input("Username","post");<br />	$Email = get_input("Email","post");<br />	$Problem = get_input("Problem","post");<br />	$OpSys = get_input("OpSys","post");<br />	$Browser = get_input("Browser","post");<br />	$Version = get_input("Version","post");<br />	$Detail = get_input("Detail","post");<br />

Joined: Jul 2002
Posts: 79
Power User
Power User
Offline
Joined: Jul 2002
Posts: 79
Worked like a charm
Thanks Josh and sorry to put you to so much work lol!

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
No..... that get_input thing is new in threads 6.2.

It'll work without them if register globals is on or off but needs them under certain conditions.

My new stuff all has those lines in them.... these needed to be updated to be "standard".

I'll update the zip here in a moment. Thanks.

Joined: Aug 2002
Posts: 218
Member
Member
Offline
Joined: Aug 2002
Posts: 218
I added also a german contactus.php language File!

Sorry, I had complety forgotten to add the file.
Because of this I deliver now two

The first one is for the german DU which can be used in a hobby environment. contactsus_Du.php
The second one is for a company site and called contactus_Sie.php

Rename the one you want to use and copy it to /languages/german.

I've also made some changes to the browser and operating system list to fit on the german market
Attachments
66858-contactus_german.zip (0 Bytes, 15 downloads)

Last edited by jluerken; 01/31/2003 5:12 PM.
Joined: Aug 2002
Posts: 1,191
Kahuna
Kahuna
Joined: Aug 2002
Posts: 1,191
Thanks for that jluerken, but I didn't see the attachment in your post...

Warm regards

Nikos


Nikos
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Yes, thank you.

If you attach it, I'll include it in the zip.

Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
just saw this one, great idea


- Allen wavey
- What Drives You?
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Moved to finished mods.

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Updated to 1.3.

A couple of glitches that Dalentech fixed in the templates... relating to tablewrappers.

Thanks.

Joined: Jan 2003
Posts: 263
Member
Member
Joined: Jan 2003
Posts: 263
Also a small change should be made to the FAQ page. The email address on top of that page should be replaced by a link to the contact form.

Ciao !

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Ahh.... good point.

Thanks!

Joined: Feb 2001
Posts: 2,268
Junior Member
Junior Member
Offline
Joined: Feb 2001
Posts: 2,268

Joined: Sep 2002
Posts: 151
Member
Member
Offline
Joined: Sep 2002
Posts: 151
Here´s a language file in swedish!
Attachments
74909-contactus.php.zip (0 Bytes, 17 downloads)

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Gratzi!

Joined: Sep 2002
Posts: 151
Member
Member
Offline
Joined: Sep 2002
Posts: 151
[]JoshPet said:
Gratzi! [/]

You mean "tack"!

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
He he

Just got back from Italy.... I can only learn one alternate language at a time.

I have learned that "Thank you" in any language can get you a long way without knowing much else.

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Verified for 6.3 compatibility. Reposted here for new modifications index.


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Gizmo
Gizmo
Portland, OR, USA
Posts: 5,833
Joined: January 2000
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)