Previous Thread
Next Thread
Print Thread
Rating: 9
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

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. <img src="/forum/images/graemlins/grin.gif" alt="" />

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 - in use here at ThreadsDev.com. <img src="/forum/images/graemlins/wink.gif" alt="" />


Working Under: UBB.Threads 6.1-6.2-6.3-6.4

Mod Status: Finished

Any pre-requisites: none

Author(s): JoshPet

Date: 04/27/03

Credits: Astaran, Dalantech and Gregori for Sweedish Language File

Files Altered: /templates/default/ubbt_footer.tmpl, /languages/english/online.php (optional)

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

Database Altered: none

Info/Instructions:
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.
4/27/03 - Added sweedish language file provided by Gregori

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.

Note: To use this mod with 6.1 series, you need to comment out all the "get_input" lines near the top of the docontactus.php script. <img src="/forum/images/graemlins/wink.gif" alt="" />


Attachments
77861-ContactForm1.3.zip (0 Bytes, 258 downloads)

Last edited by Ian_W; 01/02/2004 4:42 PM.
Sponsored Links
Joined: Apr 2002
Posts: 1,768
Addict
Addict
Offline
Joined: Apr 2002
Posts: 1,768
Thanks for this, I finally got around to using it.

I found another place that needs to be changed if you're checking people's ages during new user registration. This is based on 6.3b3:

templates/default/newuser_checkage.tmpl

Replace:

{$ubbt_lang['CONT_INFO_DETAIL']} <a href="mailto:{$config['emailaddy']}">{$config['emailaddy']}</a>

with:

<a href="{$config['phpurl']}/contactus.php?Cat=$Cat">{$config['emailtitle']}</a>

Joined: Aug 2002
Posts: 1,191
Kahuna
Kahuna
Joined: Aug 2002
Posts: 1,191
Josh,

There is a change in 6.3 which we need to make. The FAQ's point now to the faq.php and not the faq_<language>.php.

You can change the languages/english/contactus.php as
Code
<br />$ubbt_lang['CON_BODY1'] = "If you are unable to find the answer to your question in our <a href=\"{$config['phpurl']}/faq_";<br />

to
Code
<br />if ($VERSION == "6.3") {<br />$ubbt_lang['CON_BODY1'] = "If you are unable to find the answer to your question in our <a href=\"{$config['phpurl']}/";<br />} else {<br />$ubbt_lang['CON_BODY1'] = "If you are unable to find the answer to your question in our <a href=\"{$config['phpurl']}/faq_";<br />}<br />

and also the contactus.php as
Code
<br />   $faqlanguage = $user['U_Language'];<br />   	if (!$faqlanguage) {<br />   		$faqlanguage = $config['language'];<br />   	}	<br />

to
Code
<br />if ($VERSION == "6.3") {<br />   $faqlanguage = "faq";<br />} else {<br />   $faqlanguage = $user['U_Language'];<br />   	if (!$faqlanguage) {<br />   		$faqlanguage = $config['language'];<br />   	}	<br />}<br />

That should do it.


Nikos
Joined: Apr 2002
Posts: 1,768
Addict
Addict
Offline
Joined: Apr 2002
Posts: 1,768
Thanks for the FAQ correction.

It might be better to use a more flexible version check:

if (preg_match('/^6\.3/', $VERSION)) {

Then it will continue to work for 6.3.1 (if there is one).

Joined: Feb 2002
Posts: 2,286
Veteran
Veteran
Joined: Feb 2002
Posts: 2,286
or 6.3.2


Fans Focus - Focusing on Fans of Sport

(Okay - mainly football (the British variety wink at the moment - but expanding all the time....)
Sponsored Links
Joined: Mar 2003
Posts: 118
Journeyman
Journeyman
Offline
Joined: Mar 2003
Posts: 118
I am curious. I got the contact form to work. I was just wondering how you go about changing the "[email protected]" in the top of the FAQ.php file to the link for the contact form.

In the language/english/faq.php file I tried putting in this

<a href="{$config['phpurl']}/contactus.php?Cat=$Cat">{$config['emailtitle']}</a>

in replacement of this

<a href="mailto:{$config['emailaddy']}">{$config['emailaddy']}</a>

but i end up with some sql errors. Can anyone help with this?

I am wanting to keep the same Contact links through out the site so they all get the form.

-Buddy

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
You were very close.... since it's inside a string (inside quotes) you need to comment out the quote marks with a backslash \ like this:

<a href="{$config['phpurl']}/contactus.php?Cat=$Cat">{$config['emailtitle']}</a>


That should do it.

Joined: Mar 2003
Posts: 118
Journeyman
Journeyman
Offline
Joined: Mar 2003
Posts: 118
Great, worked like a charm.

Thank you.

Joined: Apr 2002
Posts: 474
Enthusiast
Enthusiast
Offline
Joined: Apr 2002
Posts: 474
Josh, I for some reason this never sends any mail to me. I can't figure out why?
Someone said once that it is a PHP configuration but I need instructions on how to fix this.
I need to do this ASAP as I got over 1000 junk mail sent to my email in one day.

thanks stephen

Joined: Jul 2003
Posts: 26
User
User
Joined: Jul 2003
Posts: 26
Great SPAM Killer. Keeps your email address off the site so the screen scrapers don't find it.

And makes sure that when people want to contact you, you get enough information to start with.

Sponsored Links
Joined: Sep 2002
Posts: 151
Member
Member
Offline
Joined: Sep 2002
Posts: 151
This i such a great mod.

Will it work with 6.4?

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Yes works just fine in 6.4

Joined: Jul 2001
Posts: 808
Coder
Coder
Joined: Jul 2001
Posts: 808
looks good. I put a german translation for contactus.php in my attachment.
Attachments
103789-contactus.php.txt (0 Bytes, 40 downloads)

Joined: Jan 2003
Posts: 263
Member
Member
Joined: Jan 2003
Posts: 263
Tiny thing:

Change in contactus.tmpl:
this:
<td><input type="submit" name="{$ubbt_lang['CON_CONTINUE']}" border="0"></td>

to:

<td><input type="submit" name="buttsubmit" value="{$ubbt_lang['CON_CONTINUE']}" class="buttons"</td>


Joined: Apr 2002
Posts: 474
Enthusiast
Enthusiast
Offline
Joined: Apr 2002
Posts: 474
This has been a real time saver. Is it possible that in the email that is sent to the admin
to contain a link that if I am logged in as admin and I click on the link in my email I am taken to the user info? right now I have to copy and paste their email and it can get tedious.

Joined: Sep 2003
Posts: 67
Power User
Power User
Joined: Sep 2003
Posts: 67
What a great mod, thanks Josh


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
isaac
isaac
California
Posts: 1,157
Joined: July 2001
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 20240430)