HomeHelpTrac

Changeset 8652 for trunk/greet.php


Ignore:
Timestamp:
01/20/09 05:17:52 (3 years ago)
Author:
Alexander Ermashev
Message:

List of changes

  • Correct the per_page_step condition into "inc/classes/BxDolPaginate.php";
  • Set up the per page step into "templates/scripts/classes/BxBaseBrowse.php";
  • Change the greet.php (add the code that send message also into member's site personal mailbox );
  • Fix member's actions window size into mailbox ;
  • add new sql query into "periodic/cmd.php" that will delete all trashed messages ;
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/greet.php

    r8629 r8652  
    182182    $ConfCode   = urlencode( base64_encode( base64_encode( crypt( $recipient['ID'], "vkiss_secret_string" ) ) ) ); 
    183183 
    184     $aPlus = array(); 
    185     $aPlus['ConfCode'] = $ConfCode; 
    186     $aPlus['ProfileReference'] = $sender ? '<a href="' . getProfileLink($member['ID']) . '">' . $sender['NickName'] . ' (' . getProfileLink($member['ID'])  . ') </a>' : '<b>' . _t("_Visitor") . '</b>'; 
    187     $aPlus['VKissLink'] = $sender ? '<a href="' . $site['url'] . 'greet.php?sendto=' . $member['ID'] . '&amp;from=' . $recipient['ID'] . '&amp;ConfCode=' . $ConfCode . '">' . $site['url'] . 'greet.php?sendto=' . $member['ID'] . '&amp;from=' . $recipient['ID'] . '&amp;ConfCode=' . $ConfCode . '</a>' : '<a href="' . $site['url'] . 'contacts.php">' . $site['url'] . 'contacts.php</a>'; 
    188  
    189     $mail_ret = sendMail( $recipient['Email'], $aTemplate['Subject'], $aTemplate['Body'], $recipient['ID'], $aPlus ); 
     184    // parse the email template ; 
     185    $sProfileLink = $sender  
     186        ? '<a href="' . getProfileLink($member['ID']) . '">' . $sender['NickName'] . ' (' . getProfileLink($member['ID'])  . ') </a>'  
     187        : '<b>' . _t("_Visitor") . '</b>'; 
     188 
     189    $sKissLink = $sender  
     190        ? '<a href="' . $site['url'] . 'greet.php?sendto=' . $member['ID'] . '&amp;from=' . $recipient['ID'] . '&amp;ConfCode=' . $ConfCode . '">' . $site['url'] . 'greet.php?sendto=' . $member['ID'] . '&amp;from=' . $recipient['ID'] . '&amp;ConfCode=' . $ConfCode . '</a>'  
     191        : '<a href="' . $site['url'] . 'communicator.php">' . $site['url'] . 'communicator.php</a>'; 
     192     
     193    $aTemplate['Body'] = str_replace( "<ConfCode>", $ConfCode, $aTemplate['Body'] ); 
     194    $aTemplate['Body'] = str_replace( "<ProfileReference>", $sProfileLink, $aTemplate['Body'] ); 
     195    $aTemplate['Body'] = str_replace( "<VKissLink>", $sKissLink, $aTemplate['Body'] ); 
     196    $aTemplate['Body'] = str_replace( "<RealName>", $recipient['NickName'], $aTemplate['Body'] ); 
     197    $aTemplate['Body'] = str_replace( "<SiteName>", $site['url'], $aTemplate['Body'] ); 
     198 
     199    $mail_ret = sendMail( $recipient['Email'], $aTemplate['Subject'], $aTemplate['Body'], $recipient['ID'] ); 
     200 
     201    // Send message into the member's site personal mailbox; 
     202    $sQuery =  
     203    " 
     204        INSERT INTO 
     205            `Messages` 
     206        SET 
     207            `Date` = NOW(), 
     208            `Sender` = {$sender['ID']}, 
     209            `Recipient` = {$recipient['ID']}, 
     210            `Subject` = '{$aTemplate['Subject']}', 
     211            `Text`  = '{$aTemplate['Body']}', 
     212            `New` = '1', 
     213            `Type` = 'greeting' 
     214    "; 
     215    db_res($sQuery); 
    190216 
    191217    if ( !$mail_ret ) 
Note: See TracChangeset for help on using the changeset viewer.