本文整理汇总了PHP中Surfer::get_avatar_url方法的典型用法代码示例。如果您正苦于以下问题:PHP Surfer::get_avatar_url方法的具体用法?PHP Surfer::get_avatar_url怎么用?PHP Surfer::get_avatar_url使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Surfer
的用法示例。
在下文中一共展示了Surfer::get_avatar_url方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: build_mail_content
/**
* build main content of a message
*
* Note: this function returns legacy HTML, not modern XHTML, because this is what most
* e-mail client software can afford.
*
* @param string headline
* @param string main content
* @return string text to be send by e-mail
*/
public static function build_mail_content($headline, $content = '')
{
global $context;
// start the notification
$text = '';
// the illustrated headline
if ($headline) {
// insert poster image, if possible
if ($url = Surfer::get_avatar_url()) {
$text .= '<table border="0" cellpadding="0" cellspacing="0" width="100%">' . '<tr valign="middle">' . '<td align="left" valign="middle" width="9%"><img src="' . $url . '" alt="" title="avatar"></td>' . '<td width="1%"> </td>' . '<td align="left" valign="middle" width="90%">' . '<font face="Helvetica, Arial, sans-serif" color="navy" size="+1">' . $headline . '</font>' . '</td>' . '</tr>' . '</table>';
} else {
$text .= '<table border="0" cellpadding="0" cellspacing="0" width="100%">' . '<tr valign="middle">' . '<td align="left" valign="middle" width="100%">' . '<font face="Helvetica, Arial, sans-serif" color="navy" size="+1">' . $headline . '</font>' . '</td>' . '</tr>' . '</table>';
}
}
// the full content
if ($content) {
$text .= '<table border="0" cellpadding="0" cellspacing="0" width="100%">' . '<tr valign="top">' . '<td align="left" valign="top" width="100%">' . '<div style="border-left: solid 2px #ccc; padding: 10px 0 10px 10px; margin: 20px 0;">' . '<font face="Helvetica, Arial, sans-serif" color="navy">' . $content . '</font>' . '</div>' . '</td>' . '</tr>' . '</table>';
}
// the full message
return $text;
}