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


PHP get_gravatar函数代码示例

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


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

示例1: get_comments

function get_comments($post_id)
{
    global $post_id;
    //get comments for a given post
    $c = fetch_comments($post_id);
    for ($i = 0; $i < count($c); $i++) {
        $g_url = get_gravatar($c[$i]['email']);
        ?>
		<div class="comment" >
		<img src="<?php 
        echo $g_url;
        ?>
" style="float:left;margin:0 20px 0 0 "/> 
		<a href="<?php 
        echo $c[$i]['website'];
        ?>
"><?php 
        echo $c[$i]['name'];
        ?>
</a>
		<p><?php 
        echo $c[$i]['comment'];
        ?>
</p>
		<p><?php 
        echo $c[$i]['timestamp'];
        ?>
</p>
		<br style="clear:both" />
		</div>
		
		<?php 
    }
}
开发者ID:refschool,项目名称:mucms,代码行数:34,代码来源:comment_functions.php

示例2: parse

 function parse()
 {
     $userExists = false;
     if (count($this->argsIndexed) > 0) {
         //Find the user:
         $userResult = $this->db->buildQuery("SELECT * FROM users WHERE username=%s", $this->argsIndexed[0]);
         if ($this->db->getHasRows($userResult)) {
             $userExists = true;
             $user = $this->db->fetchAssoc($userResult);
             $user['gravatarUrl'] = get_gravatar($user['email'], 150);
             //Fetch his objects
             $objectsResult = $this->db->buildQuery("SELECT * FROM objects WHERE seller=%s ORDER BY end_moment DESC", $user['username']);
             $user['objects'] = parseObjects($objectsResult);
             $feedbackResult = $this->db->buildQuery("SELECT isseller, rating, date, comment, buyer, seller AS username FROM feedback F LEFT OUTER JOIN objects O ON F.objectid = O.id WHERE (seller=%s AND isseller=1) OR (buyer=%s AND F.isseller=0)", $user['username'], $user['username']);
             $user['feedback'] = $this->db->fetchAllAssoc($feedbackResult);
             $this->website->assign("profileUser", $user);
         } else {
             $error = "Deze gebruiker bestaat niet";
             $userExists = false;
         }
     }
     if ($userExists) {
         $this->addToBreadcrumbs("Home", baseurl(""));
         $this->addToBreadcrumbs("Profiel");
         $this->render('Profiel', 'users/profile.tpl');
     } else {
         //Render a page here, telling the user that this user doesn't exist
     }
 }
开发者ID:K-4U,项目名称:Pr-IP-P2-02,代码行数:29,代码来源:index.php

示例3: get_user_pic

function get_user_pic($pic = FALSE, $email = FALSE)
{
    if ($pic != 'no-pic.png') {
        return base_url() . "files/media/" . $pic;
    } else {
        return get_gravatar($email);
    }
}
开发者ID:imranweb7,项目名称:msitc-erp,代码行数:8,代码来源:gravatar_helper.php

示例4: build_session

 public function build_session($field, $key)
 {
     $data = $this->db->where($field, $key)->get($this->_table, 1)->row();
     $this->load->helper('gravatar');
     $this->session->set_userdata('session_gravatar', get_gravatar($data->mail, 128));
     $this->session->set_userdata('session_username', $data->user);
     $this->session->set_userdata('session_mail', $data->mail);
     $this->session->set_userdata('session_name', $data->name);
     $this->session->set_userdata('session_id', $data->id);
 }
开发者ID:NaszvadiG,项目名称:ci-starter,代码行数:10,代码来源:Administrator.php

示例5: listar_comentario

    function listar_comentario($comentario)
    {
        ?>
<li class="clearfix">
    <img src="<?php 
        echo get_gravatar($comentario->email, 65);
        ?>
" class="avatar" alt="<?php 
        echo $comentario->nome;
        ?>
" />
    <div class="post-comments">
        <p class="meta"><?php 
        echo $comentario->data;
        ?>
 <a href="#"><?php 
        echo $comentario->nome;
        ?>
</a> disse : 
            <i class="pull-right"><a href="#" class="responder" data-comentario="<?php 
        echo $comentario->id_comentario;
        ?>
"><small>Responder</small></a></i>
        </p>
        <p><?php 
        echo $comentario->texto;
        ?>
</p>
    </div>
    <?php 
        if (count($comentario->comentarios) > 0) {
            ?>
    <ul class="comments">
        <?php 
            foreach ($comentario->comentarios as $comentario2) {
                ?>
        <?php 
                listar_comentario($comentario2);
                ?>
        <?php 
            }
            ?>
    </ul>
    <?php 
        }
        ?>
</li>
<?php 
    }
