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)
-   -   [Release vb2.0] Receive copy of e-mail you send via the BB (https://vborg.vbsupport.ru/showthread.php?t=16126)

bira 05-05-2001 10:00 PM

Hi All,

This is a very small hack, but one that my users requested:

When you send a fellow member an e-mail via the BB mailform, you can select to also receive a copy of this e-mail to your address.

The "installation" (for lack of better word) includes inserting a small piece of code into member.php, adding a small piece of HTML into one template, and creating a simple text-only new template.

Enjoy!

Installation Instructions:

1. Open member.php. Almost completely at the end of the script, find:

PHP Code:

mail($destuserinfo[email],$subject,$sendmessage,"From: \"$bbuserinfo[username]\" <$bbuserinfo[email]>"); 

BELOW it add:

PHP Code:

  if ($getcopy) {
    
$subject "FW: ".$subject;
    eval(
"\$sendmessage = \"".gettemplate("email_copymessage",1,0)."\";");
    
mail($bbuserinfo[email],$subject,$sendmessage,"From: \"$bbtitle Mailer\" <$webmasteremail>");
  } 

Save file and upload.

2. Edit template mailform.

Find, almost at the bottom:

Code:

<input type="hidden" name="action" value="emailmessage">
        <input type="hidden" name="userid" value="$userid">
        <input type="submit" class="bginput" name="submit" value="Send email">
        <input type="reset" class="bginput" name="reset" value="Clear Fields">

And ABOVE it add:

Code:

        <input type="checkbox" name="getcopy" value="1"> <smallfont><b>Check this box if you want to receive a copy of this message to your e-mail</b></smallfont>
        <br><br>

3. Create new template, called email_copymessage with the following content:

Quote:

This is a copy of an e-mail message you sent to $destuserinfo[username] at $bbtitle ( $bburl/index.php ):
--------------------------------------------------------------------------

$message

(change the text to whatever you like really)


THAT'S IT!

The mailform will now look like this:

http://www.atlasf1.com/personal/bira/mailform.gif

If you check this box, a copy of the e-mail you just sent will also be sent to you.

Cheers,

Bira

bokhalifa 05-06-2001 09:11 PM

good work

bira

workin good:D


thank;)


I waet for you now hack:D

bira 11-28-2001 12:41 AM

just to confirm, this hack works with all vB 2.x.x versions up to and including the latest 2.2.1

eva2000 11-28-2001 02:43 PM

hey bira .. missed you over at vbulletin.com forums :(

how ya doin ? :D

:cool: hack :)

Admin 11-28-2001 02:47 PM

Thanks for confirming bira... installed here of course. :)

mem 11-28-2001 03:00 PM

nice hack!!!
I like it. :D

bira 11-28-2001 03:11 PM

Quote:

Originally posted by eva2000
hey bira .. missed you over at vbulletin.com forums :(

how ya doin ? :D

:cool: hack :)

hi eva2000 - good to see you :)

I usually surf up around this time of year, because we have the winter break in Formula One, which means I go knee-deep in website development :)

Since I postponed upgrading vB for ages (I ran 2.0.1 until last week), there was not much I could do on vB, so there.

But now I'm back, heh.

eva2000 11-28-2001 04:57 PM

Quote:

Originally posted by bira


hi eva2000 - good to see you :)

I usually surf up around this time of year, because we have the winter break in Formula One, which means I go knee-deep in website development :)

Since I postponed upgrading vB for ages (I ran 2.0.1 until last week), there was not much I could do on vB, so there.

But now I'm back, heh.

well welcome back then :D

now i'll have to follow you around this forum seeing what goodies you produce for us :D

Kathy 09-16-2002 08:24 PM

Okay, I would love to use this hack...but when I add the code on the member.php page...where indicated I end up with "parse error on line 1533 of member.php" ...whether I have the templates up and running or not.

ANy ideas what I'm messing uP?

PS....please remember I'm PHP challenged. :D

Erwin 09-16-2002 10:40 PM

Welcome back, bira. Your hacks have always been excellent. :)


All times are GMT. The time now is 01:33 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.01012 seconds
  • Memory Usage 1,741KB
  • 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
  • (2)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete