当前位置: 首页>>代码示例>>PHP>>正文


PHP acymailing_frontendLink函数代码示例

本文整理汇总了PHP中acymailing_frontendLink函数的典型用法代码示例。如果您正苦于以下问题:PHP acymailing_frontendLink函数的具体用法?PHP acymailing_frontendLink怎么用?PHP acymailing_frontendLink使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了acymailing_frontendLink函数的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: acymailing_replaceusertags

 function acymailing_replaceusertags(&$email, &$user, $send = true)
 {
     if (!empty($email->altbody)) {
         $email->altbody = str_replace(array('{statpicture}', '{nostatpicture}'), '', $email->altbody);
     }
     if (!$email->sendHTML or empty($email->type) or !in_array($email->type, array('news', 'autonews', 'followup', 'welcome', 'unsub', 'joomlanotification')) or strpos($email->body, '{nostatpicture}')) {
         $email->body = str_replace(array('{statpicture}', '{nostatpicture}'), '', $email->body);
         return;
     }
     if (empty($user->subid) || !$send) {
         $pictureLink = ACYMAILING_LIVE . $this->params->get('picture', 'media/com_acymailing/images/statpicture.png');
     } else {
         $config = acymailing_config();
         $itemId = $config->get('itemid', 0);
         $item = empty($itemId) ? '' : '&Itemid=' . $itemId;
         $pictureLink = acymailing_frontendLink('index.php?option=com_acymailing&ctrl=stats&mailid=' . $email->mailid . '&subid=' . $user->subid . $item);
     }
     $widthsize = $this->params->get('width', 50);
     $heightsize = $this->params->get('height', 1);
     $width = empty($widthsize) ? '' : ' width="' . $widthsize . '" ';
     $height = empty($heightsize) ? '' : ' height="' . $heightsize . '" ';
     $statPicture = '<img class="spict" alt="' . $this->params->get('alttext', '') . '" src="' . $pictureLink . '"  border="0" ' . $height . $width . '/>';
     if (strpos($email->body, '{statpicture}')) {
         $email->body = str_replace('{statpicture}', $statPicture, $email->body);
     } elseif (strpos($email->body, '</body>')) {
         $email->body = str_replace('</body>', $statPicture . '</body>', $email->body);
     } else {
         $email->body .= $statPicture;
     }
 }
开发者ID:madcsaba,项目名称:li-de,代码行数:30,代码来源:stats.php

示例2: acymailing_replacetags

 function acymailing_replacetags(&$email, $send = true)
 {
     $match = '#{share:(.*)}#Ui';
     $variables = array('body', 'altbody');
     $found = false;
     $results = array();
     foreach ($variables as $var) {
         if (empty($email->{$var})) {
             continue;
         }
         $found = preg_match_all($match, $email->{$var}, $results[$var]) || $found;
         if (empty($results[$var][0])) {
             unset($results[$var]);
         }
     }
     if (!$found) {
         return;
     }
     $archiveLink = acymailing_frontendLink('index.php?option=com_acymailing&ctrl=archive&task=view&mailid=' . $email->mailid, $this->params->get('template') == 'component' ? true : false);
     $tags = array();
     foreach ($results as $var => $allresults) {
         foreach ($allresults[0] as $i => $tagname) {
             if (isset($tags[$tagname])) {
                 continue;
             }
             $arguments = explode('|', $allresults[1][$i]);
             $tag = new stdClass();
             $tag->network = $arguments[0];
             for ($i = 1, $a = count($arguments); $i < $a; $i++) {
                 $args = explode(':', $arguments[$i]);
                 if (isset($args[1])) {
                     $tag->{$args}[0] = $args[1];
                 } else {
                     $tag->{$args}[0] = true;
                 }
             }
             if ($tag->network == 'facebook') {
                 $tags[$tagname] = '<a target="_blank" href="http://www.facebook.com/sharer.php?u=' . urlencode($archiveLink) . '&t=' . urlencode($email->subject) . '" title="' . JText::sprintf('SOCIAL_SHARE', 'Facebook') . '"><img alt="Facebook" src="' . ACYMAILING_LIVE . $this->params->get('picturefb', 'media/com_acymailing/images/fbshare.gif') . '" /></a>';
             } elseif ($tag->network == 'twitter') {
                 $text = JText::sprintf('SHARE_TEXT', $archiveLink);
                 $tags[$tagname] = '<a target="_blank" href="http://twitter.com/home?status=' . urlencode($text) . '" title="' . JText::sprintf('SOCIAL_SHARE', 'Twitter') . '"><img alt="Twitter" src="' . ACYMAILING_LIVE . $this->params->get('picturetwitter', 'media/com_acymailing/images/twittershare.png') . '" /></a>';
             } elseif ($tag->network == 'linkedin') {
                 $tags[$tagname] = '<a target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&url=' . urlencode($archiveLink) . '&title=' . urlencode($email->subject) . '" title="' . JText::sprintf('SOCIAL_SHARE', 'LinkedIn') . '"><img alt="LinkedIn" src="' . ACYMAILING_LIVE . $this->params->get('picturelinkedin', 'media/com_acymailing/images/linkedin.png') . '" /></a>';
             } elseif ($tag->network == 'hyves') {
                 $tags[$tagname] = '<a target="_blank" href="http://www.hyves-share.nl/button/respect/?hc_hint=1&url=' . urlencode($archiveLink) . '&title=' . urlencode($email->subject) . '" title="' . JText::sprintf('SOCIAL_SHARE', 'Hyves') . '"><img alt="Hyves" src="' . ACYMAILING_LIVE . $this->params->get('picturehyves', 'media/com_acymailing/images/hyvesshare.png') . '" /></a>';
             } elseif ($tag->network == 'google') {
                 $tags[$tagname] = '<a target="_blank" href="https://plus.google.com/share?url=' . urlencode($archiveLink) . '" title="' . JText::sprintf('SOCIAL_SHARE', 'Google+') . '"><img alt="Google+" src="' . ACYMAILING_LIVE . $this->params->get('picturegoogleplus', 'media/com_acymailing/images/google_plusshare.png') . '" /></a>';
             }
             if (file_exists(ACYMAILING_MEDIA . 'plugins' . DS . 'share.php')) {
                 ob_start();
                 require ACYMAILING_MEDIA . 'plugins' . DS . 'share.php';
                 $tags[$tagname] = ob_get_clean();
             }
         }
     }
     $email->body = str_replace(array_keys($tags), $tags, $email->body);
     $email->altbody = str_replace(array_keys($tags), '', $email->altbody);
 }
开发者ID:alesconti,项目名称:FF_2015,代码行数:58,代码来源:share.php

示例3: acymailing_replaceusertags

 function acymailing_replaceusertags(&$email, &$user, $send = true)
 {
     $variables = array('subject', 'body', 'altbody');
     $acypluginsHelper = acymailing_get('helper.acyplugins');
     $tags = $acypluginsHelper->extractTags($email, 'print');
     $archiveLink = acymailing_frontendLink('index.php?option=com_acymailing&ctrl=archive&task=view&mailid=' . $email->mailid, $this->params->get('template', 'component') == 'component' ? true : false);
     $addkey = !empty($email->key) ? '&key=' . $email->key : '';
     $adduserkey = !empty($user->key) ? '&subid=' . $user->subid . '-' . $user->key : '';
     $link = $archiveLink . '&print=1' . $addkey . $adduserkey;
     foreach ($variables as $var) {
         if (empty($email->{$var})) {
             continue;
         }
         $email->{$var} = str_replace(array_keys($tags), $link, $email->{$var});
     }
 }
开发者ID:johngrange,项目名称:wookeyholeweb,代码行数:16,代码来源:share.php

示例4: view


//.........这里部分代码省略.........
			$listmail = acymailing_get('class.listmail');
			$allLists = $listmail->getLists($mailid);
			$access_sub = false;
			if(!empty($allLists)){
				foreach($allLists as $alist){
					if(empty($alist->mailid)) continue;
					if(!$alist->published OR !$alist->visible OR $alist->access_sub == 'none') continue;
					if(acymailing_isAllowed($alist->access_sub)){
						$access_sub = true;
						break;
					}

				}
			}
		}

		$mailClass = acymailing_get('helper.mailer');
		$mailClass->loadedToSend = false;
		$oneMail = $mailClass->load($mailid);

		if(empty($oneMail->mailid)){
			return JError::raiseError( 404, 'Newsletter not found : '.$mailid );
		}

		if(!$frontEndManagement AND (!$access_sub OR !$oneMail->published OR !$oneMail->visible)){
			$key = JRequest::getCmd('key');
			if(empty($key) OR $key !== $oneMail->key){
				$reason = (!$oneMail->published) ? 'Newsletter not published' : (!$oneMail->visible ? 'Newsletter not visible' : (!$access_sub ? 'Access not allowed' : ''));
				$app->enqueueMessage('You can not have access to this e-mail : '.$reason,'error');
				$app->redirect(acymailing_completeLink('lists',false,true));
				return false;
			}
		}

		$fshare = '';
		if(preg_match('#<img[^>]*id="pictshare"[^>]*>#i',$oneMail->body,$pregres) && preg_match('#src="([^"]*)"#i',$pregres[0],$pict)){
			$fshare = $pict[1];
		}elseif(preg_match('#<img[^>]*class="[^"]*pictshare[^"]*"[^>]*>#i',$oneMail->body,$pregres) && preg_match('#src="([^"]*)"#i',$pregres[0],$pict)){
			$fshare = $pict[1];
		}elseif(preg_match('#class="acymailing_content".*(<img[^>]*>)#is',$oneMail->body,$pregres) && preg_match('#src="([^"]*)"#i',$pregres[1],$pict)){
			if(strpos($pregres[1],JText::_('JOOMEXT_READ_MORE')) === false) $fshare = $pict[1];
		}

		if(!empty($fshare)){
			$document->setMetadata('og:image', $fshare);
		}

		$document->setMetadata('og:url',acymailing_frontendLink('index.php?option=com_acymailing&ctrl=archive&task=view&mailid='.$oneMail->mailid,JRequest::getCmd('tmpl') == 'component' ? true : false));
		$document->setMetadata('og:title',$oneMail->subject);
		if(!empty($oneMail->metadesc))$document->setMetadata('og:description',$oneMail->metadesc);

		$subkeys = JRequest::getString('subid',JRequest::getString('sub'));
		if(!empty($subkeys)){
			$db = JFactory::getDBO();
			$subid = intval(substr($subkeys,0,strpos($subkeys,'-')));
			$subkey = substr($subkeys,strpos($subkeys,'-')+1);
			$db->setQuery('SELECT * FROM '.acymailing_table('subscriber').' WHERE `subid` = '.$db->Quote($subid).' AND `key` = '.$db->Quote($subkey).' LIMIT 1');
			$receiver = $db->loadObject();
		}

		if(empty($receiver) AND !empty($my->email)){
			$userClass = acymailing_get('class.subscriber');
			$receiver = $userClass->get($my->email);
		}

		if(empty($receiver)){
			$receiver = new stdClass();
			$receiver->name = JText::_('VISITOR');
		}

		$oneMail->sendHTML = true;
		$mailClass->dispatcher->trigger('acymailing_replaceusertags',array(&$oneMail,&$receiver,false));

		$pathway->addItem($oneMail->subject);

		$document	= JFactory::getDocument();
		acymailing_setPageTitle($oneMail->subject);

		if (!empty($oneMail->metadesc)) {
			$document->setDescription( $oneMail->metadesc );
		}
		if (!empty($oneMail->metakey)) {
			$document->setMetadata('keywords', $oneMail->metakey);
		}

		$this->assignRef('mail',$oneMail);
		$this->assignRef('frontEndManagement',$frontEndManagement);
		$this->assignRef('list',$oneList);
		$config =& acymailing_config();
		$this->assignRef('config',$config);
		$this->assignRef('my',$my);
		$this->assignRef('receiver',$receiver);
		$this->assignRef('values',$values);

		if($oneMail->html){
			$templateClass = acymailing_get('class.template');
			$templateClass->archiveSection = true;
			$templateClass->displayPreview('newsletter_preview_area',$oneMail->tempid,$oneMail->subject);
		}
	}
开发者ID:utopszkij,项目名称:lmp,代码行数:101,代码来源:view.html.php

示例5: replaceSubscriptionTag

 function replaceSubscriptionTag(&$allresults, $i, &$user, &$email)
 {
     if (empty($user->subid)) {
         return '';
     }
     if (empty($user->key)) {
         $user->key = acymailing_generateKey(14);
         $db = JFactory::getDBO();
         $db->setQuery('UPDATE ' . acymailing_table('subscriber') . ' SET `key`= ' . $db->Quote($user->key) . ' WHERE subid = ' . (int) $user->subid . ' LIMIT 1');
         $db->query();
     }
     $config = acymailing_config();
     $itemId = $config->get('itemid', 0);
     $item = empty($itemId) ? '' : '&Itemid=' . $itemId;
     $lang = empty($email->language) ? '' : '&lang=' . $email->language;
     if ($allresults[1][$i] == 'confirm') {
         //confirm your subscription link
         $itemId = $this->params->get('confirmitemid', 0);
         if (!empty($itemId)) {
             $item = '&Itemid=' . $itemId;
         }
         $myLink = acymailing_frontendLink('index.php?subid=' . $user->subid . '&option=com_acymailing&ctrl=user&task=confirm&key=' . urlencode($user->key) . $item . $lang, (bool) $this->params->get('confirmtemplate', false));
         if (empty($allresults[2][$i])) {
             return $myLink;
         }
         return '<a target="_blank" href="' . $myLink . '">' . $allresults[2][$i] . '</a>';
     } elseif ($allresults[1][$i] == 'modify') {
         //modify your subscription link
         $itemId = $this->params->get('modifyitemid', 0);
         if (!empty($itemId)) {
             $item = '&Itemid=' . $itemId;
         }
         $myLink = acymailing_frontendLink('index.php?subid=' . $user->subid . '&option=com_acymailing&ctrl=user&task=modify&key=' . urlencode($user->key) . $item . $lang, (bool) $this->params->get('modifytemplate', false));
         if (empty($allresults[2][$i])) {
             return $myLink;
         }
         return '<a style="text-decoration:none;" target="_blank" href="' . $myLink . '"><span class="acymailing_unsub">' . $allresults[2][$i] . '</span></a>';
     }
     //unsubscribe link
     $itemId = $this->params->get('unsubscribeitemid', 0);
     if (!empty($itemId)) {
         $item = '&Itemid=' . $itemId;
     }
     $myLink = acymailing_frontendLink('index.php?subid=' . $user->subid . '&option=com_acymailing&ctrl=user&task=out&mailid=' . $email->mailid . '&key=' . urlencode($user->key) . $item . $lang, (bool) $this->params->get('unsubscribetemplate', false));
     if (!$this->listunsubscribe && $this->params->get('listunsubscribe', 0) && method_exists($email, 'addCustomHeader')) {
         $this->listunsubscribe = true;
         $mailto = $this->params->get('listunsubscribeemail');
         if (empty($mailto)) {
             $mailto = @$email->replyemail;
         }
         if (empty($mailto)) {
             $mailto = $config->get('reply_email');
         }
         $email->addCustomHeader('List-Unsubscribe: <' . $myLink . '>, <mailto:' . $mailto . '?subject=unsubscribe_user_' . $user->subid . '&body=Please%20unsubscribe%20user%20ID%20' . $user->subid . '>');
     }
     if (empty($allresults[2][$i])) {
         return $myLink;
     }
     return '<a style="text-decoration:none;" target="_blank" href="' . $myLink . '"><span class="acymailing_unsub">' . $allresults[2][$i] . '</span></a>';
 }
开发者ID:ForAEdesWeb,项目名称:AEW1,代码行数:60,代码来源:tagsubscription.php

示例6: frontendLink

 static function frontendLink($link, $popup = false)
 {
     return acymailing_frontendLink($link, $popup);
 }