开发者ID:landim32,项目名称:biblia-em-debate,代码行数:49,代码来源:comentarios.inc.php

示例6: foreach

</th>
		</thead>
		<?php 
foreach ($company->clients as $value) {
    ?>

		<tr id="<?php 
    echo $value->id;
    ?>
" >
			<td style="width:10px"><img class="minipic" src="
               <?php 
    if ($value->userpic != 'no-pic.png') {
        echo base_url() . "files/media/" . $value->userpic;
    } else {
        echo get_gravatar($value->email, '20');
    }
    ?>
                " /></td>
			<td><?php 
    echo $value->firstname;
    ?>
 <?php 
    echo $value->lastname;
    ?>
</td>
			<td class="hidden-xs"><?php 
    echo $value->email;
    ?>
</td>
			<td class="hidden-xs"><?php 
开发者ID:timclifford,项目名称:freelance-manager,代码行数:31,代码来源:view.php

示例7: base_url

</p></span>
              <span class="pull-right">
                                  <?php 
        if ($value->user_id != 0) {
            ?>
<img class="img-circle list-profile-img tt"  title="<?php 
            echo $value->user->firstname;
            ?>
 <?php 
            echo $value->user->lastname;
            ?>
"  src="<?php 
            if ($value->user->userpic != 'no-pic.png') {
                echo base_url() . "files/media/" . $value->user->userpic;
            } else {
                echo get_gravatar($value->user->email);
            }
            ?>
"><?php 
        }
        ?>
                                   
                                  </span>
                    <div class="todo-details">
                    <div class="row">
                        <div class="col-sm-3">
                        <ul class="details">
                            <li><span><?php 
        echo $this->lang->line('application_priority');
        ?>
:</span> <?php 
开发者ID:timclifford,项目名称:freelance-manager,代码行数:31,代码来源:view.php

示例8: elseif

            } elseif ($c['feedback'] == "1") {
                $feedback = "<span class=\"neutral_comment\">Neutral</span>";
            } elseif ($c['feedback'] == "2") {
                $feedback = "<span class=\"negative_comment\">Negative</span>";
            }
            $modify = "";
            if (isset($_SESSION['admin'])) {
                $modify = "<a href=\"?base=gmcp&amp;page=manblog&amp;action=pdel&amp;id=" . $c['id'] . "\">Delete</a> | ";
            }
            $quote = "";
            $pm = "";
            if (isset($_SESSION['id'])) {
                $quote = "<a href=\"#comment-" . $c['id'] . "-" . $c['author'] . "\" class=\"quote\">Quote</a> | ";
                $pm = " | <a href=\"?base=ucp&page=mail&uc=" . $c['author'] . "\">PM</a>";
            }
            echo "\n\t\t\t<div class=\"well\"><img src=\"" . get_gravatar($c['email']) . "\" alt=\"" . $c['author'] . "\" class=\"img-responsive\" style=\"float:left;padding-right:10px;\"/>\n\t\t\t<h4 style=\"margin:0px;\">" . $c['author'] . "</h4>\n\t\t\t\t<b>Feedback:</b> " . $feedback . "<br/>\n\t\t\t\t<small>Posted " . ago($c['date']) . ", on " . date('M j, Y', $c['date']) . "</small><br/>\n\t\t\t\t<small>" . $modify . $quote . "<a href=\"#comment-link-" . $c['id'] . "\" class=\"permalink\">Permalink</a><a href=\"?base=main&page=gmblog&id=" . $id . "#comment-" . $c['id'] . "\" class=\"permalinkshow linkid-" . $c['id'] . "\">?base=main&page=gmblog&id=" . $id . "#comment-" . $c['id'] . "</a>" . $pm . "</small><hr/>\n\t\t\t\t<div id=\"comment-" . $c['id'] . "\">" . $clean_comment . "</div>\n\t\t\t\t</div>";
        }
    }
} else {
    $gb = $mysqli->query("SELECT * FROM " . $prefix . "gmblog ORDER BY id DESC") or die;
    $rows = $gb->num_rows;
    if ($rows < 1) {
        echo "<div class=\"alert alert-danger\">Oops! No blogs to display right now!</div>";
    } else {
        echo "<h2 class=\"text-left\">" . $servername . " GM Blogs</h2><hr/>";
        while ($b = $gb->fetch_assoc()) {
            $gc = $mysqli->query("SELECT * FROM " . $prefix . "bcomments WHERE bid='" . $b['id'] . "' ORDER BY id ASC") or die;
            $cc = $gc->num_rows;
            echo "\n\t\t\t[" . $b['date'] . "]\n\t\t\t\t<b><a href=\"?base=main&amp;page=gmblog&amp;id=" . $b['id'] . "\">" . $b['title'] . "</a></b> by\n\t\t\t\t<a href=\"?base=main&amp;page=members&amp;name=" . $b['author'] . "\">" . $b['author'] . "</a> \n\t\t<span class=\"commentbubble\">\n\t\t\t<b>" . $b['views'] . "</b> views | <b>" . $cc . "</b> comments\n\t\t";
            if (isset($_SESSION['gm'])) {
                echo "\n\t\t\t<span class=\"commentbubble\">\n\t\t\t\t<a href=\"?base=admin&amp;page=manblog&amp;action=edit&amp;id=" . $b['id'] . "\">Edit</a> | \n\t\t\t\t<a href=\"?base=admin&amp;page=manblog&amp;action=del\">Delete</a> | \n\t\t\t\t<a href=\"?base=admin&amp;page=manblog&amp;action=lock\">Lock</a>&nbsp;\n\t\t\t";
开发者ID:Kashionz,项目名称:MapleBit,代码行数:31,代码来源:gmblog.php

示例9: Header_body_menu

function Header_body_menu()
{
    global $sLanguage, $bDefectiveBrowser, $bExportCSV, $sMetaRefresh, $bToolTipsOn, $iNavMethod, $bRegistered, $sHeader, $sGlobalMessage;
    global $MenuFirst, $sPageTitle, $sPageTitleSub, $sURLPath;
    $sURLPath = $_SESSION['sURLPath'];
    $MenuFirst = 1;
    ?>


    <?php 
    if (!$bDefectiveBrowser) {
        echo "<div style=\"position:fixed; top:0; left:0; width: 100%;\">";
    }
    if ($sHeader) {
        // Optional Header Code (Entered on General Settings page - sHeader)
        // Must first set a table with a background color, or content scrolls across
        // the background of the custom code when using a non-defective browser
        echo "<table width=\"100%\" bgcolor=white cellpadding=0 cellspacing=0 border=0><tr><td width=\"100%\">";
        echo html_entity_decode($sHeader, ENT_QUOTES);
        echo "</td></tr></table>";
    }
    ?>
    <header class="header">
        <a href="Menu.php" class="logo">
            Church Web CRM
        </a>
        <!-- Header Navbar: style can be found in header.less -->
        <nav class="navbar navbar-static-top" role="navigation">
            <!-- Sidebar toggle button-->
            <a href="#" class="navbar-btn sidebar-toggle" data-toggle="offcanvas" role="button">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </a>
            <div class="navbar-right">
                <ul class="nav navbar-nav">
                    <?php 
    if ($_SESSION['bAdmin']) {
        ?>
                    <li class="dropdown profile-dropdown">
                        <a class="btn" class="dropdown-toggle" data-toggle="dropdown">
                            <i class="fa fa-cog"></i>
                        </a>
                        <ul class="dropdown-menu">
                            <?php 
        addMenu("admin");
        ?>
                        </ul>
                    </li>
                    <?php 
    }
    ?>
                    <li class="dropdown profile-dropdown">
                        <a class="btn" class="dropdown-toggle" data-toggle="dropdown">
                            <i class="fa fa-question-circle"></i>
                        </a>
                        <ul class="dropdown-menu">
                            <?php 
    addMenu("help");
    ?>
                        </ul>
                    </li>
                    <li class="dropdown profile-dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                            <img src="<?php 
    echo get_gravatar($_SESSION['sEmailAddress']);
    ?>
" class="img-circle" />
                            <span class="hidden-xs"><?php 
    echo $_SESSION['UserFirstName'] . " " . $_SESSION['UserLastName'];
    ?>
 </span> <b class="caret"></b>
                        </a>
                        <ul class="dropdown-menu">
                            <li><a href="<?php 
    echo $sURLPath . "/";
    ?>
PersonView.php?PersonID=<?php 
    echo $_SESSION['iUserID'];
    ?>
"><i class="fa fa-user"></i>Profile</a></li>
                            <li class="divider"></li>
                            <li><a href="<?php 
    echo $sURLPath . "/";
    ?>
UserPasswordChange.php">Change My Password</a></li>
                            <li><a href="<?php 
    echo $sURLPath . "/";
    ?>
SettingsIndividual.php">Change My Settings</a></li>
                            <li class="divider"></li>
                            <li><a href="<?php 
    echo $sURLPath . "/";
    ?>
Default.php?Logoff=True"><i class="fa fa-power-off"></i>Log Off</a></li>
                        </ul>
                    </li>
                    <li class="hidden-xxs">
                        <a class="btn" href="<?php 
//.........这里部分代码省略.........
开发者ID:dschwen,项目名称:CRM,代码行数:101,代码来源:Header-function.php

示例10: get_gravatar

function get_gravatar($email, $s = 80, $d = 'mm')
{
    $url = 'http://www.gravatar.com/avatar/';
    $url .= md5(strtolower(trim($email)));
    $url .= "?s={$s}&d={$d}";
    return $url;
}
session_start();
include_once 'config/mysql_config.php';
include_once 'functions/load_session.php';
include_once 'functions/get_new_messages_c.php';
$login = load_session();
?>
<link rel="stylesheet" href="css_styles/header.css" type="text/css">
<div id = "header">
<span id = "header_navigation">
<span id = "header_seetnau_title">seetnau</a>
<span id = "header_page_navigation">
<?php 
if ($login == True) {
    $avatar = get_gravatar($_SESSION['mail']);
    $username = $_SESSION['username'];
    $user_id = $_SESSION['user_id'];
    echo '<span class = "hdr_nav_button"><a href = "main.php">' . $username . '</a></span>' . ' - <span class = "hdr_nav_button"><a href = "messages.php">Messages (' . get_messages_count() . ')</a></span> - <span class = "hdr_nav_button"><a href = "signout.php">Sign out</a></span>';
} else {
    echo '<span class = "hdr_nav_button"><a href = "signin.php">Sign in</a></span> - <span class = "hdr_nav_button"><a href = "signup.php">Sign up</a></span>';
}
?>
</span>
</span>
</div>
开发者ID:nausik,项目名称:SEETNAU---PHP,代码行数:31,代码来源:header.php

示例11: get_gravatar

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="' . get_gravatar($_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>';
开发者ID:GlitchedMan,项目名称:CyberWorks,代码行数:31,代码来源:template.php

示例12: mysql_connect

 $chandle = mysql_connect($dbhost, $dbusername, $dbpassword) or die(mysql_error());
 mysql_select_db($dbname, $chandle);
 $recieve_user_info = mysql_query("SELECT * FROM users WHERE Username = '{$username}'", $chandle);
 $user_info_o = mysql_fetch_object($recieve_user_info);
 //Friendlist
 $friend_friends = "";
 if ($user_info_o->Friends_IDs !== "" and $user_info_o->Friends_IDs !== null) {
     echo '<div class = "list">';
     echo '<div class = "list_title">Friendlist</div>';
     echo '<div class = "list_body">';
     $friends = explode(',', $user_info_o->Friends_IDs);
     foreach ($friends as $friend) {
         echo '<div class = "friend">';
         $find_username = mysql_query("SELECT * From users WHERE ID = '{$friend}'");
         $friend_info = mysql_fetch_object($find_username);
         $friend_avatar = get_gravatar($friend_info->Mail);
         echo '<div class = "friend_a"><img src = "' . $friend_avatar . '" alt = "' . $friend_info->Username . ' avatar"></div>';
         echo '<div class = "friend_n"><a href = "main.php?user=' . $friend_info->Username . '">' . $friend_info->Username . '</a></div>';
         echo '<div class = "friend_f">';
         echo '<form name = "friend_control" method = "POST" action = "friends.php">';
         echo '<input type = "hidden" name = "f_ID" value = "' . $friend_info->ID . '">';
         echo '<input type = "hidden" name = "f_fds" value = "' . $friend_info->Friends_IDs . '">';
         echo '<input type = "submit" name = "answer" value = "Delete">';
         echo '<input type = "button" name = "send_m" value = "Send message" class = "send_message_b" data-name="' . $friend_info->Username . '">';
         echo '</form>';
         echo '</div>';
         echo '</div>';
     }
     echo '</div>';
     echo '</div>';
 }
开发者ID:nausik,项目名称:SEETNAU---PHP,代码行数:31,代码来源:friends.php

示例13: get_gravatar

            <!-- User information -->
            <div class="col-md-4">
                <ul class="list-inline">
                    <li>Asked <?php 
    echo $question->created_post;
    ?>
</li>
                </ul>
                <ul class="list-inline">
                    <li> <a href="<?php 
    echo $this->url->create("user/profile/{$question->acronym}");
    ?>
">
                            <img  src=" <?php 
    echo get_gravatar($question->email);
    ?>
" alt="gravatar" width="20"></a>
                    </li>
                    <li> <a href="<?php 
    echo $this->url->create("user/profile/{$question->acronym}");
    ?>
">
                            <?php 
    echo $this->di->textFilter->doFilter($question->name, 'shortcode, markdown');
    ?>
</a>
                    </li>
                    <?php 
    if ($question->solved == 1) {
        ?>
开发者ID:edtau,项目名称:wgtw,代码行数:30,代码来源:list_question.tpl.php

示例14: base_url

?>
          </ul>
            
    
          
        </div>
    </div>

    <div class="content-area">
      <div class="row mainnavbar">
      <div class="topbar">
      <?php 
if ($this->client->userpic != 'no-pic.png') {
    $userimage = base_url() . "files/media/" . $this->client->userpic;
} else {
    $userimage = get_gravatar($this->client->email);
}
?>
      <span class="inline visible-xs"><a href="<?php 
echo site_url("agent");
?>
" data-toggle="mainmodal" title="<?php 
echo $this->lang->line('application_profile');
?>
"><img class="img-circle topbar-userpic" src="<?php 
echo $userimage;
?>
" height="21px"></a></span>
      <img class="img-circle topbar-userpic hidden-xs" src="<?php 
echo $userimage;
?>
开发者ID:timclifford,项目名称:freelance-manager,代码行数:31,代码来源:application_client.php

示例15: addDefaultUser

 /**
  * Add Directus default user
  *
  * @param array $data
  * @return array
  */
 public static function addDefaultUser($data)
 {
     $db = Bootstrap::get('ZendDb');
     $tableGateway = new TableGateway('directus_users', $db);
     $hash = password_hash($data['directus_password'], PASSWORD_DEFAULT, ['cost' => 12]);
     $data['user_salt'] = StringUtils::randomString();
     $data['user_token'] = StringUtils::randomString(32);
     $data['avatar'] = get_gravatar($data['directus_email']);
     $tableGateway->insert(['active' => 1, 'first_name' => 'Admin', 'last_name' => 'User', 'email' => $data['directus_email'], 'password' => $hash, 'salt' => $data['user_salt'], 'avatar' => $data['avatar'], 'group' => 1, 'token' => $data['user_token'], 'language' => ArrayUtils::get($data, 'default_language', 'en')]);
     return $data;
 }
开发者ID:YounessTayer,项目名称:directus,代码行数:17,代码来源:InstallerUtils.php


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