Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: , by (Guest)
Developer Last Online: Jan 1970 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 05-21-2000 Last Update: Never Installs: 0
 
No support by the author.

Send an email from one registered user to another with this:

// ############################### start email form ###############################

if ($action=="mailform") {

echo "<form action=\"member.php\" method=post>\n";
echo "<input type=hidden name=action value=sendmail>\n";
echo "To:<br><input name=username value=\"$username\"><br>\n";
echo "From:<br><input name=from value=\"$bbusername\"><br>\n";
echo "Subject:<br><input name=subject value=\"From @forums Member\"><br>\n";
echo "Message:<br><textarea rows=10 cols=40 name=message></textarea><br>\n";
echo "<input type=submit>\n";
echo "</form>\n";

}

// ############################### start send email ###############################

if ($action=="sendmail") {

$body=urldecode($message);
$title=urldecode($subject);
$username=urldecode($username);
$fromusername=urldecode($from);

$user=$DB_site->query_first("SELECT userid FROM user WHERE username='".addslashes($username)."'");
$userid=$user[userid];
$userinfo=$DB_site->query_first("SELECT username,email FROM user WHERE userid=$userid");
$useremail=$userinfo[email];
$username=$userinfo[username];

$fromuser=$DB_site->query_first("SELECT userid FROM user WHERE username='".addslashes($fromusername)."'");
$fromuserid=$fromuser[userid];
$fromuserinfo=$DB_site->query_first("SELECT username,email FROM user WHERE userid=$fromuserid");
$fromuseremail=$fromuserinfo[email];
$fromusername=$fromuserinfo[username];

$fromuser="\"$fromusername\" <$fromuseremail>";

mail("\"$username\" <$useremail>", $title, $body, "From: $fromuser");

echo "Mail Sent!\n";

}

Just put this snippit into "member.php" and update the "postbit_useremail" so that the HREF points to "member.php?action=mailform&username=$username "

[Edited by Lord Raven on 05-22-2000 at 01:58 AM]

Show Your Support

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

Comments
  #2  
Old 05-21-2000, 07:03 PM
Guest
 
Posts: n/a
Default

is replace the mailto: link in the postbit with an anonymous form that doesn't reveal the users' e-mail address to whoever is sending the mail.

It will also help protect against people will take the time to harvest your users' e-mail addy for spamming, like Chris from extremeforums did us on the UBB.

See it in action at: @forums Beta Forum

Note: You hafta sign up for this to work properly and put your name in the From slot
Reply With Quote
  #3  
Old 05-22-2000, 01:33 PM
Guest
 
Posts: n/a
Default

This is a great hack! This really should be an option built into the board.
Reply With Quote
  #4  
Old 05-22-2000, 02:38 PM
Guest
 
Posts: n/a
Default

John's gonna do that

I'll prolly templatize it tonight (or screw it up trying) and send the template code and php file to him for inclusion in the 1.1.2 release.

If I can't get it, I'm sure John will (or some other enterprizing hacker)

Tonight's project is a SUPER basic My Topics list. Nothing more than a search, really, but it should suffice until we get an altertable routine to do the real thing.
Reply With Quote
  #5  
Old 05-22-2000, 06:50 PM
Guest
 
Posts: n/a
Default

Martin:

If you really think about this it really is the private messages hack that people have been wanting only it sends the private message via email instead of to the board.

Now what would be cool is if you could read your email with this via an smtp or pop call with the member putting in their username and password to their email account and the script could tell them they have private mailing waiting while they are surfing your forum.

Cool hack BTW.

Parker
Reply With Quote
  #6  
Old 05-22-2000, 07:07 PM
Guest
 
Posts: n/a
Default

The private message hack would require four new tables in the forum database to store from, to, subject and message. I think it would actually be easier to implement here than with UBB.

The hack was by Lord Raven, one of my members and a friend. My contribution was pretty limited.
Reply With Quote
  #7  
Old 05-22-2000, 09:17 PM
Guest
 
Posts: n/a
Default

If anyone is interested, here's a version of the hack that calls on the user's mail client to do the sending

Code:
<?php

require("global.php");

$username=$QUERY_STRING;

    $username=urldecode($username);
    $user=$DB_site->query_first("SELECT userid FROM user WHERE username='".addslashes($username)."'");
    $userid=$user[userid];

  // display user info

  $userinfo=$DB_site->query_first("SELECT email FROM user WHERE userid = $userid");
  $mememail=$userinfo[email];
  $mailto="mailto:$mememail";
  header("Location:$mailto");

?>
Just put that into a file (e.g membermail.php) and call on it in the templates using the form membermail.php?$username

Hope that's useful to anyone...
Reply With Quote
  #8  
Old 05-23-2000, 04:37 PM
Guest
 
Posts: n/a
Default

Quote:
Originally posted by redranger
If anyone is interested, here's a version of the hack that calls on the user's mail client to do the sending

What about people who use Hotmail or some other web based email client?

Besides that, it would show the user the email address. The sole reason for creating this hack was to conciel(sp?) the user's email address.

[Edited by Lord Raven on 05-23-2000 at 11:38 PM]
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 07:07 PM.


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.13836 seconds
  • Memory Usage 2,255KB
  • Queries Executed 23 (?)
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
  • (1)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (7)postbit
  • (8)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_postinfo_query
  • fetch_postinfo
  • 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
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete