本文整理汇总了PHP中getGravatar函数的典型用法代码示例。如果您正苦于以下问题:PHP getGravatar函数的具体用法?PHP getGravatar怎么用?PHP getGravatar使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getGravatar函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: die
if (!defined('SYSTEM_ROOT')) {
die('Insufficient Permissions');
}
global $i, $m;
$today = date('Y-m-d');
doAction('index_1');
?>
<div class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title">程序信息</h3>
</div>
<div class="panel-body">
<span id="avatar" style="float:right;"><img src="<?php
echo getGravatar();
?>
" alt="您的头像" title="您的头像" class="img-rounded" height='80px' weight='80px' onerror="$('#avatar').html('无法加载头像');"></span>
<?php
echo SYSTEM_FN;
?>
V<?php
echo SYSTEM_VER;
?>
.<?php
echo SYSTEM_REV;
?>
<?php
echo SYSTEM_VER_NOTE;
?>
<br/>
示例2: getGravatar
if (isset($settings['version'])) {
echo $settings['version'];
}
?>
by Cyberbyte Studios</b></a>
</header>
<aside>
<div id="sidebar" class="nav-collapse ">
<ul class="sidebar-menu" id="nav-accordion">
<p class="centered">
<?php
if (!isset($_SESSION['profile_link'])) {
if (isset($_SESSION['user_email']) && $settings['gravatar']) {
echo '<a href="' . $settings['url'] . 'profile">';
echo '<img src="' . getGravatar($_SESSION['user_email'], 64, 'retro') . '" class="img-circle" width="60" height="60"></a></p>';
} else {
echo '<a href="' . $settings['url'] . 'profile">';
echo '<img src="' . $settings['url'] . 'assets/img/profile/' . $_SESSION['user_profile'] . '.jpg"';
echo 'class="img-circle" width="60" height="60"></a></p>';
}
} else {
echo '<a href="' . $_SESSION['profile_link'] . '" target="_blank">';
echo '<img src="' . $_SESSION['user_profile'] . '"';
echo 'class="img-circle" width="64" height="64"></a></p>';
}
?>
<h5 class="centered">
<?php
if ($_SESSION['steamsignon']) {
echo '<i class="fa fa-steam-square"></i>';
示例3: getAvatar
/**
* @return string
*/
public function getAvatar()
{
return getGravatar($this->email);
}
示例4: getGravatar
<ul class="collapsible" data-collapsible="expandable">
<li class="active comment" id="comment-<?php
echo $comment['cid'];
?>
">
<a name="<?php
echo $comment['cid'];
?>
"></a>
<div class="collapsible-header active">
<?php
if ($isGravatar == 'y') {
?>
<div class="avatar">
<img src="<?php
echo getGravatar($comment['mail']);
?>
" width="40" height="40" />
</div>
<?php
}
?>
<b><?php
echo $comment['poster'];
?>
</b>
<span class="light comment-time"><?php
echo $comment['date'];
?>
</span>
</div>
示例5: getUserAvatar
if (array_intersect($is_admin, $userGroups)) {
echo '<div class="control"><a class="btn-delete">' . JText::_('COM_DATSOGALLERY_DELETE') . '</a> | ' . $action . ' | <a class="btn-spam">Spam</a></div>';
}
echo "</li>\n";
}
echo "</ul>\n";
} else {
echo '<div id="nocom"></div>';
}
if ($ad_anoncomment || $user->id) {
if ($ad_js || $ad_cb) {
$avatar = $user->id ? getUserAvatar($user->id) : getUserAvatar(0);
} elseif ($ad_kunena) {
$avatar = $user->id ? getUserAvatar($user->id) : getUserAvatar(0);
} else {
$avatar = getGravatar($user->email);
}
$brd = $ad_showsend2friend && $user->id ? '' : ' style="border-bottom: 1px solid #DCDCDC"';
?>
<div class="dg_body_background_comment"<?php
echo $brd;
?>
>
<div class="imgblock" style="position:relative;float:right"><?php
echo $avatar;
?>
</div>
<p>
<label for="cmtname"><?php
echo JText::_('COM_DATSOGALLERY_YOUR_NAME');
?>
示例6: getGravatar
} else {
echo "";
}
?>
</ul>
</div>
</div>
<!-- tab -->
<div id="Tags">
<div class="userPhoto"><img src="<?php
echo getGravatar($_SESSION[current_account][email]);
?>
" /> </div>
<div class="navArea">
<div class="userInfo">
<div>
<a href="<?php
echo U('Public/logout');
?>
" class="loginOut"><span> </span>退出系统</a>
</div>
欢迎您,<?php
echo $_SESSION['current_account']['email'];
?>
</div>
<div class="nav">
示例7: blog_comments_children
function blog_comments_children($comments, $children)
{
$isGravatar = Option::get('isgravatar');
foreach ($children as $child) {
$comment = $comments[$child];
$comment['content'] = preg_replace("|\\[em_(\\d+)\\]|i", '<img src="' . BLOG_URL . 'admin/editor/plugins/emoticons/images/$1.gif" />', $comment['content']);
$comment['poster'] = $comment['url'] ? '<a href="' . $comment['url'] . '" target="_blank" class="upps">' . $comment['poster'] . '</a>' : $comment['poster'];
?>
<ol class="children">
<a name="<?php
echo $comment['cid'];
?>
"></a>
<li id="comment-<?php
echo $comment['cid'];
?>
" class="comment byuser comment-author-benz odd alt depth-2">
<article id="div-comment-2035" class="comment-body">
<footer class="comment-meta">
<div class="comment-author vcard">
<?php
if ($isGravatar == 'y') {
?>
<img alt='' src='<?php
echo getGravatar($comment['mail']);
?>
' class='avatar avatar-70 wp-user-avatar wp-user-avatar-70 alignnone photo' height='70' width='70' /><?php
}
?>
<b class="fn"><strong><?php
echo $comment['poster'];
?>
</strong></b><span class="says">于<strong><span style="color:#FF9900;"><?php
echo $comment['date'];
?>
</span></strong> 回复道:</span> </div>
<!-- .comment-author --><!-- .comment-metadata -->
</footer><!-- .comment-meta -->
<div class="comment-content">
<p><?php
echo $comment['content'];
?>
</p>
</div><!-- .comment-content -->
<div class="reply">
<a class="comment-reply-login" href="#comment-<?php
echo $comment['cid'];
?>
" onclick="commentReply(<?php
echo $comment['cid'];
?>
,this)">回复</a> </div><!-- .reply -->
</article><!-- .comment-body -->
</li><!-- #comment-## -->
<?php
blog_comments_children($comments, $comment['children']);
?>
</ol><!-- .children -->
<?php
}
}
示例8: getGravatar
</nav>
</header>
<div id="contenuDash" class="wrapper row-offcanvas row-offcanvas-left">
<!-- Left side column. contains the logo and sidebar -->
<aside class="left-side sidebar-offcanvas">
<!-- sidebar: style can be found in sidebar.less -->
<section class="sidebar">
<!-- Sidebar user panel -->
<div class="user-panel">
<div class="pull-left image">
<?php
if ($userSession) {
?>
<img src=<?php
echo getGravatar($userSession->getEmail());
?>
class="img-circle" alt="User Image" />
<?php
}
?>
</div>
<div class="pull-left info">
<p>Hello, <?php
echo $userSession->getFirstname();
?>
</p>
<a href="#"><i class="fa fa-circle text-success"></i> Online</a>
</div>
</div>
示例9: session_start
<?php
session_start();
// TODO(eriq): I would prefer if ids were used to fetch profiles, they are easier to sanitize.
header('Content-type: application/json');
require_once '../db.php';
require_once '../functions.php';
$response = array();
$userName = null;
if (isset($_GET['user']) && $_GET['user'] != '') {
$userName = $_GET['user'];
} else {
if (isset($_SESSION['userName'])) {
$userName = $_SESSION['userName'];
}
}
if (!$userName) {
$response['valid'] = false;
$response['error'] = 'nouser';
} else {
$response = getExpandedProfile(mongoUserSanitize($userName));
if ($response) {
// TODO(eriq): This sucks. When we host somewhere on a default port, we can use our own image.
$response['profilePic'] = getGravatar($response['meta']['email'], 200, 'http://i47.tinypic.com/wo26c.png');
$response['valid'] = true;
} else {
$response['valid'] = false;
$response['error'] = 'cantfind';
}
}
echo json_encode($response);
示例10: foreach
}
$i = $_SERVER['REMOTE_ADDR'];
$ct = 0;
foreach ($a as $r) {
if (date('z', $r['d']) == date('z') && $r['i'] == $i) {
++$ct;
}
// same IP and more than 3 comment a day
}
if ($ct > 3) {
echo '<strong>' . T_('You have exceeded the quota') . '.</strong>';
exit;
}
$c = nl2br(strip_tags($_POST['t']));
$c = preg_replace('#(<br */?>\\s*)+#i', '<br />', $c);
$g = getGravatar(strip_tags($_POST['e']));
$a[] = array('e' => $key, 'n' => strip_tags($_POST['n']), 's' => $a1['vmel'] ? 0 : 1, 'd' => $t, 'u' => strip_tags($_POST['u']), 't' => $c, 'g' => $g, 'i' => $i);
usort($a, 'sortDate');
if (!$b) {
$a1['mail'][$key] = strip_tags($_POST['e']);
$a1['key'] = $key;
$out = json_encode($a1);
file_put_contents('../../data/_sdata-' . $sdata . '/commentMail.json', $out);
}
$out = json_encode($a);
//
if (file_put_contents('../../data/' . strip_tags($_POST['u']) . '/comment.json', $out)) {
echo strip_tags($_POST['t']) . '<br /><strong>' . T_('Your comment is awaiting moderation.') . '</strong>';
mailAdmin(T_('New Comment') . ' : ' . strip_tags($_POST['u']), strip_tags($_POST['n']) . '<br />' . $c, strip_tags($_POST['u']), $bottom, $top, $sdata);
exit;
}
示例11: getGravatar
?>
</h1>
</header>
<div class="page-content post-content">
<?php
$this->content();
?>
</div>
<?php
if (!$this->allow('comment')) {
?>
<footer class="post-footer">
<section class="author">
<div class="author-ava">
<img src="<?php
echo getGravatar($this->options->navy_gravatar, 160);
?>
" alt="" width="160" height="160" />
</div>
<p><?php
$this->options->navy_tips();
?>
</p>
</section>
</footer>
<?php
}
?>
</article>
<?php
if ($this->allow('comment')) {
示例12: commentAdd
function commentAdd()
{
$db = JFactory::getDBO();
$user = JFactory::getUser();
$post = JRequest::get('post');
$post = array_map('addslashes', $post);
$cmtip = getIpAddress();
jimport('joomla.mail.helper');
require JPATH_COMPONENT_ADMINISTRATOR . DS . 'config.datsogallery.php';
if ($post) {
if (refererCheck()) {
echo '<li class="dg_body_error_message"><div>' . refererCheck() . '</div></li>';
} elseif (blacklistCheck($cmtip)) {
echo '<li class="dg_body_error_message"><div>' . blacklistCheck($cmtip) . '</div></li>';
} elseif (empty($post['cmtname'])) {
echo '<li class="dg_body_error_message"><div>' . JText::_('COM_DATSOGALLERY_ENTER_NAME') . '</div></li>';
} elseif (empty($post['cmtmail'])) {
echo '<li class="dg_body_error_message"><div>' . JText::_('COM_DATSOGALLERY_ENTER_EMAIL') . '</div></li>';
} elseif (JMailHelper::isEmailAddress($post['cmtmail']) == false) {
echo '<li class="dg_body_error_message"><div>' . JText::_('COM_DATSOGALLERY_INVALID_EMAIL') . '</div></li>';
} elseif (empty($post['cmttext'])) {
echo '<li class="dg_body_error_message"><div>' . JText::_('COM_DATSOGALLERY_ENTER_COMMENT') . '</div></li>';
} elseif (empty($post['dgcaptchaval'])) {
echo '<li class="dg_body_error_message"><div>' . JText::_('COM_DATSOGALLERY_ENTER_CODE') . '</div></li>';
} else {
if (!$user->id && strlen($post['cmtname']) < 4) {
echo '<li class="dg_body_error_message"><div>' . JText::_('COM_DATSOGALLERY_NAME_IS_TOO_SHORT') . '</div></li>';
} elseif (empty($_SESSION['CAPTCHA']) || strtolower($post['dgcaptchaval']) != $_SESSION['CAPTCHA']) {
echo '<li class="dg_body_error_message"><div>' . JText::_('COM_DATSOGALLERY_SECURITY_NOT_VALUE') . '</div></li>';
} else {
$db->setQuery("INSERT INTO #__datsogallery_comments SET cmtpic='" . $post['cmtpic'] . "', cmtip='" . $cmtip . "', cmtname='" . $post['cmtname'] . "', cmtmail='" . $post['cmtmail'] . "', cmttext='" . $post['cmttext'] . "', cmtdate ='" . time() . "', published = 1");
$db->query();
echo "<li class=\"pane\">\n";
echo "<div class=\"imgblock\">";
if ($ad_js || $ad_cb || $ad_kunena) {
$avatar = $user->id ? getUserAvatar($user->id) : getUserAvatar(0);
} else {
$avatar = getGravatar($post['cmtmail']);
}
echo $avatar;
echo "</div>";
echo '<div style="display:block;min-height:60px;margin-left:70px;padding-bottom:20px">' . stripslashes(nl2br($post['cmttext'])) . '</div>';
echo '<div class="date">' . sprintf(JText::_('COM_DATSOGALLERY_ON'), $post['cmtname'], strftime($ad_datef, time())) . '</div>';
echo "</li>\n";
$db->setQuery('SELECT notify' . ' FROM #__datsogallery' . ' WHERE id = ' . $post['cmtpic']);
$unotify = $db->loadResult();
if ($ad_comment_notify && $unotify != 0) {
commentNotify($post['cmtpic'], $post['cmtname'], $post['cmtmail'], stripslashes(dgwordlimiter($post['cmttext'], $ad_comment_wl)));
}
}
}
exit;
}
}
示例13: blog_comments_children
function blog_comments_children($comments, $children)
{
$isGravatar = Option::get('isgravatar');
foreach ($children as $child) {
$comment = $comments[$child];
$comment['poster'] = $comment['url'] ? '<a href="' . $comment['url'] . '" target="_blank">' . $comment['poster'] . '</a>' : $comment['poster'];
?>
<ul id="commentlist" width="20px">
<li class="comment comment-children" width="20px" id="comment-<?php
echo $comment['cid'];
?>
">
<a name="<?php
echo $comment['cid'];
?>
"></a>
<?php
if ($isGravatar == 'y') {
?>
<div class="gravatar"><img src="<?php
echo getGravatar($comment['mail']);
?>
" height='48' width='48' /></div><?php
}
?>
<div>
<b><?php
echo $comment['poster'];
?>
</b>
<p><?php
echo $comment['content'];
?>
</p>
<div class="commentMeta">
<?php
echo $comment['date'];
?>
<?php
if ($comment['level'] < 4) {
?>
<a class='comment-reply-link' href="#comment-<?php
echo $comment['cid'];
?>
" onclick="commentReply(<?php
echo $comment['cid'];
?>
,this)">回复</a></div>
<?php
}
?>
<?php
blog_comments_children($comments, $comment['children']);
?>
</div>
</li>
</ul>
<?php
}
}
示例14: getGravatar
Typecho_Widget::widget('Widget_Stat')->to($stat);
?>
<div class="sidebar-toggle">
<div class="sidebar-toggle-line-wrap">
<span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
<span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
<span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
</div>
</div>
<aside id="sidebar" class="sidebar">
<div class="sidebar-inner">
<section class="site-overview">
<div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
<img class="site-author-image" src="<?php
echo getGravatar($this->options->next_gravatar, 160);
?>
" alt="<?php
$this->options->next_name();
?>
" itemprop="image"/>
<p class="site-author-name" itemprop="name"><?php
$this->options->next_name();
?>
</p>
</div>
<p class="site-description motion-element" itemprop="description"><?php
$this->options->next_tips();
?>
</p>
<nav class="site-state motion-element">
示例15: pg_query
$query = "SELECT context FROM contexts WHERE userid='" . $userid . "' ORDER BY utc DESC LIMIT 1";
$result = pg_query($dbh, $query);
$context = null;
if ($result) {
while ($contexts = pg_fetch_row($result)) {
$context = $contexts[0];
}
}
/**
* Check login/password validity
*/
$logged = false;
if ($authFromPassword) {
$logged = $password && md5($_POST['password']) == $password;
/*
* Store a sessionid for the user
*/
if ($logged) {
$sessionid = getSessionId();
}
$query = "UPDATE users SET lastsessionid='" . $sessionid . "' WHERE userid=" . $userid;
$result = pg_query($dbh, $query);
} else {
$logged = $sessionid && $_POST['sessionid'] == $sessionid;
}
pg_close($dbh);
if ($logged) {
echo json_encode(array('userid' => $userid, 'username' => $username, 'email' => $email, 'icon' => getGravatar($email), 'sessionid' => $sessionid, 'context' => json_decode($context)));
} else {
die('{"error":{"message":"Invalid password"}}');
}