PDA

View Full Version : Request an Email Address from VB host 1.0


Grunt
03-30-2003, 10:00 PM
Request an Email Address from VB host 1.0 by Grunt

This hack has code based on the "Contact Us Email Feedback Form (with IP address) Version 2.2 " hack by Erwin (used with permission). https://vborg.vbsupport.ru/showthread.php?s=&threadid=50783

This hack has been tested on vBulletin 2.3.0. I would imagine it would work on 2.2.x, (and probably with all version 2.0.x)


What it does:

This hack allows members to send the Webmaster of the site a request for an email address. Let's say your website is www.yoursite.com and you want to offer your users yourname@yoursite.com email addresses. This form will automate this process.

Registered users will be brought to a form (must be logged in to use) that allows them to enter the requested name. All other information is automated.

If the user does not enter information in the field, they will be shown an error page.

Once submitted, the user will be brought to a screen letting them know that the request has been sent.

The Webmaster will then recieve an email listing the requesters VB Username, Email Address that he/she is registered with, and his/her requested @yoursite.com email address.


Installation:

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.

emailrequest
emailrequest_error
emailrequest_sent

Then upload the following files into your forums directory.

emailrequest.php
sendmailrequest.php

Last thing you need to do is to place this link anywhere on your site.

<a href="http://www.yourforums.com/yourforums/emailrequest.php">Email Request</a>

And you're done!

Enjoy

Grunt


**4/8/03 - updated zip with correct templates**

Grunt
03-31-2003, 12:34 AM
screenshots:

Floris
03-31-2003, 01:00 AM
Nice idea, simple, yet effective :) I know some sites that wanted me to apply such a thing, now it is a step closer :)

Koutaru
03-31-2003, 02:55 AM
Neat :) If I find the use for it, I'll definately use it. And I just might need it with all the ideas I have for the site. XD

Intex
03-31-2003, 07:48 AM
Funnily enough just in time after I'd installed a mail server :). Nice work Gruntie.

Dean C
03-31-2003, 10:53 AM
Nice idea but unpractical as anyone who has the time to hack a board can simply increase the server load dramatically by repeatedly sending an email :(

Grunt
03-31-2003, 03:05 PM
if some punk wants to crash a server, im sure theres a hundred other ways that it can be done also.

If its a concern, perhaps someone else (more knowledgable than I) could implement a 'only able to send xx emails per xx seconds' hack to this.

g-force2k2
03-31-2003, 03:17 PM
Grutie if you're interested in stopping such actions just add a little more code the the hack...

i haven't looked at the actual coding but you can add this query:
ALTER TABLE user ADD requestemail smallint(6) unsigned NOT NULL DEFAULT '0'

and then to your code you can add:
$chk = $DB_site->query_first( "SELECT requestemail FROM user WHERE userid=$bbuserinfo[userid]" );
if( $chk[requestemail] )
{
eval( "standarderror( \"".gettemplate( 'emailrequest_alreadysent' )."\" );" );
exit;
}

also in the php you have to add an update query after the email has been proccessed:

$DB_site->query( "UPDATE user SET requestemail=1 WHERE userid=$bbuserinfo[userid]" );

this way they can only send one email request...

then add a template "emailrequest_alreadysent" and add the error information to that...

hope that helps...

regards,
g-force2k2

Serge
03-31-2003, 05:55 PM
Yeah then you have to also remeber you might want to add a thing like If you are getting them problem in error or have waited x amount of days email webmaster thing just incase something happens to the email

kushtiUK
03-31-2003, 07:41 PM
I like this - could you also add a text box for the user to choose a password of their liking.

Also my forum title is different to the .com name so it showns the wrong email! extention - can you advise how to over come this.

scottct1
04-04-2003, 03:22 PM
How come all 3 template files are the same? Am I missing something?

Grunt
04-08-2003, 02:40 AM
04-04-03 at 06:22 PM scottct1 said this in Post #11 (https://vborg.vbsupport.ru/showthread.php?postid=377540#post377540)
How come all 3 template files are the same? Am I missing something?
sorry bout that..zip updated

kushtiUK saidI like this - could you also add a text box for the user to choose a password of their liking.
Also my forum title is different to the .com name so it showns the wrong email! extention - can you advise how to over come this.
I was thinking the same thing about the password box..im busy with a few other things now, but check back in a couple weeks for that.
If you want to have it say something different than the .com name, just replace occurances of $bburl in the templates with whatever text suits you.

Smoothie
04-10-2003, 09:27 PM
I like this - could you also add a text box for the user to choose a password of their liking.Anyone managed to add this yet?

Grunt
04-20-2003, 04:20 AM
If you would like your users to be able to choose their own password, replace the sendemailrequest.php and the emailrequest template with the attached files.

Users will be able to input their requested password and you will receive the requested password in the email sent to the webmaster.

Logikos
05-06-2003, 05:40 AM
04-10-03 at 06:27 PM Smoothie said this in Post #13 (https://vborg.vbsupport.ru/showthread.php?postid=380359#post380359)
Anyone managed to add this yet?


I did and works great, i was having problems with the NeoMail VB hack with his email request, so im using this request hack with his login hack. Great work. I suggest you use the password request also. Thanks again