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


PHP JCommentsFactory::getUnsubscribeLink方法代码示例

本文整理汇总了PHP中JCommentsFactory::getUnsubscribeLink方法的典型用法代码示例。如果您正苦于以下问题:PHP JCommentsFactory::getUnsubscribeLink方法的具体用法?PHP JCommentsFactory::getUnsubscribeLink怎么用?PHP JCommentsFactory::getUnsubscribeLink使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在JCommentsFactory的用法示例。


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

示例1: render

	function render() 
	{
		$comment = $this->getVar('comment');
		
		$object_title = $this->getVar('comment-object_title');
		$object_link =  $this->getVar('comment-object_link');
		$hash =  $this->getVar('hash');

		$link = '<a href="' . $object_link . '" target="_blank">' . $object_title . '</a>';
		$unsubscribeMessage = JText::sprintf('NOTIFICATION_COMMENT_UNSUBSCRIBE', $link);
		$unsubscribeLink = JCommentsFactory::getUnsubscribeLink($hash);

		// add inline styles for quotes to default comment html layout
		$comment->comment = str_replace('<blockquote>', '<blockquote style="border-left: 2px solid #ccc; padding-left: 5px; margin-left: 10px;">', $comment->comment);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta content="text/html; charset=<? echo $this->getVar('charset'); ?>" http-equiv="content-type" />
  <meta name="Generator" content="JComments" />
</head>
<body>
<a style="color: #777;" href="<? echo $object_link ?>#comment-<? echo $comment->id; ?>" target="_blank">#</a>&nbsp;
<?
		if ($comment->title != '') {
?>
<span style="color: #b01625;font: bold 1em Verdana, Arial, Sans-Serif;"><? echo $comment->title; ?></span> &mdash; 
<?
		}
		if ($comment->homepage != '') {
?>
<a style="color: #3c452d;font: bold 1em Verdana, Arial, Sans-Serif;" href="<? echo $comment->homepage; ?>" target="_blank"><? echo $comment->name; ?></a>
<?
		} else {
?>
<span style="color: #3c452d;font: bold 1em Verdana, Arial, Sans-Serif;"><? echo $comment->name; ?></span>
<?
		}
?> &mdash; <span style="font-size: 11px; color: #999;"><? echo JCommentsText::formatDate($comment->datetime, JText::_('DATETIME_FORMAT')); ?></span>
<div style="border: 1px solid #ccc; padding: 10px 5px; margin: 5px 0; font: normal 1em Verdana, Arial, Sans-Serif;"><? echo $comment->comment; ?></div>

<p style="border-top: 1px solid #ccc; margin: 10px 0 0 0; color: #555;"><? echo $unsubscribeMessage; ?>:<br /><a href="<? echo $unsubscribeLink; ?>" target="_blank"><? echo JText::_('Unsubscribe');?></a></p>
</body>
</html>
<?
	}
开发者ID:nidorx,项目名称:Joomla-theme---ubuntu.com,代码行数:46,代码来源:tpl_email.php


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