本文整理汇总了PHP中AlphaUserPointsHelper::buildKeyreference方法的典型用法代码示例。如果您正苦于以下问题:PHP AlphaUserPointsHelper::buildKeyreference方法的具体用法?PHP AlphaUserPointsHelper::buildKeyreference怎么用?PHP AlphaUserPointsHelper::buildKeyreference使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AlphaUserPointsHelper
的用法示例。
在下文中一共展示了AlphaUserPointsHelper::buildKeyreference方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: reader2author
public function reader2author($authorid = 0, $author = '', $articleid = 0, $title = '', $url = '')
{
$app = JFactory::getApplication();
require_once JPATH_SITE . DS . 'components' . DS . 'com_alphauserpoints' . DS . 'helper.php';
if (!$authorid || !$articleid) {
return;
}
// get referrerid of author
$referrerUserAuthor = AlphaUserPointsHelper::getAnyUserReferreID($authorid);
if (!AlphaUserPointsHelper::checkExcludeUsers($referrerUserAuthor)) {
return;
}
$ip = getenv('REMOTE_ADDR');
$db = JFactory::getDBO();
$keyreference = $articleid . "|" . $ip;
$keyreference = AlphaUserPointsHelper::buildKeyreference('sysplgaup_reader2author', $keyreference);
// check if not already view by active user
$query = "SELECT `id` FROM #__alpha_userpoints_details WHERE `keyreference`='" . $keyreference . "'";
$db->setQuery($query);
$alreadyView = $db->loadResult();
if (!$alreadyView) {
$user = JFactory::getUser();
$jnow = JFactory::getDate();
$now = $jnow->toSql();
$authorizedLevels = JAccess::getAuthorisedViewLevels($user->id);
$query = "SELECT * FROM #__alpha_userpoints_rules WHERE `plugin_function`='sysplgaup_reader2author' AND `published`='1' AND `access` IN (" . implode(",", $authorizedLevels) . ") AND (`rule_expire`>'{$now}' OR `rule_expire`='0000-00-00 00:00:00')";
$db->setQuery($query);
$result = $db->loadObjectList();
if ($result && $referrerUserAuthor) {
$datareference = '<a href="' . $url . '">' . $title . '</a> (' . $author . ')';
AlphaUserPointsHelper::insertUserPoints($referrerUserAuthor, $result[0], 0, $keyreference, $datareference);
}
}
}
示例2: awardPoints
public function awardPoints($userId, $name, $args)
{
require_once $this->_componentFile;
$key = $args->get('key', '');
$name = str_replace(".", "_", $name);
$name = 'plgaup_jfbconnect_' . $name;
$keyreference = AlphaUserPointsHelper::buildKeyreference($name, $key);
// get the current user's Referrerid always, for now.
$profile = AlphaUserPointsHelper::getUserInfo('', $userId);
$referrerId = $profile->referreid;
$return = AlphaUserPointsHelper::newpoints($name, $referrerId, $keyreference);
}
示例3: _buildKeyreference
protected function _buildKeyreference($plugin_function, $spc = '')
{
return AlphaUserPointsHelper::buildKeyreference($plugin_function, $spc);
}
示例4: addphotowalllike
function addphotowalllike()
{
$db =& JFactory :: getDBO();
$user =& JFactory::getUser();
$photoid=$_REQUEST['photoID'];
$uid=$_REQUEST['uID'];
$sql="select count(*) from #__awd_jomalbum_photo_wall_like where photoid=".$photoid." and userid=".$uid;
//echo $sql;exit;
$db->setQuery($sql);
$totRec=$db->loadResult();
if($totRec==0)
{
$sql="insert into #__awd_jomalbum_photo_wall_like(photoid,userid) values($photoid,$uid)";
$db->setQuery($sql);
if (!$db->query()) {
return JError::raiseWarning( 500, $db->getError() );
}
// AUP POINTS
$query='select wall_id from #__awd_wall_images where id='.$photoid;
$db->setQuery($query);
$wall_id = $db->loadResult();
$query='select commenter_id from #__awd_wall where id='.$wall_id.' and wall_date IS NOT NULL';
$db->setQuery($query);
$commenter_id = $db->loadResult();
if($commenter_id!=$user->id)
{
$api_AUP = JPATH_SITE.DS.'components'.DS.'com_alphauserpoints'.DS.'helper.php';
if ( file_exists($api_AUP)){
require_once ($api_AUP);
$keyreference = AlphaUserPointsHelper::buildKeyreference('plgaup_points4jomwallphotolike', $photoid );
AlphaUserPointsHelper::newpoints('plgaup_points4jomwallphotolike','', $keyreference);
}
}
}
$sql="select * from #__awd_jomalbum_photo_wall_like where photoid=".$photoid." order by id desc Limit 5";
$db->setQuery($sql);
$rows=$db->loadObjectList();
$sql="select count(*) from #__awd_jomalbum_photo_wall_like where photoid=".$photoid;
$db->setQuery($sql);
$totLike=$db->loadResult();
$link='index.php?option=com_awdwall&controller=colors';
$db->setQuery("SELECT params FROM #__menu WHERE `link`='".$link."'");
$params = json_decode( $db->loadResult(), true );
for($i=1; $i<=14; $i++)
{
$str_color = 'color'.$i;
$color[$i]= $params[$str_color];
}
?>
<div style="background-color:#<?php echo $color[12];?>;margin-bottom:5px;">
<?php
$user =& JFactory::getUser();
?>
<div style="width:100%; text-align:left;padding-bottom:3px;"><span class="likespan"><?php echo $totLike.' '.JText::_('People like this photo');?></span></div>
<?php
foreach($rows as $row)
{
$userprofileLinkAWDCUser=JRoute::_('index.php?option=com_awdwall&view=awdwall&layout=mywall&wuid='.$row->userid.'&Itemid='.AwdwallHelperUser::getComItemId());
$values=getCurrentUserDetails($row->userid);
$avatarTable=$values[2];
$userprofileLinkCUser=$values[1];
$values1=getUserDetails($row->userid,$avatarTable,$user->id);
$imgPath1=$values1[0];
?>
<a href="<?php echo $userprofileLinkCUser; ?>" style="padding-right:5px;"><img src="<?php echo $imgPath1; ?>" height="32" width="32" border="0"/></a>
<?php
}
?></div><?php
exit;
}
示例5: _buildKeyreference
protected function _buildKeyreference($plugin_function, $spc = '')
{
if (class_exists('AlphaUserPointsHelper') && method_exists('AlphaUserPointsHelper', 'buildKeyreference')) {
return AlphaUserPointsHelper::buildKeyreference($plugin_function, $spc);
}
}
示例6: setAUPPointsDownloaderToUploaderPrice
/**
* Assign points to the file uploader when a user download his file and use the price field
*
* @param mixed $files
*/
public static function setAUPPointsDownloaderToUploaderPrice($files)
{
$api_AUP = JPATH_SITE . DS . 'components' . DS . 'com_alphauserpoints' . DS . 'helper.php';
if (file_exists($api_AUP)) {
require_once $api_AUP;
foreach ($files as $file) {
if ($file->submitted_by) {
$referreid = AlphaUserPointsHelper::getAnyUserReferreID((int) $file->submitted_by);
if ($referreid) {
$key_reference = AlphaUserPointsHelper::buildKeyreference('plgaup_jdownloads_downloader_to_uploader_use_price', $file->file_id, (int) $file->submitted_by);
$rule_id = AlphaUserPointsHelper::getRuleID('plgaup_jdownloads_downloader_to_uploader_use_price');
$check_aup_reference = AlphaUserPointsHelper::checkReference($referreid, $key_reference, $rule_id);
// check the method when a prior download process is found
if ($check_aup_reference > 0) {
$method = (int) AlphaUserPointsHelper::getMethod('plgaup_jdownloads_downloader_to_uploader_use_price');
switch ($method) {
case 1:
// ONCE PER USER
// has already payed
return;
break;
case '2':
// ONCE PER DAY AND PER USER'
return;
break;
case '3':
// ONCE A DAY FOR A SINGLE USER ON ALL USERS
return;
break;
case '5':
// ONCE PER USER PER WEEK
return;
break;
case '6':
// ONCE PER USER PER MONTH
return;
break;
case '7':
// ONCE PER USER PER YEAR
return;
break;
/*
case '4': // WHENEVER
case '0':
default:
// points must be payed always
*/
}
}
$text = JText::_('COM_JDOWNLOADS_BACKEND_SET_AUP_DOWNLOAD_TEXT');
$text = sprintf($text, $file->file_title);
$price = floatval($file->price);
AlphaUserPointsHelper::newpoints('plgaup_jdownloads_downloader_to_uploader_use_price', $referreid, $key_reference, $text, '+' . $price, $text);
}
}
}
}
}
示例7: display
public function display($cachable = false, $urlparams = false)
{
$app = JFactory::getApplication();
require_once JPATH_ROOT . DS . 'components' . DS . 'com_alphauserpoints' . DS . 'helper.php';
$com_params = JComponentHelper::getParams('com_alphauserpoints');
$model = $this->getModel('alphauserpoints');
$view = $this->getView('account', 'html');
// current user
$user = JFactory::getUser();
// profil request
$userid = JFactory::getApplication()->input->get('userid', '', 'string');
if (!$user->id && !$com_params->get('allowGuestUserViewProfil', 1)) {
$msg = JText::_('ALERTNOTAUTH');
$this->setRedirect('index.php', $msg);
$this->redirect();
}
// check referre ID
if (!$userid) {
$referrerid = $model->_checkUser();
} else {
$referrerid = $userid;
}
// Rule Profile View
if ($referrerid != @$_SESSION['referrerid']) {
$keyreference = AlphaUserPointsHelper::buildKeyreference('sysplgaup_profile_view', $user->id);
$username = $user->username ? $user->username : JText::_('AUP_GUEST');
$datareference = JText::_('AUP_PROFILE_VIEW_REFERENCE') . ' ' . $username;
AlphaUserPointsHelper::userpoints('sysplgaup_profile_view', $referrerid, 0, $keyreference, $datareference);
}
// End rule Profile View
// Get the parameters of the active menu item
$params = $model->_getParamsAUP();
$num_item_activities = $params->get('num_item_activities', 10);
$_get_last_points = $model->_get_last_points($referrerid, $num_item_activities);
$_listing_last_points = $_get_last_points[0];
$_listing_total = $_get_last_points[1];
$_listing_limit = $_get_last_points[2];
$_listing_limitstart = $_get_last_points[3];
$rowsreferrees = $model->_get_referrees($referrerid);
$pointsearned = $model->_pointsearned();
// users points earned TOP 10
$totalpoints = $model->_totalpoints();
// entire community
$mypointsearned = $model->_mypointsearned($referrerid);
$mypointsspent = $model->_mypointsspent($referrerid);
$mypointsearnedthismonth = $model->_mypointsearnedthismonth($referrerid);
$mypointsspentthismonth = $model->_mypointsspentthismonth($referrerid);
$mypointsearnedthisday = $model->_mypointsearnedthisday($referrerid);
$mypointsspentthisday = $model->_mypointsspentthisday($referrerid);
$_average_age = _get_average_age_community();
$_user_info = AlphaUserPointsHelper::getUserInfo($referrerid);
$currenttotalpoints = $_user_info->points;
$lastupdate = $_user_info->last_update;
$referraluser = $_user_info->referraluser;
$myname = $_user_info->name;
$myusername = $_user_info->username;
$mybirthday = $_user_info->birthdate;
$referralname = "";
if ($referraluser) {
$referralinfo = AlphaUserPointsHelper::getUserInfo($referraluser);
$referralname = $referralinfo->username;
}
// get level/rank if exist
$userrankinfo = AlphaUserPointsHelper::getUserRank($referrerid);
// get medals if exist
$medalslistuser = AlphaUserPointsHelper::getUserMedals($referrerid);
// load avatar
$useAvatarFrom = $com_params->get('useAvatarFrom');
$height = 100;
if ($useAvatarFrom == 'alphauserpoints') {
$lang = JFactory::getLanguage();
$lang->load('com_media', JPATH_ADMINISTRATOR);
}
$avatar = getAvatar($useAvatarFrom, $_user_info, $height, $height, 'class="thumbnail"');
// Get coupons code
$resultCoupons = $model->_getMyCouponCode($referrerid);
$view->assign('params', $params);
$view->assign('cparams', $com_params);
$view->assign('referreid', $referrerid);
$view->assign('currenttotalpoints', $currenttotalpoints);
$view->assign('rowslastpoints', $_listing_last_points);
$view->assign('total', $_listing_total);
$view->assign('limit', $_listing_limit);
$view->assign('limitstart', $_listing_limitstart);
$view->assign('lastupdate', $lastupdate);
$view->assign('referraluser', $referraluser);
$view->assign('referralname', $referralname);
$view->assign('rowsreferrees', $rowsreferrees);
$view->assign('userid', $user->id);
$view->assign('userrankinfo', $userrankinfo);
$view->assign('medalslistuser', $medalslistuser);
$view->assign('pointsearned', $pointsearned);
$view->assign('totalpoints', $totalpoints);
$view->assign('mypointsearned', $mypointsearned);
$view->assign('mypointsspent', $mypointsspent);
$view->assign('mypointsearnedthismonth', $mypointsearnedthismonth);
$view->assign('mypointsspentthismonth', $mypointsspentthismonth);
$view->assign('mypointsearnedthisday', $mypointsearnedthisday);
$view->assign('mypointsspentthisday', $mypointsspentthisday);
$view->assign('myname', $myname);
//.........这里部分代码省略.........
示例8: sysplgaup_invitewithsuccess
public function sysplgaup_invitewithsuccess($referrerid, $data)
{
$ip = $_SERVER["REMOTE_ADDR"];
require_once JPATH_SITE . DS . 'components' . DS . 'com_alphauserpoints' . DS . 'helper.php';
$keyreference = AlphaUserPointsHelper::buildKeyreference('sysplgaup_invitewithsuccess', $ip);
AlphaUserPointsHelper::userpoints('sysplgaup_invitewithsuccess', $referrerid, 0, $ip, $data);
}
示例9: sendinvite
//.........这里部分代码省略.........
require_once JPATH_SITE . DS . 'components' . DS . 'com_alphauserpoints' . DS . 'helper.php';
// Limit
$max = $params->get('maxemailperinvite');
$maxperday = $params->get('maxinvitesperday');
$delay = intval($params->get('delaybetweeninvites'));
$counter = 0;
$rule_ID = $model->_getRuleID('sysplgaup_invite');
$refer_ID = AlphaUserPointsHelper::getAnyUserReferreID($user->id);
$numpoints4invite = AlphaUserPointsHelper::getPointsRule('sysplgaup_invite');
$totalpointsearned = 0;
$currentmaxperday = $model->_checkCurrentMaxPerDay($rule_ID, $user->id, $referrerid, $_SERVER["REMOTE_ADDR"]);
$checkdelay = 1;
if ($delay) {
$checkdelay = $model->_checkLastInviteForDelay($rule_ID, $user->id, $referrerid, $_SERVER["REMOTE_ADDR"], $delay);
}
if (!$checkdelay) {
$errorTime = JText::_('AUP_DELAY_BETWEEN_INVITES_INVALID');
JError::raiseWarning(0, $errorTime);
return $this->display();
}
if ($currentmaxperday < $maxperday) {
$mailer = JFactory::getMailer();
foreach ($emails as $email) {
$aEmails[0] = $model->_extractEmailsFromString($email);
$email = $aEmails[0][0];
if (JMailHelper::isEmailAddress($email)) {
$mailer->setSender(array($MailFrom, $FromName));
$mailer->setSubject($subject);
$mailer->isHTML((bool) $formatMail);
$mailer->CharSet = "utf-8";
$mailer->setBody($body);
$mailer->addRecipient($email);
if ($bcc2admin) {
// get all users allowed to receive e-mail system
$query = "SELECT email" . " FROM #__users" . " WHERE sendEmail='1' AND block='0'";
$db->setQuery($query);
$rowsAdmins = $db->loadObjectList();
foreach ($rowsAdmins as $rowsAdmin) {
$mailer->addBCC($rowsAdmin->email);
}
}
if ($mailer->Send() === true) {
if ($user->id) {
if (AlphaUserPointsHelper::checkRuleEnabled('sysplgaup_invite')) {
// insert email for tracking
$email2 = str_replace("@", " [at] ", $email);
// change @ because can be display on frontend in latest activity
$keyreference = AlphaUserPointsHelper::buildKeyreference('sysplgaup_invite', $email);
AlphaUserPointsHelper::userpoints('sysplgaup_invite', $refer_ID, 0, $keyreference, $email2);
$totalpointsearned = $totalpointsearned + $numpoints4invite;
}
} else {
// guest user : Insert IP and email fortracking
JTable::addIncludePath(JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_alphauserpoints' . DS . 'tables');
$row = JTable::getInstance('userspointsdetails');
$row->id = NULL;
$row->referreid = 'GUEST';
$row->points = 0;
$row->insert_date = $now;
$row->expire_date = '';
$row->rule = $rule_ID;
$row->approved = 1;
$row->status = 1;
$row->keyreference = $_SERVER["REMOTE_ADDR"];
$row->datareference = $email;
if (!$row->store()) {
JError::raiseError(500, $row->getError());
}
}
$counter++;
$currentmaxperday++;
}
if ($counter == $max || $currentmaxperday == $maxperday) {
break;
}
}
}
if ($totalpointsearned) {
$app->enqueueMessage(sprintf(JText::_('AUP_CONGRATULATION'), $totalpointsearned));
}
} else {
$maxperdaylimit = JText::_('AUP_MAXINVITESPERDAY') . " " . $maxperday;
$app->enqueueMessage($maxperdaylimit);
}
switch ($counter) {
case '0':
$message = JText::_('AUP_NO_EMAIL_HAS_BEEN_SENT');
break;
case '1':
$message = JText::_('AUP_EMAIL_SENT');
break;
default:
$message = JText::_('AUP_EMAILS_SENT');
$message = sprintf($message, $counter);
break;
}
$app->enqueueMessage($message);
$this->setRedirect('index.php?option=com_alphauserpoints&view=invite&Itemid=' . JFactory::getApplication()->input->get('Itemid', ''));
$this->redirect();
}
示例10: addComment
//.........这里部分代码省略.........
{
if($commentorlist)
{
foreach($commentorlist as $c)
{
if($c->commenter_id!=$user->id)
{
$ccc = &JFactory::getUser($c->commenter_id);
$rName = AwdwallHelperUser::getDisplayName($c->commenter_id);
$sName = AwdwallHelperUser::getDisplayName($user->id);
$wName = AwdwallHelperUser::getDisplayName($receiverId);
if($group_id)
{
$walllink=JRoute::_(JURI::base().'index.php?option=com_awdwall&task=viewgroup&groupid='.$group_id.'&Itemid='.$itemId.'#here'.$wallId,false) ;
}
else
{
$walllink=JRoute::_(JURI::base().'index.php?option=com_awdwall&view=awdwall&layout=mywall&wuid='.$receiverId.'&Itemid='.$itemId.'#here'.$wallId,false) ;
}
if($group_id)
{
$query = 'SELECT creator FROM #__awd_groups WHERE id = ' . (int)$group_id;
$db->setQuery($query);
$creator = $db->loadResult();
$query = 'SELECT title FROM #__awd_groups WHERE id = ' . (int)$group_id;
$db->setQuery($query);
$grpname = $db->loadResult();
$grplink=JRoute::_(JURI::base().'index.php?option=com_awdwall&task=viewgroup&groupid='.$group_id.'&Itemid='.$itemId,false) ;
$emailbody=JText::sprintf('COM_COMAWDWALL_EMAIL_NEW_GROUP_POST_COMMENT_BODY',$grplink,$grpname,$sName);
$emailsubject=$mainframe->getCfg('fromname').' '.JText::sprintf('COM_COMAWDWALL_EMAIL_SUBJECT_NEW_GROUP_COMMENT', $sName);
}
else
{
$emailbody=JText::sprintf('COM_COMAWDWALL_EMAIL_NEW_POST_COMMENT_BODY',$sName);
$emailsubject=$mainframe->getCfg('fromname').' '.JText::sprintf('COM_COMAWDWALL_EMAIL_SUBJECT_NEW_COMMENT', $sName);
}
$sitename=$mainframe->getCfg('fromname');
$siteaddress=JURI::base();
$useravatarimage=AwdwallHelperUser::getBigAvatar51($user->id);
$emailgreeting=JText::sprintf('COM_COMAWDWALL_EMAIL_GREETING', $rName);
$emailtext1=JText::_('COM_COMAWDWALL_EMAIL_NEW_POST_VIEW_CONVERSATION');
$emailtext2=JText::_('COM_COMAWDWALL_EMAIL_NEW_POST_SEE_POST');
$emailfooter=JText::sprintf('COM_COMAWDWALL_EMAIL_FOOTER',$siteaddress,$sitename);
$reciverurl=JURI::base().'index.php?option=com_awdwall&view=awdwall&layout=mywall&wuid='.$user->id.'&Itemid='.$itemId;
$emailcontent='<table cellspacing="0" cellpadding="0" style="border-collapse:collapse;width:620px"><tbody><tr><td style="font-size:16px;font-family:lucida grande,tahoma,verdana,arial,sans-serif;background:#313131;color:#ffffff;font-weight:bold;vertical-align:baseline;letter-spacing:-0.03em;text-align:left;padding:10px 38px 4px"><a target="_blank" href="'.$siteaddress.'" style="text-decoration:none" title="'.$siteaddress.'"><span style="background:#313131;color:#ffffff;font-weight:bold;font-family:lucida grande,tahoma,verdana,arial,sans-serif;vertical-align:middle;font-size:16px;letter-spacing:-0.03em;text-align:left;vertical-align:baseline"><span class="il">'.$sitename.'</span></span></a></td></tr></tbody></table><table cellspacing="0" cellpadding="0" style="border-collapse:collapse;width:620px"><tbody><tr><td style="border-right:1px solid #ccc;color:#333333;font-size:11px;border-bottom:1px solid #ccc;font-family:LucidaGrande,tahoma,verdana,arial,sans-serif;border-top:1px solid #ccc;padding:10px 25px;border-left:1px solid #ccc; background-color:#f7f7f7"><table width="100%" cellspacing="0" cellpadding="0" style="border-collapse:collapse"><tbody><tr><td style="font-size:11px;font-family:LucidaGrande,tahoma,verdana,arial,sans-serif;padding:10px 25px;color:#333333;width:620px"><table width="100%" cellspacing="0" cellpadding="0" style="border-collapse:collapse"><tbody><tr><td style="font-size:11px;font-family:LucidaGrande,tahoma,verdana,arial,sans-serif;padding-bottom:10px"><table cellspacing="0" cellpadding="0" style="border-collapse:collapse"><tbody><tr><td colspan="2" valign="top" style="height:30px;"><span style="font-size:13px;">'.$emailgreeting.'</span></td></tr><tr><td valign="top" style="width:100%;"><span style="font-size:13px">'.$emailbody.'</span></td><td valign="top" style="padding-right:10px;font-size:0px"><a target="_blank" style="color:#3b5998;text-decoration:none" href="'.$reciverurl.'" title="'.$rName.'"><img style="border:0" src="'.$useravatarimage.'" /></a></td></tr></tbody></table></td></tr><tr><td style="font-size:11px;font-family:LucidaGrande,tahoma,verdana,arial,sans-serif"><table cellspacing="0" cellpadding="0" border="0" style="border-collapse:collapse;width:100%"><tbody><tr><td style="font-size:11px;font-family:LucidaGrande,tahoma,verdana,arial,sans-serif;padding:0px;border-left:none;border-right:none;"><table cellspacing="0" cellpadding="0" style="border-collapse:collapse"><tbody><tr><td style="font-size:11px;font-family:LucidaGrande,tahoma,verdana,arial,sans-serif;padding-right:10px"><table cellspacing="0" cellpadding="0" style="border-collapse:collapse"><tbody><tr><td ><table cellspacing="0" cellpadding="0" style="border-collapse:collapse"><tbody><tr><td style="font-size:13px;font-family:LucidaGrande,tahoma,verdana,arial,sans-serif;padding:2px 6px 4px 0px;">'.$emailtext1.'</td></tr></tbody></table></td></tr></tbody></table></td><td style="font-size:11px;font-family:LucidaGrande,tahoma,verdana,arial,sans-serif"><table cellspacing="0" cellpadding="0" style="border-collapse:collapse"><tbody><tr><td style="border-width:1px;border-style:solid;border-color:#E3C823;background-color:#FFF9D9"><table cellspacing="0" cellpadding="0" style="border-collapse:collapse"><tbody><tr><td style="font-size:11px;font-family:LucidaGrande,tahoma,verdana,arial,sans-serif;padding:2px 6px 4px;border-top:1px solid #fff"><a target="_blank" style="color:#6176b7;text-decoration:none" href="'.$walllink.'"><span style="font-weight:bold;white-space:nowrap;color:#3b5b98;font-size:11px">'.$emailtext2.'</span></a></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table></td></tr><tr><td> </td></tr><tr><td style="font-size:13px;font-family:LucidaGrande,tahoma,verdana,arial,sans-serif;padding:0px;border-left:none;border-right:none;">'.$emailfooter.'</td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table>';
$body = $emailcontent;
$mailer = & JFactory::getMailer();
$mailer->setSender(array($mainframe->getCfg('mailfrom'), $mainframe->getCfg('fromname')));
$mailer->setSubject($emailsubject);
$mailer->setBody($body);
$mailer->IsHTML(1);
$mailer->addRecipient($ccc->email);
$rs = $mailer->Send();
}
}
}
}
// prepend html to main wall
// AUP POINTS
if($isReply!=1)
{
$query='select type from #__awd_wall where id='.$cid.' and wall_date IS NOT NULL';
$db->setQuery($query);
$type = $db->loadResult();
$query='select commenter_id from #__awd_wall where id='.$cid.' and wall_date IS NOT NULL';
$db->setQuery($query);
$commenter_id = $db->loadResult();
if($commenter_id!=$user->id)
{
$api_AUP = JPATH_SITE.DS.'components'.DS.'com_alphauserpoints'.DS.'helper.php';
if ( file_exists($api_AUP)){
require_once ($api_AUP);
$keyreference = AlphaUserPointsHelper::buildKeyreference('plgaup_points4jomwallupdate', $cid );
if($type=='image')
{
AlphaUserPointsHelper::newpoints('plgaup_points4jomwallphotocomment','', $keyreference);
}
else
{
AlphaUserPointsHelper::newpoints('plgaup_points4jomwallwallcomment','', $keyreference);
}
}
}
}
$view = &$this->getView('awdwall', 'html');
$view->setLayout('comment_block');
$view->getCommentBlock();
}else{
$this->setRedirect(JRoute::_('index.php?option=com_awdwall&&view=awdwall&layout=main&Itemid='.$itemId, false), JText::_('Need to login'));
}
exit;
}