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)
-   -   Contact Us Email Feedback Form (with IP address & status of sender) (https://vborg.vbsupport.ru/showthread.php?t=41791)

nhlrat 08-13-2002 08:23 PM

Ok thanks, I will try it again.

nhlrat 08-13-2002 08:26 PM

Yep I have the correct version with no extra code at all. I guess it's in that global file then but I never added anything to there either :cry:

Thanks for your help.

Erwin 08-13-2002 08:28 PM

Does anyone else have the same problem? I can use mine easily - I logged out, and tried it many times. I get emails from unregistered users, with all the IP information, a few times a day, so I know it works for me.

nhlrat 08-13-2002 11:33 PM

Here's what I did to get it working. I gave unregistered/not logged in users permission to view the board and now it's working. :banana:

Erwin 08-13-2002 11:49 PM

Quote:

Originally posted by nhlrat
Here's what I did to get it working. I gave unregistered/not logged in users permission to view the board and now it's working. :banana:
LOL! Like I said, it was the way you set up your forums. If unregistered users can't view your forum, then they can't view the contact form too. :)

Boofo 08-13-2002 11:52 PM

Is there any way to set it up so you don't have to turn on permissions, though? I have it set up that way, so it works for me, but there are a lot of sites that don't have it turned on. :)

Erwin 08-14-2002 12:01 AM

The permissions are set up in global.php which the contact.php file includes at the very beginning.

To set it up to work would mean hacking global.php OR copying global.php and renaming it another name and then removing the permission bits, and then include that file in contact.php instead of global.php OR commenting out the global.php include line in contact.php and then hardcoding in the header, footer, name of forum and other variables in the template (not a good option the last one).

There are ways around it.

:)

nhlrat 08-14-2002 01:28 AM

Quote:

Originally posted by Erwin


LOL! Like I said, it was the way you set up your forums. If unregistered users can't view your forum, then they can't view the contact form too. :)

Yep, you were right on target ;) Thanks for your help. If anyone has this hack please let me know because it's not in the thread any longer. Thanks.

mewgood 08-14-2002 01:30 AM

great hack
:D

Dark Shogun 08-20-2002 03:47 AM

Works great at my forum.

Dark Shogun

Vinney 08-24-2002 04:03 PM

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.

Erwin 08-24-2002 09:18 PM

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. :)

Vinney 08-24-2002 10:29 PM

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 ?

Erwin 08-25-2002 07:38 AM

That question belongs in the PHP forum. :) I have no idea why it wouldn't work.

Vinney 08-25-2002 10:46 AM

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 ?

Erwin 08-25-2002 10:30 PM

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.

shinpad 10-30-2002 04:58 PM

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

Erwin 10-30-2002 06:26 PM

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.

Goldknight 10-31-2002 12:41 AM

Great hack, about time I install this hack

-=dm=- 10-31-2002 10:38 AM

Erwin & Unknown553

Thanx its working fine on vB 2.2.4 :)

Visionray 12-03-2002 03:23 PM

Nice hack guys...working great.

donna8284 12-03-2002 06:34 PM

Hi,

I installed this hack today and it works fine, however it will not let me log out of my board now. It says I logged out and all cookies have been cleared, but I'm still actually logged in. Any ideas on how to fix this?

Erwin 12-03-2002 07:49 PM

donna, that has nothing to do with this hack. You have a corrupted cookie. Manually clear all cookies in your browser, log in again and you will be fine.

donna8284 12-03-2002 08:31 PM

Thank you,

I did finally figure out what is was - sorry for the stupid question!!

Erwin 12-03-2002 08:47 PM

It's okay. :)

Smoothie 01-06-2003 05:35 AM

Well done Doc! Works great. Thank you!

SHalliday 04-25-2003 06:51 PM

Erwin, nice job on this hack! Just installed it this morning and its working great!

I have one question though. When you press the "Send Email" button on the contact page it sends the email but displays a blank screen. I then have to select the back button to return to the contact page. Should'nt it automatically display a message like "Your email has been sent - Press enter to return to previous page" message or automatically return back to the contact page?

Am I the only one that gets a blank screen display after email has been sent and if so, what should be displayed?

Thanks again for making available such useful hack!

FFArmageddon 04-25-2003 08:19 PM

This is a nice hack, easy to install to (my kind of hack :p)

Not sure if I will install though, I am not sure I would have a use for it.,

Erwin 04-26-2003 09:58 AM

Minor Update Version 2.3

Fixed up the blank page bug. :)

Removed the need for 2 files - took away send.php

Tidied up the code.

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

wolfe 04-27-2003 07:58 PM

d00d still getting blank screen on send

Erwin 04-28-2003 04:12 AM

That's weird. Anyone else?

trafix 04-28-2003 05:17 AM

interesting ..... i havent had a problem with the original script .... lol i havent had a blank screen just the " your email has been sent to......." message

should I update??

Erwin 04-28-2003 05:29 AM

No need to update if everything is working. I did remove the need for the send.php - if you just want to have 1 file, then update. Note - there is a small change to the contact template too.

Also, if you're getting a blank page, make sure you created all the templates - there are 3 of them.

Austin Dea 05-04-2003 05:17 AM

You forgot to update the install.txt ;)

Carsten 05-04-2003 10:18 AM

Great hack!

OmaniMan 05-06-2003 05:19 AM

WoooooooooW ... !!!

What a WONDERFUL Hack :classic:

Great Man ... Wish You The Best

Erwin 05-06-2003 07:00 AM

Quote:

05-04-03 at 04:17 PM Austin Dea said this in Post #114
You forgot to update the install.txt ;)

LOL!

I've fixed it...

Austin Dea 05-06-2003 02:21 PM

Nice hack =D

Boofo 05-06-2003 02:37 PM

Erwin, if we are using the older version with 2 files and it is working fine, do we really need to upgrade? Is there any real advantages to doing that? Just curious. ;)

Keyser S?ze 05-06-2003 08:14 PM

great job erwin, such a wonderful useful hack and yet so easy to install!!

suggested upgrades:

when they click in the txt box the "type your msg here" disappears

also after sending it gives a thank you msgs then redirects you to the last page you were on, instead of just providing a link to the forums


All times are GMT. The time now is 07:52 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.01347 seconds
  • Memory Usage 1,855KB
  • 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_code_printable
  • (8)bbcode_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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