Results 1 to 8 of 8

Thread: Email your PM's

  1. #1
    Member Zarkov is on a distinguished road
    Join Date
    May 2001
    Posts
    43

    Email your PM's

    I created this hack to email your PM's to your registered email address after installing the Download hack by Bira, users get no choice in email addresses, it just pulls the registered email address from the database.
    This was done for security reasons.

    here it is:-

    PLEASE change the brackets [ & ] for { & } respectively
    as the board here parses the variable and replaces the code with the boards own colour scheeme


    in privfolder template
    find
    <input type="submit" class="bginput" name="move" value="Move" style="background-color:[categorybackcolor];color:[categoryfontcolor];font-size:10px;font-weight:bold">
    $massforwardlink
    and add after it

    or <input type="submit" class="bginput" name="email" value="Email" style="background-color:[categorybackcolor];color:[categoryfontcolor];font-size:10px;font-weight:bold">
    then in private.php
    find the section start do stuff (move etc) and add in there after
    if ($delete!="") {
    $what="delete";
    }
    if ($email!="") {
    $what="email";
    }
    Then below there find
    eval("standardredirect(\"".gettemplate("redirect_p mdelete")."\",\"private.php?s=$session[sessionhash]&folderid=$thisfolder\");");
    }

    }
    and add after it
    if ($what=="email") {

    if (is_array($privatemessage)) {
    $emailaddr=$DB_site->query_first("SELECT email FROM user WHERE userid=$bbuserinfo[userid]");

    while(list($key,$val)=each($privatemessage)) {
    $email=$DB_site->query_first("SELECT touserid,fromuserid,dateline,title,message FROM privatemessage WHERE privatemessageid='$key' AND userid=$bbuserinfo[userid]");
    $tousername=$DB_site->query_first("SELECT username FROM user WHERE userid='$email[touserid]'");
    $fromusername=$DB_site->query_first("SELECT username FROM user WHERE userid='$email[fromuserid]'");
    $msgdt = vbdate($dateformat,$email[dateline]);
    $msgtm = vbdate($timeformat,$email[dateline]);
    $wordwrap = wordwrap($email[message],75,"\r\n");

    $emailmsg .= "Date/Time Sent: " .$msgdt ."," .$msgtm ."\r\n";
    $emailmsg .= "From: " .$fromusername[username] ."\r\n";
    $emailmsg .= "To: " .$tousername[username] ."\r\n";
    $emailmsg .= "Subject: " .$email[title] ."\r\n\r\n";
    $emailmsg .= $wordwrap ."\r\n";
    $emailmsg .= "================================================= =========================\r\n\r\n\r\n";

    } //end while
    mail ($emailaddr[email],"Your Private Messages",$emailmsg,"From:enter your webmaster email address here");
    eval("standardredirect(\"".gettemplate("redirect_s entpmemail")."\",\"private.php?s=$session[sessionhash]&folderid=$thisfolder\");");
    } else {
    eval("standarderror(\"".gettemplate("error_pmnosel ected")."\");");
    exit;
    }
    }

    Then
    create a new template called redirect_sentpmemail
    and enter this into it
    We have sent your private messages via email to $emailaddr
    You will now be returned to the thread.

    This will send all selected PM's to the email address as a message body in a plain text style.

    Hope this is of use to someone

    Please reply if you use it or can make any suggestions,comments,likes or dislikes

    ps this works in rc3 & final
    Last edited by Zarkov; Sat 2nd Jun '01 at 5:17pm.
     

  2. #2
    Senior Member bira is on a distinguished road bira's Avatar
    Join Date
    May 2000
    Location
    2nd turn left
    Age
    42
    Posts
    1,501
    Originally posted by Zarkov
    I created this hack ...
    Do you have no shame?

    http://vbulletin.com/forum/showthrea...threadid=15859

     

  3. #3
    Member Blue2000 is on a distinguished road
    Join Date
    Feb 2001
    Posts
    87
    there not the same

    one of them e-mails and the other downloads.
     

  4. #4
    Customer Support Manager Steve Machol is a name known to all Steve Machol is a name known to all Steve Machol is a name known to all Steve Machol is a name known to all Steve Machol is a name known to all Steve Machol is a name known to all Steve Machol's Avatar
    Join Date
    Jul 2000
    Location
    Jelsoft InterGalactic HQ
    Posts
    142,702
    Is it possible that this borrows some code from bira's hack?

    Besides it's 'they're' not 'there'!
    Steve Machol, vBulletin Customer Support Manager
    "Have Copy, Will Paste" (when appropriate)

    Please do not email or PM me for vBulletin support. I will be more than glad to answer your questions on the vB Forums and in the support system.

    Just remember that what happens in localhost, stays in localhost.

     

  5. #5
    Senior Member nuno has disabled reputation nuno's Avatar
    Join Date
    Apr 2001
    Age
    34
    Posts
    4,377
    yes
    he should give the credit to Bira
    something like:
    Author: Bira
    Tarted up by: Zarkov
     

  6. #6
    Member Zarkov is on a distinguished road
    Join Date
    May 2001
    Posts
    43
    Yea sorry Bira it was a genuine mistake what i thought id wrote was
    I created this hack to email your PM's to your registered email address after installing the download hack by bira,

    If you look at the other hack i posted here that was an adaption of tubedogs post i said the same there.

    I do not want to take anything away from you bira or try to hide the fact that it is not all my work.
    I am learning php but gave up as i didnt have any real applicational uses for the test scripts i was writing.
    Then someone asked me to be a mod on a vb board and when i realised it was php i came here and read what others where doing, I then asked for permission to the boards code to "Play with".
    Now i am learning a great deal from you guys.

    I am sorry for offending you Bira and my original post will be altered to the intented opening.

    ps nuno i do not consider it "tarting up" it does a totaly different job.
    Last edited by Zarkov; Sat 2nd Jun '01 at 5:19pm.
     

  7. #7
    Senior Member nuno has disabled reputation nuno's Avatar
    Join Date
    Apr 2001
    Age
    34
    Posts
    4,377
    ok ok
    Original Author : Bira
    New Version : Zarkov
     

  8. #8
    Member Zarkov is on a distinguished road
    Join Date
    May 2001
    Posts
    43
    to be honest it was because i was so proud that i got it to work properly that i couldn wait to share it.
    I had to edit the post 3 times to add in the bits i missed through my excitement and joy.

    That not tarted up comment was not said nastily BTW, But thanks for the alteration and in future i will double check that any code i use from others hacks is clearly stated.
     

Similar Threads

  1. Custom feilds in 'email all users'
    By JackG in forum vBulletin 2 Suggestions and Feedback
    Replies: 6
    Last Post: Wed 9th May '01, 8:36pm
  2. Help needed with 'Email to friend'
    By spaceman in forum vBulletin 2 'How Do I' and Troubleshooting
    Replies: 0
    Last Post: Sat 31st Mar '01, 6:22am
  3. Have option to 'squelch' users & send them an email
    By Swamper in forum vBulletin 2 Suggestions and Feedback
    Replies: 1
    Last Post: Thu 29th Mar '01, 3:37pm
  4. Unknown column 'sessionhash' in 'field list' ?
    By eva2000 in forum Pre beta 4.1 bugs
    Replies: 10
    Last Post: Sat 10th Mar '01, 12:14am
  5. "Use 'Email Notification' by default" question
    By Steve Machol in forum vBulletin 2 'How Do I' and Troubleshooting
    Replies: 5
    Last Post: Sat 3rd Mar '01, 12:11pm

Bookmarks

Posting Permissions

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