Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Contact Us Email Feedback Form (with IP address & status of sender) Details »»
Contact Us Email Feedback Form (with IP address & status of sender)
Version: 1.00, by Erwin Erwin is offline
Developer Last Online: May 2013 Show Printable Version Email this Page

Version: 2.3.x Rating:
Released: 07-31-2002 Last Update: Never Installs: 77
 
No support by the author.

Contact Us Email Feedback Form (with IP address) Version 2.3
-------------------------------------------------------------------------

Reason:
--------------

This hack allows members and guests to email you the administrator using an online email form. This way, you keep your email address hidden from spambots that crawl sites for email addresses.

When members use the form, their name and email address gets automatically inserted. Guests will have to fill out the name and email boxes. If they are not filled, the email will not be sent. Users get to choose from a list of subjects, or they can enter their own email subject if they choose "Other".

If the member who emails you is Unregistered or Not Logged In, the email will tell you that the Sender is Unregistered or Not Logged In.

If the member who emails you is Registered, then the username and email address of the member on file will be sent to you as well - this way, even if a registered member tries to pretend to be another member or put in a fake address, you will know who the member is.

The email sent to you will have the IP address and if available, the Host Name of the sender, with a link to click that will automatically search the database for members sharing that same IP - good for tracking down people sending you abusive emails using the form.

Example of an email from a Registered Member:
----------------------------------------------------------

Quote:

******* Delete this section before replying ********

IP address of sender: 123.123.12.12
Host name: test.hostname.com
Click below to search for members with same IP:
http://www.yourforums.com/forums/adm...=123.123.12.12

Registered Member - Username: Erwin
Email on file: admin@myforums.com

******* Delete this section before replying ********

Hi,

Test message here...

- Erwin


Email from a Unregistered User or Member who is Not Logged In:
----------------------------------------------------------------------

Quote:

******* Delete this section before replying ********

IP address of sender: 123.123.12.12
Host name: test.hostname.com
Click below to search for members with same IP:
http://www.yourforums.com/forums/adm...=123.123.12.12

Not Logged In or Unregistered User


******* Delete this section before replying ********

Hi,

Test message here...

- Erwin


The form is web-based, and the feedback is emailed to you, without ever revealing your admin email address if you want to keep that private.


Screenshot:
-----------------------




Installation:
-------------------

Easy. There are no file changes, 3 new templates to make, and 2 files to upload.

Create the 3 templates based on the txt files - name the templates after the file names, and copy the content of the txt files into the templates.

contact
contact_error
contact_sent

Then upload the following files into your forums directory.

contact.php

Last thing you need to do is to place this link anywhere on your site, or in your contact link field in your vB Admin Options. I have placed mine in the footer template (change it to your forums URL).

<a href="http://www.yourforums.com/yourforums/contact.php">Contact Us</a>

And you're done!

Enjoy!


Version 2.0
------------------

Added the option for users to choose from a list of subjects. Also fixed a minor title bug. If the option "Other" is chosen, but no title filled out in the optional text box, a blank field error message will be shown.

To upgrade from Version 1.2 - just copy the new "contact.php" and "send.php" over the old files, and replace the "contact" template with the new one.

Feel free to add more email subject titles by modifying the "contact" template.

Version 2.1
-------------------

Added - IP address and if available, the Host Name of sender in the email sent to you, with a link to search the database for members with the same IP address in the email (in case of people sending you abusive emails using the form)!

Version 2.2
-------------------

Added - if the sender is a Registered Member the email will contain the username and email on file, regardless of what the sender puts in the fields. If the sender is Not Logged In or Unregistered, the email will let you know.

Version 2.3
-------------------

Tidied the code up, removed the need for send.php.


Upgrading
-------------------

- to upgrade from version 1.2 - upload the new contact.php and send.php files, and replace the "contact" template with the new one.

- to upgrade from version 2.0 - upload the new send.php

- to upgrade from version 2.1 - upload the new send.php

- to upgrade from version 2.2 - upload the new contact.php, delete send.php (not needed), replace "contact" template with contact.txt



Latest hack version 2.3 below:

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #92  
Old 08-24-2002, 04:03 PM
Vinney Vinney is offline
 
Join Date: Nov 2001
Posts: 68
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hi,

how do i get this, only a certain user group can use it, and others get a custom error message ( using a template ) ?

there group i want to only access this is:

usergroupid=2

could anyone help me please ?

thanks for your time - great hack.
Reply With Quote
  #93  
Old 08-24-2002, 09:18 PM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Vinney
hi,

how do i get this, only a certain user group can use it, and others get a custom error message ( using a template ) ?

there group i want to only access this is:

usergroupid=2

could anyone help me please ?

thanks for your time - great hack.
Sure, but this means guests cannot contact you using the form.

Open contact.php.

Find:

PHP Code:
require('./global.php'); 
Add BELOW:

PHP Code:
if ($bbuserinfo[usergroupid] !=AND $bbuserinfo[usergroupid] !=AND $bbuserinfo[usergroupid] !=5) {
eval(
"standarderror(\"".gettemplate("error_nocontact")."\");");
exit;

Make sure you add the usergroupid's of your staff usergroups in there too so they can use the form.

The make a new template called:

error_nocontact

Add this as contents:

Code:
You have no permission to access the contact form.
Or whatever you want.

Done.
Reply With Quote
  #94  
Old 08-24-2002, 10:29 PM
Vinney Vinney is offline
 
Join Date: Nov 2001
Posts: 68
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Erwin


Sure, but this means guests cannot contact you using the form.

Open contact.php.

Find:

PHP Code:
require('./global.php'); 
Add BELOW:

PHP Code:
if ($bbuserinfo[usergroupid] !=AND $bbuserinfo[usergroupid] !=AND $bbuserinfo[usergroupid] !=5) {
eval(
"standarderror(\"".gettemplate("error_nocontact")."\");");
exit;

Make sure you add the usergroupid's of your staff usergroups in there too so they can use the form.

The make a new template called:

error_nocontact

Add this as contents:

Code:
You have no permission to access the contact form.
Or whatever you want.

Done.
whats does the " exit; " do ? is that needed ?

also is it possible to place the group in an array.

Am a newbie at php, bit am trying different methods to get the same result at the moment.

i have :

PHP Code:
<?php
error_reporting
(7);
include (
"../../mainfile.php");
$index 1;
global 
$Pmenu,$breadcrumb;
$Pmenu="";
$breadcrumb="Account Activation";
$defaultmessage "Your message here... \n\n - $bbuserinfo[username]";
$defaultemail "$bbuserinfo[email]";
$unwantedgroups = array('1''6''11');
getvbpvars();
include(
"header.php");
if (
$bbuserinfo[usergroupid] == $unwantedgroups) {
eval(
"dooutput(\"".gettemplate('contact_error')."\");"); 
} else {
eval(
"dooutput(\"".gettemplate('contact')."\");");
}
include(
"footer.php");
?>

now i dont get any errors when running this, but the contact template is always displayed, even when am using a group id of 6 - so this dont work for some reason

i can get it to work, using this :

PHP Code:
<?php
error_reporting
(7);
include (
"../../mainfile.php");
$index 1;
global 
$Pmenu,$breadcrumb;
$Pmenu="";
$breadcrumb="Account Activation";
$defaultmessage "Your message here... \n\n - $bbuserinfo[username]";
$defaultemail "$bbuserinfo[email]";
getvbpvars();
include(
"header.php");
if (
$bbuserinfo[usergroupid]==|| $bbuserinfo[usergroupid]==|| $bbuserinfo[usergroupid]==11) {
eval(
"dooutput(\"".gettemplate('contact_error')."\");"); 
} else {
eval(
"dooutput(\"".gettemplate('contact')."\");");
}
include(
"footer.php");
?>
why dont my array version work ?
Reply With Quote
  #95  
Old 08-25-2002, 07:38 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That question belongs in the PHP forum. I have no idea why it wouldn't work.
Reply With Quote
  #96  
Old 08-25-2002, 10:46 AM
Vinney Vinney is offline
 
Join Date: Nov 2001
Posts: 68
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

it's mean again.

How do you get 'User Profile Fields' to be displayed. this is what i have :

PHP Code:
<?php
error_reporting
(7);
include (
"../../mainfile.php");
$index 1;
global 
$Pmenu,$breadcrumb;
$Pmenu="";
$breadcrumb="Contact Helpdesk";
$defaultmessage "Dear Helpdesk... \n\n - $bbuserinfo[username]";
$defaultemail "$bbuserinfo[email]";
$defaultmembership "$post[field5]";
$defaultexpiry "$post[field9]";
//getvbpvars();
include("header.php");
if (
$bbuserinfo[usergroupid]==|| $bbuserinfo[usergroupid]==|| $bbuserinfo[usergroupid]==11) {
eval(
"dooutput(\"".gettemplate('error_nopermission_loggedout')."\");"); 
} else {
eval(
"dooutput(\"".gettemplate('helpdesk')."\");");
}
include(
"footer.php");
?>
notice :

PHP Code:

$defaultmembership 
"$post[field5]";
$defaultexpiry "$post[field9]"
then in my template i have :

<tr>
<td bgcolor="{firstaltcolor}" align="left" valign="top" nowrap><normalfont>Your
m/ship N<font face="Times New Roman">?</font>:</normalfont></td>
<td bgcolor="{firstaltcolor}" align="left" width="50%">
<input type="text" name="mem" size="4" class="bginput" tabindex="1" value="$defaultmembership"></td>
<td bgcolor="{firstaltcolor}" align="left"><b><font color="#FF0000">
*</font></b></td>
</tr>
<tr>
<td bgcolor="{secondaltcolor}" align="left" valign="top" nowrap><normalfont>Your
expiry date:</normalfont></td>
<td bgcolor="{secondaltcolor}" align="left" width="50%">
<input type="text" name="expiry" size="8" class="bginput" tabindex="1" value="$defaultexpiry"> example:
08/12/02</td>
<td bgcolor="{secondaltcolor}" align="left"><b>
<font color="#FF0000">*</font></b></td>
</tr>


but it dont work ? what else do i need to do ?
Reply With Quote
  #97  
Old 08-25-2002, 10:30 PM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You are obviously using vBPortal there.

Well, the $post variables only work in the showthread section since it pulls information from the functions.php - you would need to do a db query to pull the custom user profile fields in contact.php first for this to work.

Like I said before, this has nothing to do with my contact form hack. Please ask this in the PHP forum, or in the vBPortal forums. I cannot support my hack to make it work with VBPortal - only with vB.
Reply With Quote
  #98  
Old 10-30-2002, 04:58 PM
shinpad shinpad is offline
 
Join Date: Feb 2002
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great hack - one question:
would it be possible to have the form check that the email address entered is at least in the right format? ie user@domain.com
at present you can type in anything as the email address.
I know it's not going to matter to those who actually want a reply, but it may put some of the idiots of sending crap :cheeky:

cheers

Graham
Reply With Quote
  #99  
Old 10-30-2002, 06:26 PM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by shinpad
Great hack - one question:
would it be possible to have the form check that the email address entered is at least in the right format? ie user@domain.com
at present you can type in anything as the email address.
I know it's not going to matter to those who actually want a reply, but it may put some of the idiots of sending crap :cheeky:
No, because:

1) People who want to hide their emails will put in a fake one no matter what.

2) I rather they put in an obviously wrong one, so I don't waste time replying.

3) If they keep spamming you, you have their IP address and DNS server sent to you in their email with this hack, and you can still ban them.
Reply With Quote
  #100  
Old 10-31-2002, 12:41 AM
Goldknight's Avatar
Goldknight Goldknight is offline
 
Join Date: Aug 2002
Posts: 304
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great hack, about time I install this hack
Reply With Quote
  #101  
Old 10-31-2002, 10:38 AM
-=dm=- -=dm=- is offline
 
Join Date: Nov 2001
Posts: 189
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Erwin & Unknown553

Thanx its working fine on vB 2.2.4
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:38 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06526 seconds
  • Memory Usage 2,365KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (8)bbcode_php
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete