how do i add user image in Invite a Friend
Hello,
I surfed the web and found a cool site: http://www.mysite.com/
I thought it might be interesting to you.
User pic
|
user name
site logo
how do i add user image in Invite a Friend
Hello, I surfed the web and found a cool site: http://www.mysite.com/
user name
site logo | |
Hello follow these steps :
1. Open the tellfriend.php find this code lines : $aPlus = array( and replace with : $aPlus = array( 2. Open admin -> Email Templates -> Template for "Email profile to a friend" feature. and add into Body section this key : <Icon> 3. Click "Save" button 4. Finish! PS: If possible do not write me personally, please try to ask on the forum first | |
Hi, is it possible to adapt this, but to inckude the image in the "Fried Request" email? It woul look very cool... Pleaseeeeeee..... Sleepless | |
didn't work this is what i did in "Email profile to a friend" feature
<html><head></head><body style="font: 12px Verdana; color:#000000"> <p><b>Hello</b>,</p> <Icon> I thought it might be interesting to you.</p> <p><span style="color:#FF6633"><FromName></span></p> <hr /><font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="#000000"> site name more more more</font> </body></html>
in tellfriend.php
<?php
/*************************************************************************** * Dolphin Smart Community Builder * ----------------- * begin : Mon Mar 23 2006 * copyright : (C) 2006 BoonEx Group * website : http://www.boonex.com/ * This file is part of Dolphin - Smart Community Builder * * Dolphin is free software. This work is licensed under a Creative Commons Attribution 3.0 License. * http://creativecommons.org/licenses/by/3.0/ * * Dolphin is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the Creative Commons Attribution 3.0 License for more details. * You should have received a copy of the Creative Commons Attribution 3.0 License along with Dolphin, * see license.txt file; if not, write to marketing@boonex.com ***************************************************************************/
require_once('inc/header.inc.php'); require_once(BX_DIRECTORY_PATH_INC . 'design.inc.php'); require_once(BX_DIRECTORY_PATH_INC . 'profiles.inc.php'); require_once(BX_DIRECTORY_PATH_INC . 'utils.inc.php'); require_once(BX_DIRECTORY_PATH_CLASSES . 'BxDolEmailTemplates.php');
bx_import('BxTemplFormView');
// --------------- page variables and login
$_page['name_index'] = 29; $_page['css_name'] = array('general.css', 'tellfriend.css', 'forms_adv.css');
$_page['header'] = _t("_Tell a friend"); $_page['header_text'] = _t("_Tell a friend");
$profileID = 0; if( isset($_GET['ID']) ) { $profileID = (int) $_GET['ID']; } else if( isset($_POST['ID']) ) { $profileID = (int) $_POST['ID']; }
$iSenderID = getLoggedId(); $aSenderInfo = getProfileInfo($iSenderID);
// --------------- GET/POST actions $tell_friend_text = ''; if($_POST['submit_send']) { $tell_friend_text = SendTellFriend($iSenderID) ? "_Email was successfully sent" : "_Email sent failed"; $tell_friend_text = MsgBox(_t($tell_friend_text)); }
// --------------- page components $sYEmlNotValidC = _t('_Incorrect Email'); $sFEmlNotValidC = $sYEmlNotValidC . ' (' . _t('_Friend email') . ')';
$sCaption = ($profileID) ? _t('_TELLAFRIEND2', $site['title']) : _t('_TELLAFRIEND', $site['title']);
$aForm = array( 'form_attrs' => array( 'id' => 'invite_friend', 'name' => 'invite_friend', 'action' => BX_DOL_URL_ROOT . 'tellfriend.php', 'method' => 'post', 'enctype' => 'multipart/form-data', 'onsubmit' => "var feml = document.forms['invite_friend'].friends_emails; var yeml = document.forms['invite_friend'].email; var bRet = true; if(emailCheck(yeml.value)==false) { alert('{$sYEmlNotValidC}'); bRet = false; } if (emailCheck(feml.value)==false) { alert('{$sFEmlNotValidC}'); bRet = false; } return bRet; " ), 'inputs' => array ( 'header1' => array( 'type' => 'block_header', 'caption' => $sCaption, ), 'id' => array( 'type' => 'hidden', 'name' => 'ID', 'value' => $profileID ), 'name' => array( 'type' => 'text', 'name' => 'name', 'caption' => _t("_Your name"), 'value' => $aSenderInfo['NickName']
), 'email' => array( 'type' => 'text', 'name' => 'email', 'caption' => _t("_Your email"), 'value' => $aSenderInfo['Email'] ), 'friends_emails' => array( 'type' => 'text', 'name' => 'friends_emails', 'caption' => _t("_Friend email"), 'value' => '' ), 'submit_send' => array( 'type' => 'submit', 'name' => 'submit_send', 'value' => _t("_Send Letter"), ), ) );
$oForm = new BxTemplFormView($aForm);
$_ni = $_page['name_index']; $_page_cont[$_ni]['page_code'] = $tell_friend_text . $oForm->getCode(); // --------------- [END] page components
PageCode(); // --------------- page components functions
/** * send "tell a friend" email */
function SendTellFriend($iSenderID = 0) { global $profileID;
$sRecipient = clear_xss($_POST['friends_emails']); $sSenderName = clear_xss($_POST['name']); $sSenderEmail = clear_xss($_POST['email']); if ( strlen( trim($sRecipient) ) <= 0 ) return 0; if ( strlen( trim($sSenderEmail) ) <= 0 ) return 0;
$sLinkAdd = $iSenderID > 0 ? 'idFriend=' . $iSenderID : ''; $rEmailTemplate = new BxDolEmailTemplates(); if ( $profileID ) { $aTemplate = $rEmailTemplate -> getTemplate( 't_TellFriendProfile', $profileID ) ; $Link = getProfileLink($profileID, $sLinkAdd); } else { $aTemplate = $rEmailTemplate -> getTemplate( 't_TellFriend' ) ; $Link = BX_DOL_URL_ROOT; if (strlen($sLinkAdd) > 0) $sLinkAdd .= '?' . $sLinkAdd; } $aPlus = array( 'Link' => $Link, 'FromName' => $sSenderName, 'Icon' => $profileID ? $GLOBALS['oFunctions']->getMemberAvatar($profileID, 'small') : '', );
return sendMail($sRecipient, $aTemplate['Subject'], $aTemplate['Body'], '', $aPlus); }
?> | |
Add code <Icon> as bellow to "Email profile to a friend" feature <img src="<Icon>"> | |
Hi, is it possible to adapt this, but to inckude the image in the "Fried Request" email? It woul look very cool... Pleaseeeeeee..... Try this, Add user image in Friend request message
| |
this work for me but can't get the tellfriend.php to work Try this, Add user image in Friend request message
| |
Hi I have the icon working with the small icon in the "email profile to friend" template. Question? 1). Is there a way to enlarge the small icon to something like 100px by 100px for the "email profile to friend" template 2). How do you call the site logo? Regards, Htech | |
Hi I have the icon working with the small icon in the "email profile to friend" template. Question? 1). Is there a way to enlarge the small icon to something like 100px by 100px for the "email profile to friend" template 2). How do you call the site logo? Regards, Htech Figured out 1). Changed: ? $GLOBALS['oFunctions']->getMemberAvatar($profileID, 'small') To: ? $GLOBALS['oFunctions']->getMemberAvatar($profileID, 'large') I will just call the logo via regular img src | |
how can we display the memebr avatar on the email templates from all the mods Post Reply - if you going to help - No for - bla bla bla bla | |
how can we display the memebr avatar on the email templates from all the mods lolll...now I think we are asking too much....but will pull this question up, maybe we get lucky ;) Sleepless | |
how can we display the memebr avatar on the email templates from all the mods lolll...now I think we are asking too much....but will pull this question up, maybe we get lucky ;) is not to mutch is a simple code the with don't know how and this code is going to be add on email templates Post Reply - if you going to help - No for - bla bla bla bla |