开发者ID:ForAEdesWeb,项目名称:AEW1,代码行数:4,代码来源:helper.php

示例7: _replaceContent

 private function _replaceContent(&$tag)
 {
     $oldFormat = empty($tag->format);
     if (!ACYMAILING_J16) {
         $query = 'SELECT a.*,b.name as authorname, c.alias as catalias, c.title as cattitle, c.image AS catpict, s.alias as secalias, s.title as sectitle FROM ' . acymailing_table('content', false) . ' as a ';
         $query .= 'LEFT JOIN ' . acymailing_table('users', false) . ' as b ON a.created_by = b.id ';
         $query .= ' LEFT JOIN ' . acymailing_table('categories', false) . ' AS c ON c.id = a.catid ';
         $query .= ' LEFT JOIN ' . acymailing_table('sections', false) . ' AS s ON s.id = a.sectionid ';
         $query .= 'WHERE a.id = ' . $tag->id . ' LIMIT 1';
     } else {
         $query = 'SELECT a.*,b.name as authorname, c.alias as catalias, c.title as cattitle, c.params AS catparams FROM ' . acymailing_table('content', false) . ' as a ';
         $query .= 'LEFT JOIN ' . acymailing_table('users', false) . ' as b ON a.created_by = b.id ';
         $query .= ' LEFT JOIN ' . acymailing_table('categories', false) . ' AS c ON c.id = a.catid ';
         $query .= 'WHERE a.id = ' . $tag->id . ' LIMIT 1';
     }
     $this->db->setQuery($query);
     $article = $this->db->loadObject();
     if (empty($article)) {
         $app = JFactory::getApplication();
         if ($app->isAdmin()) {
             $app->enqueueMessage('The article "' . $tag->id . '" could not be loaded', 'notice');
         }
         return '';
     }
     if (empty($tag->lang) && !empty($this->newslanguage) && !empty($this->newslanguage->lang_code)) {
         $tag->lang = $this->newslanguage->lang_code . ',' . $this->newslanguage->lang_id;
     }
     $this->acypluginsHelper->translateItem($article, $tag, 'content');
     $varFields = array();
     foreach ($article as $fieldName => $oneField) {
         $varFields['{' . $fieldName . '}'] = $oneField;
     }
     $this->acypluginsHelper->cleanHtml($article->introtext);
     $this->acypluginsHelper->cleanHtml($article->fulltext);
     if ($this->params->get('integration') == 'jreviews' && !empty($article->images)) {
         $firstpict = explode('|', trim(reset(explode("\n", $article->images))) . '|||||||');
         if (!empty($firstpict[0])) {
             $picturePath = file_exists(ACYMAILING_ROOT . 'images' . DS . 'stories' . DS . str_replace('/', DS, $firstpict[0])) ? ACYMAILING_LIVE . 'images/stories/' . $firstpict[0] : ACYMAILING_LIVE . 'images/' . $firstpict[0];
             $myPict = '<img src="' . $picturePath . '" alt="" hspace="5" style="margin:5px" align="left" border="' . intval($firstpict[5]) . '" />';
             $article->introtext = $myPict . $article->introtext;
         }
     }
     $completeId = $article->id;
     $completeCat = $article->catid;
     if (!empty($article->alias)) {
         $completeId .= ':' . $article->alias;
     }
     if (!empty($article->catalias)) {
         $completeCat .= ':' . $article->catalias;
     }
     if (empty($tag->itemid)) {
         if (!ACYMAILING_J16) {
             $completeSec = $article->sectionid;
             if (!empty($article->secalias)) {
                 $completeSec .= ':' . $article->secalias;
             }
             if ($this->params->get('integration') == 'flexicontent' && class_exists('FlexicontentHelperRoute')) {
                 $link = FlexicontentHelperRoute::getItemRoute($completeId, $completeCat, $completeSec);
             } else {
                 $link = ContentHelperRoute::getArticleRoute($completeId, $completeCat, $completeSec);
             }
         } else {
             if ($this->params->get('integration') == 'flexicontent' && class_exists('FlexicontentHelperRoute')) {
                 $link = FlexicontentHelperRoute::getItemRoute($completeId, $completeCat);
             } else {
                 $link = ContentHelperRoute::getArticleRoute($completeId, $completeCat);
             }
         }
     } else {
         $link = 'index.php?option=com_content&view=article&id=' . $completeId . '&catid=' . $completeCat;
     }
     if ($this->params->get('integration') == 'flexicontent' && !class_exists('FlexicontentHelperRoute')) {
         $link = 'index.php?option=com_flexicontent&view=items&id=' . $completeId;
     } elseif ($this->params->get('integration') == 'jaggyblog') {
         $link = 'index.php?option=com_jaggyblog&task=viewpost&id=' . $completeId;
     }
     if (!empty($tag->itemid)) {
         $link .= '&Itemid=' . $tag->itemid;
     }
     if (!empty($tag->lang)) {
         $link .= (strpos($link, '?') ? '&' : '?') . 'lang=' . substr($tag->lang, 0, strpos($tag->lang, ','));
     }
     if (!empty($tag->autologin)) {
         $link .= (strpos($link, '?') ? '&' : '?') . 'user={usertag:username|urlencode}&passw={usertag:password|urlencode}';
     }
     if (empty($tag->lang) && !empty($article->language) && $article->language != '*') {
         if (!isset($this->langcodes[$article->language])) {
             $this->db->setQuery('SELECT sef FROM #__languages WHERE lang_code = ' . $this->db->Quote($article->language) . ' ORDER BY `published` DESC LIMIT 1');
             $this->langcodes[$article->language] = $this->db->loadResult();
             if (empty($this->langcodes[$article->language])) {
                 $this->langcodes[$article->language] = $article->language;
             }
         }
         $link .= (strpos($link, '?') ? '&' : '?') . 'lang=' . $this->langcodes[$article->language];
     }
     $link = acymailing_frontendLink($link);
     $varFields['{link}'] = $link;
     $afterTitle = '';
     $afterArticle = '';
     $contentText = '';
//.........这里部分代码省略.........
开发者ID:proyectoseb,项目名称:ShoppyStore,代码行数:101,代码来源:tagcontent.php

示例8: acymailing_replaceusertags

 function acymailing_replaceusertags(&$email, &$user, $send = true)
 {
     $match = '#(?:{|%7B)(readonline|forward)([^}]*)(?:}|%7D)(.*)(?:{|%7B)/(readonline|forward)(?:}|%7D)#Uis';
     $variables = array('body', 'altbody');
     $found = false;
     foreach ($variables as $var) {
         if (empty($email->{$var})) {
             continue;
         }
         $found = preg_match_all($match, $email->{$var}, $results[$var]) || $found;
         if (empty($results[$var][0])) {
             unset($results[$var]);
         }
     }
     if (!$found) {
         return;
     }
     $config = acymailing_config();
     $tags = array();
     foreach ($results as $var => $allresults) {
         foreach ($allresults[0] as $i => $oneTag) {
             if (isset($tags[$oneTag])) {
                 continue;
             }
             $arguments = explode('|', strip_tags(str_replace('%7C', '|', $allresults[2][$i])));
             $tag = new stdClass();
             $tag->type = $allresults[1][$i];
             $tag->template = $tag->type == 'readonline' ? $this->params->get('viewtemplate', 'notemplate') : $this->params->get('forwardtemplate', 'notemplate');
             $tag->itemid = $config->get('itemid', 0);
             for ($j = 0, $a = count($arguments); $j < $a; $j++) {
                 $args = explode(':', $arguments[$j]);
                 $arg0 = trim($args[0]);
                 if (empty($arg0)) {
                     continue;
                 }
                 if (isset($args[1])) {
                     $tag->{$arg0} = $args[1];
                 } else {
                     $tag->{$arg0} = true;
                 }
             }
             $addkey = !empty($email->key) && $this->params->get('addkey', 'yes') == 'yes' ? '&key=' . $email->key : '';
             $adduserkey = !empty($user->key) && $this->params->get('adduserkey', 'yes') == 'yes' ? '&subid=' . $user->subid . '-' . $user->key : '';
             $tmpl = $tag->template == 'notemplate' ? '&tmpl=component' : '';
             $item = empty($tag->itemid) ? '' : '&Itemid=' . $tag->itemid;
             $lang = empty($email->language) ? '' : '&lang=' . $email->language;
             if ($tag->type == 'readonline') {
                 $link = acymailing_frontendLink('index.php?option=com_acymailing&ctrl=archive&task=view&mailid=' . $email->mailid . $addkey . $adduserkey . $tmpl . $item . $lang);
             } elseif ($tag->type == 'forward') {
                 $link = acymailing_frontendLink('index.php?option=com_acymailing&ctrl=archive&task=forward&mailid=' . $email->mailid . $addkey . $adduserkey . $tmpl . $item . $lang);
             }
             if (empty($allresults[3][$i])) {
                 $tags[$oneTag] = $link;
             } else {
                 $tags[$oneTag] = '<a style="text-decoration:none;" href="' . $link . '"><span class="acymailing_online">' . $allresults[3][$i] . '</span></a>';
             }
         }
     }
     $email->body = str_replace(array_keys($tags), $tags, $email->body);
     if (!empty($email->altbody)) {
         $email->altbody = str_replace(array_keys($tags), $tags, $email->altbody);
     }
 }
开发者ID:brenot,项目名称:forumdesenvolvimento,代码行数:63,代码来源:online.php

示例9: _replaceContent


//.........这里部分代码省略.........
             if ($this->params->get('integration') == 'flexicontent' && class_exists('FlexicontentHelperRoute')) {
                 $link = FlexicontentHelperRoute::getItemRoute($completeId, $completeCat);
             } else {
                 $link = ContentHelperRoute::getArticleRoute($completeId, $completeCat);
             }
         }
     } else {
         $link = 'index.php?option=com_content&view=article&id=' . $completeId . '&catid=' . $completeCat;
     }
     if ($this->params->get('integration') == 'flexicontent' && !class_exists('FlexicontentHelperRoute')) {
         $link = 'index.php?option=com_flexicontent&view=items&id=' . $completeId;
     } elseif ($this->params->get('integration') == 'jaggyblog') {
         $link = 'index.php?option=com_jaggyblog&task=viewpost&id=' . $completeId;
     }
     if (!empty($tag->itemid)) {
         $link .= '&Itemid=' . $tag->itemid;
     }
     if (!empty($tag->lang)) {
         $link .= (strpos($link, '?') ? '&' : '?') . 'lang=' . substr($tag->lang, 0, strpos($tag->lang, ','));
     }
     if (!empty($tag->autologin)) {
         $link .= (strpos($link, '?') ? '&' : '?') . 'user={usertag:username|urlencode}&passw={usertag:password|urlencode}';
     }
     if (empty($tag->lang) && !empty($article->language) && $article->language != '*') {
         if (!isset($this->langcodes[$article->language])) {
             $db->setQuery('SELECT sef FROM #__languages WHERE lang_code = ' . $db->Quote($article->language) . ' ORDER BY `published` DESC LIMIT 1');
             $this->langcodes[$article->language] = $db->loadResult();
             if (empty($this->langcodes[$article->language])) {
                 $this->langcodes[$article->language] = $article->language;
             }
         }
         $link .= (strpos($link, '?') ? '&' : '?') . 'lang=' . $this->langcodes[$article->language];
     }
     $link = acymailing_frontendLink($link);
     $styleTitle = '';
     $styleTitleEnd = '';
     if ($tag->type != "title") {
         $styleTitle = '<h2 class="acymailing_title">';
         $styleTitleEnd = '</h2>';
     }
     if (empty($tag->notitle)) {
         if (!empty($tag->link)) {
             $result .= '<a href="' . $link . '" ';
             if ($tag->type != "title") {
                 $result .= 'style="text-decoration:none" name="content-' . $article->id . '" ';
             }
             $result .= 'target="_blank" >' . $styleTitle . $article->title . $styleTitleEnd . '</a>';
         } else {
             $result .= $styleTitle . $article->title . $styleTitleEnd;
         }
     }
     if (!empty($tag->author)) {
         $authorName = empty($article->created_by_alias) ? $article->authorname : $article->created_by_alias;
         if ($tag->type == 'title') {
             $result .= '<br/>';
         }
         $result .= '<span class="authorname">' . $authorName . '</span><br/>';
     }
     if (!empty($tag->created)) {
         if ($tag->type == 'title') {
             $result .= '<br/>';
         }
         $dateFormat = empty($tag->dateformat) ? JText::_('DATE_FORMAT_LC2') : $tag->dateformat;
         $result .= '<span class="createddate">' . JHTML::_('date', $article->created, $dateFormat) . '</span><br/>';
     }
     if (!isset($tag->pict) and $tag->type != 'title') {
开发者ID:freaqzilla,项目名称:joomla-site,代码行数:67,代码来源:tagcontent.php

示例10: acymailing_getDate

        echo "row{$k}";
        ?>
">
									<td align="center" style="text-align:center">
										<?php 
        echo $i + 1;
        ?>
									</td>
									<td>
										<?php 
        echo acymailing_getDate($row->senddate);
        ?>
									</td>
									<td>
										<?php 
        $link = acymailing_frontendLink('index.php?option=com_acymailing&ctrl=archive&task=view&subid=' . $this->subscriber->subid . '-' . $this->subscriber->key . '&mailid=' . $row->mailid . '-' . strip_tags($row->alias), (bool) $this->config->get('open_popup', 1));
        echo '<a ' . ($this->config->get('open_popup', 1) ? 'class="modal" rel="{handler: \'iframe\', size: {x: ' . $width . ', y: ' . $height . '}}"' : '') . ' href="' . $link . '">' . $row->subject . '</a>';
        ?>
									</td>
									<td align="center" style="text-align:center">
										<?php 
        echo $row->html ? JText::_('HTML') : JText::_('JOOMEXT_TEXT');
        ?>
									</td>
									<td align="center" style="text-align:center">
										<?php 
        echo $row->open;
        ?>
									</td>
									<td align="center" style="text-align:center">
										<?php 
开发者ID:sumithMadhushan,项目名称:joomla-project,代码行数:31,代码来源:form.php

示例11: _replaceProduct

    function _replaceProduct($tag, &$email)
    {
        if (empty($tag->lang) && !empty($email->language)) {
            $tag->lang = $email->language;
        }
        $this->db->setQuery('SELECT b.*,a.*
						FROM ' . acymailing_table('hikashop_product', false) . ' as a
						LEFT JOIN ' . acymailing_table('hikashop_file', false) . ' as b ON a.product_id=b.file_ref_id AND file_type=\'product\'
						WHERE a.product_id = ' . $tag->id . '
						ORDER BY b.file_ordering ASC, b.file_id ASC
						LIMIT 1');
        $product = $this->db->loadObject();
        if (empty($product)) {
            $app = JFactory::getApplication();
            if ($app->isAdmin()) {
                $app->enqueueMessage('The product "' . $tag->id . '" could not be loaded', 'notice');
            }
            return '';
        }
        if ($product->product_type == 'variant') {
            $this->db->setQuery('SELECT * FROM ' . hikashop_table('variant') . ' AS a LEFT JOIN ' . hikashop_table('characteristic') . ' AS b ON a.variant_characteristic_id=b.characteristic_id WHERE a.variant_product_id=' . (int) $tag->id . ' ORDER BY a.ordering');
            $product->characteristics = $this->db->loadObjectList();
            $productClass = hikashop_get('class.product');
            $this->db->setQuery('SELECT b.*,a.*
							FROM ' . acymailing_table('hikashop_product', false) . ' as a
							LEFT JOIN ' . acymailing_table('hikashop_file', false) . ' as b ON a.product_id=b.file_ref_id AND file_type=\'product\'
							WHERE a.product_id = ' . (int) $product->product_parent_id . '
							ORDER BY b.file_ordering ASC, b.file_id ASC
							LIMIT 1');
            $parentProduct = $this->db->loadObject();
            $productClass->checkVariant($product, $parentProduct);
        }
        $varFields = array();
        foreach ($product as $fieldName => $oneField) {
            $varFields['{' . $fieldName . '}'] = $oneField;
        }
        $translationHelper = hikashop_get('helper.translation');
        if ($translationHelper->isMulti(true, false)) {
            $this->acypluginsHelper->translateItem($product, $tag, 'hikashop_product');
        }
        $tag->itemid = intval($this->params->get('itemid'));
        $config =& hikashop_config();
        $currencyClass = hikashop_get('class.currency');
        $main_currency = $currency_id = (int) $config->get('main_currency', 1);
        $zone_id = explode(',', $config->get('main_tax_zone', 0));
        $zone_id = count($zone_id) ? array_shift($zone_id) : 0;
        $ids = array($product->product_id);
        $discount_before_tax = (int) $config->get('discount_before_tax', 0);
        $currencyClass->getPrices($product, $ids, $currency_id, $main_currency, $zone_id, $discount_before_tax);
        $finalPrice = '';
        if (empty($tag->price) || $tag->price == 'full') {
            if ($this->params->get('vat', 1)) {
                $finalPrice = @$currencyClass->format($product->prices[0]->price_value_with_tax, $product->prices[0]->price_currency_id);
            } else {
                $finalPrice = $currencyClass->format($product->prices[0]->price_value, $product->prices[0]->price_currency_id);
            }
            if (!empty($product->discount)) {
                if ($this->params->get('vat', 1)) {
                    $finalPrice = '<strike>' . $currencyClass->format($product->prices[0]->price_value_without_discount_with_tax, $product->prices[0]->price_currency_id) . '</strike> ' . $finalPrice;
                } else {
                    $finalPrice = '<strike>' . $currencyClass->format($product->prices[0]->price_value_without_discount, $product->prices[0]->price_currency_id) . '</strike> ' . $finalPrice;
                }
            }
        } elseif ($tag->price == 'no_discount') {
            if ($this->params->get('vat', 1)) {
                $finalPrice = $currencyClass->format($product->prices[0]->price_value_without_discount_with_tax, $product->prices[0]->price_currency_id);
            } else {
                $finalPrice = $currencyClass->format($product->prices[0]->price_value_without_discount, $product->prices[0]->price_currency_id);
            }
        }
        $varFields['{finalPrice}'] = $finalPrice;
        if (empty($tag->type) || $tag->type == 'full') {
            $description = $product->product_description;
        } else {
            $pos = strpos($product->product_description, '<hr id="system-readmore"');
            if ($pos !== false) {
                $description = substr($product->product_description, 0, $pos);
            } else {
                $description = substr($product->product_description, 0, 100) . '...';
            }
        }
        $link = 'index.php?option=com_hikashop&ctrl=product&task=show&cid=' . $product->product_id;
        if (!empty($tag->lang)) {
            $link .= '&lang=' . substr($tag->lang, 0, strpos($tag->lang, ','));
        }
        if (!empty($tag->itemid)) {
            $link .= '&Itemid=' . $tag->itemid;
        }
        $link = acymailing_frontendLink($link);
        $varFields['{link}'] = $link;
        $image = hikashop_get('helper.image');
        if (!empty($product->file_path)) {
            $varFields['{pictHTML}'] = $image->display($product->file_path, false, $product->product_name);
        }
        if (file_exists(ACYMAILING_MEDIA . 'plugins' . DS . 'hikashop_product.php')) {
            ob_start();
            require ACYMAILING_MEDIA . 'plugins' . DS . 'hikashop_product.php';
            $result = ob_get_clean();
            $result = str_replace(array_keys($varFields), $varFields, $result);
            return $result;
//.........这里部分代码省略.........
开发者ID:q0821,项目名称:esportshop,代码行数:101,代码来源:hikashop.php

示例12: getUrl

	function getUrl($url,$mailid,$subid){
		static $allurls;

		$url = str_replace('&amp;','&',$url);
		if(empty($allurls[$url])){
			$currentURL = $this->getAdd($url);
			$allurls[$url] = $currentURL;
		}else{
			$currentURL = $allurls[$url];
		}

		$config = acymailing_config();
		$itemId = $config->get('itemid',0);
		$item = empty($itemId) ? '' : '&Itemid='.$itemId;

		if(empty($currentURL->urlid)) return;
		return str_replace('&amp;','&',acymailing_frontendLink('index.php?subid='.$subid.'&option=com_acymailing&ctrl=url&urlid='.$currentURL->urlid.'&mailid='.$mailid.$item));

	}
开发者ID:utopszkij,项目名称:lmp,代码行数:19,代码来源:url.php

示例13: _replaceContent


//.........这里部分代码省略.........
             $completeSec = $article->sectionid;
             if (!empty($article->secalias)) {
                 $completeSec .= ':' . $article->secalias;
             }
             if ($this->params->get('integration') == 'flexicontent' && class_exists('FlexicontentHelperRoute')) {
                 $link = FlexicontentHelperRoute::getItemRoute($completeId, $completeCat, $completeSec);
             } else {
                 $link = ContentHelperRoute::getArticleRoute($completeId, $completeCat, $completeSec);
             }
         } else {
             if ($this->params->get('integration') == 'flexicontent' && class_exists('FlexicontentHelperRoute')) {
                 $link = FlexicontentHelperRoute::getItemRoute($completeId, $completeCat);
             } else {
                 $link = ContentHelperRoute::getArticleRoute($completeId, $completeCat);
             }
         }
     } else {
         $link = 'index.php?option=com_content&view=article&id=' . $completeId . '&catid=' . $completeCat;
     }
     if ($this->params->get('integration') == 'flexicontent' && !class_exists('FlexicontentHelperRoute')) {
         $link = 'index.php?option=com_flexicontent&view=items&id=' . $completeId;
     } elseif ($this->params->get('integration') == 'jaggyblog') {
         $link = 'index.php?option=com_jaggyblog&task=viewpost&id=' . $completeId;
     }
     if (!empty($tag->itemid)) {
         $link .= '&Itemid=' . $tag->itemid;
     }
     if (!empty($tag->lang)) {
         $link .= (strpos($link, '?') ? '&' : '?') . 'lang=' . substr($tag->lang, 0, strpos($tag->lang, ','));
     }
     if (!empty($tag->autologin)) {
         $link .= (strpos($link, '?') ? '&' : '?') . 'user={usertag:username|urlencode}&passw={usertag:password|urlencode}';
     }
     $link = acymailing_frontendLink($link);
     $styleTitle = '';
     $styleTitleEnd = '';
     if ($tag->type != "title") {
         $styleTitle = '<h2 class="acymailing_title">';
         $styleTitleEnd = '</h2>';
     }
     if (empty($tag->notitle)) {
         if (!empty($tag->link)) {
             $result .= '<a href="' . $link . '" ';
             if ($tag->type != "title") {
                 $result .= 'style="text-decoration:none" name="content-' . $article->id . '" ';
             }
             $result .= 'target="_blank" >' . $styleTitle . $article->title . $styleTitleEnd . '</a>';
         } else {
             $result .= $styleTitle . $article->title . $styleTitleEnd;
         }
     }
     if (!empty($tag->author)) {
         $authorName = empty($article->created_by_alias) ? $article->authorname : $article->created_by_alias;
         if ($tag->type == 'title') {
             $result .= '<br/>';
         }
         $result .= '<span class="authorname">' . $authorName . '</span><br/>';
     }
     if (!empty($tag->created)) {
         if ($tag->type == 'title') {
             $result .= '<br/>';
         }
         $dateFormat = empty($tag->dateformat) ? JText::_('DATE_FORMAT_LC2') : $tag->dateformat;
         $result .= '<span class="createddate">' . JHTML::_('date', $article->created, $dateFormat) . '</span><br/>';
     }
     if (!isset($tag->pict) and $tag->type != 'title') {
开发者ID:andreassetiawanhartanto,项目名称:PDKKI,代码行数:67,代码来源:tagcontent.php

示例14: replaceSubscriptionTag

 function replaceSubscriptionTag(&$allresults, $i, &$user, &$email)
 {
     if (empty($user->subid)) {
         return '';
     }
     if (empty($user->key)) {
         $user->key = md5(substr($user->email, 0, strpos($user->email, '@')) . time());
         $db = JFactory::getDBO();
         $db->setQuery('UPDATE ' . acymailing_table('subscriber') . ' SET `key`= ' . $db->Quote($user->key) . ' WHERE subid = ' . (int) $user->subid . ' LIMIT 1');
         $db->query();
     }
     $config = acymailing_config();
     $itemId = $config->get('itemid', 0);
     $item = empty($itemId) ? '' : '&Itemid=' . $itemId;
     if ($allresults[1][$i] == 'confirm') {
         //confirm your subscription link
         $itemId = $this->params->get('confirmitemid', 0);
         if (!empty($itemId)) {
             $item = '&Itemid=' . $itemId;
         }
         $myLink = acymailing_frontendLink('index.php?subid=' . $user->subid . '&option=com_acymailing&ctrl=user&task=confirm&key=' . $user->key . $item, (bool) $this->params->get('confirmtemplate', false));
         if (empty($allresults[2][$i])) {
             return $myLink;
         }
         return '<a target="_blank" href="' . $myLink . '">' . $allresults[2][$i] . '</a>';
     } elseif ($allresults[1][$i] == 'modify') {
         //modify your subscription link
         $itemId = $this->params->get('modifyitemid', 0);
         if (!empty($itemId)) {
             $item = '&Itemid=' . $itemId;
         }
         $myLink = acymailing_frontendLink('index.php?subid=' . $user->subid . '&option=com_acymailing&ctrl=user&task=modify&key=' . $user->key . $item, (bool) $this->params->get('modifytemplate', false));
         if (empty($allresults[2][$i])) {
             return $myLink;
         }
         return '<a style="text-decoration:none;" target="_blank" href="' . $myLink . '"><span class="acymailing_unsub">' . $allresults[2][$i] . '</span></a>';
     }
     //unsubscribe link
     $itemId = $this->params->get('unsubscribeitemid', 0);
     if (!empty($itemId)) {
         $item = '&Itemid=' . $itemId;
     }
     $myLink = acymailing_frontendLink('index.php?subid=' . $user->subid . '&option=com_acymailing&ctrl=user&task=out&mailid=' . $email->mailid . '&key=' . $user->key . $item, (bool) $this->params->get('unsubscribetemplate', false));
     if (empty($allresults[2][$i])) {
         return $myLink;
     }
     return '<a style="text-decoration:none;" target="_blank" href="' . $myLink . '"><span class="acymailing_unsub">' . $allresults[2][$i] . '</span></a>';
 }
开发者ID:alesconti,项目名称:FF_2015,代码行数:48,代码来源:tagsubscription.php


注:本文中的acymailing_frontendLink函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。