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


PHP bp_get_activity_date_recorded函数代码示例

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


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

示例1: rtmedia_api_get_feed

 /**
  * Fetches Activity for rtmedia updates, if user id for activity is provided fetches the user specific rtmedia updates
  * @global type $activities_template
  * @param type $activity_user_id
  * @param type $activity_id
  * @return array(), Activity data
  */
 function rtmedia_api_get_feed($activity_user_id = FALSE, $activity_id = FALSE, $per_page = 10)
 {
     global $activities_template, $rtmediajsonapi;
     $activity_feed = array();
     extract($_REQUEST);
     $i = 0;
     $args = array('user_id' => $activity_user_id, 'action' => '', 'page' => !empty($_REQUEST['page']) ? $_REQUEST['page'] : 1, 'per_page' => $per_page, 'in' => $activity_id);
     if (bp_has_activities($args)) {
         $activity_feed['total_activity_count'] = $activities_template->total_activity_count;
         $activity_feed['total'] = ceil((int) $activities_template->total_activity_count / (int) $activities_template->pag_num);
         $activity_feed['current'] = $activities_template->pag_page;
         while (bp_activities()) {
             bp_the_activity();
             //Activity basic details
             $activity_feed[$i]['id'] = $activities_template->activity->id;
             $activity_feed[$i]['activity_type'] = $activities_template->activity->type;
             $activity_feed[$i]['activity_time'] = bp_get_activity_date_recorded();
             $activity_feed[$i]['activity_time_human'] = strip_tags(bp_insert_activity_meta(''));
             $activity_feed[$i]['activity_content'] = $activities_template->activity->content;
             //activity User
             if (!$activity_user_id) {
                 //Activity User data
                 $activity_feed[$i]['user'] = $this->rtmedia_api_user_data_from_id(bp_get_activity_user_id());
             }
             //Media Details
             if (class_exists("RTMediaModel")) {
                 $model = new RTMediaModel();
                 $media = $model->get_by_activity_id($activities_template->activity->id);
                 if (isset($media['result']) && count($media['result']) > 0) {
                     //Create media array
                     $media = $this->rtmedia_api_media_details($media['result']);
                 } else {
                     $media = false;
                 }
             }
             if ($activity_id) {
                 //Activity Comment Count
                 $id = $media[0]['id'];
                 $activity_feed[$i]['comments'] = $this->rtmedia_api_get_media_comments($id);
             }
             //Activity Image
             $activity_feed[$i]['media'] = $media;
             $i++;
         }
     }
     return $activity_feed;
 }
开发者ID:fs-contributor,项目名称:rtMedia,代码行数:54,代码来源:RTMediaJsonApiFunctions.php

示例2: do_action

		<?php 
        }
        ?>

		<?php 
        do_action('bp_activity_entry_content');
        ?>

		<?php 
        if (is_user_logged_in()) {
            ?>

			<div class="activity-meta">

				<?php 
            echo bp_core_time_since(bp_get_activity_date_recorded());
            ?>
										

				<!-- Delete -->
		
				<?php 
            $owner = bp_get_activity_user_id() == $bp->loggedin_user->id;
            ?>
					 
				<?php 
            if (is_super_admin() || $bp->current_action != "just-me" && $bp->is_item_admin || $owner) {
                ?>
				
					&middot; <a href="<?php 
                echo wp_nonce_url($bp->root_domain . '/' . $bp->activity->slug . '/delete/' . bp_get_activity_id() . '?cid=' . $comment_id, 'bp_activity_delete_link');
开发者ID:par-orillonsoft,项目名称:Wishmagnet,代码行数:31,代码来源:permalink.php

示例3: build_html

    function build_html()
    {
        // Store everything in an output buffer
        ob_start();
        ?>
	
		<div class="widget showcase-widget">
			<header class="widget-header">
				<h3 class="widget-title">Recent Discussion</h3>
			</header>
			<ul class="recent-discussion-list">		
	
			<?php 
        // Iterate topics
        while (bp_activities()) {
            bp_the_activity();
            // Get the activity user
            $user = new Apoc_User(bp_get_activity_user_id(), 'directory', 40);
            // Get the activity type
            $type = bp_get_activity_type();
            // Format activity based on context
            switch ($type) {
                case 'bbp_topic_create':
                    $topic_id = bp_get_activity_item_id();
                    $link = '<a href="' . bbp_get_topic_permalink($topic_id) . '" title="Read topic" target="_blank">' . bbp_get_topic_title($topic_id) . '</a>';
                    $verb = 'created topic';
                    break;
                case 'bbp_reply_create':
                    $reply_id = bp_get_activity_secondary_item_id();
                    $link = '<a href="' . bbp_get_topic_last_reply_url($reply_id) . '" title="Read reply" target="_blank">' . bbp_get_topic_title($reply_id) . '</a>';
                    $verb = 'replied to';
                    break;
                case 'new_blog_comment':
                    $comment_id = bp_get_activity_secondary_item_id();
                    $comment = get_comment($comment_id);
                    $link = '<a href="' . get_comment_link($comment_id) . '" title="Read reply" target="_blank">' . get_the_title($comment->comment_post_ID) . '</a>';
                    $verb = 'commented on';
                    break;
            }
            // Get the activity time
            $time = bp_core_time_since(bp_get_activity_date_recorded());
            // Output the HTML
            ?>
				<li class="recent-discussion double-border">			
					<?php 
            echo $user->avatar;
            ?>
					<div class="recent-discussion-content">
						<span class="recent-discussion-title"><?php 
            echo $user->link . ' ' . $verb . ' ' . $link;
            ?>
</span>
						<span class="recent-discussion-time"><?php 
            echo $time;
            ?>
					</div>
				</li>
			
			<?php 
        }
        ?>
			</ul>
		</div><?php 
        // Get the contents of the buffer
        $html = ob_get_contents();
        ob_end_clean();
        // Return the html to the class
        return $html;
    }
开发者ID:tamriel-foundry,项目名称:apoc2,代码行数:69,代码来源:widgets.php

示例4: bpgr_get_activity_date_recorded

function bpgr_get_activity_date_recorded()
{
    $date = bp_get_activity_date_recorded();
    $format = get_option('date_format');
    return apply_filters('bpgr_get_activity_date_recorded', date($format, strtotime($date)), $date);
}
开发者ID:adisonc,项目名称:MaineLearning,代码行数:6,代码来源:templatetags.php

示例5: bp_activity_heartbeat_last_recorded

/**
 * Use WordPress Heartbeat API to check for latest activity update.
 *
 * @since 2.0.0
 *
 * @uses bp_activity_get_last_updated() to get the recorded date of the last activity.
 *
 * @param array $response Array containing Heartbeat API response.
 * @param array $data     Array containing data for Heartbeat API response.
 * @return array $response
 */
function bp_activity_heartbeat_last_recorded($response = array(), $data = array())
{
    if (empty($data['bp_activity_last_recorded'])) {
        return $response;
    }
    // Use the querystring argument stored in the cookie (to preserve
    // filters), but force the offset to get only new items.
    $activity_latest_args = bp_parse_args(bp_ajax_querystring('activity'), array('since' => date('Y-m-d H:i:s', $data['bp_activity_last_recorded'])), 'activity_latest_args');
    if (!empty($data['bp_activity_last_recorded_search_terms']) && empty($activity_latest_args['search_terms'])) {
        $activity_latest_args['search_terms'] = addslashes($data['bp_activity_last_recorded_search_terms']);
    }
    $newest_activities = array();
    $last_activity_recorded = 0;
    // Temporarily add a just-posted class for new activity items.
    add_filter('bp_get_activity_css_class', 'bp_activity_newest_class', 10, 1);
    ob_start();
    if (bp_has_activities($activity_latest_args)) {
        while (bp_activities()) {
            bp_the_activity();
            $atime = strtotime(bp_get_activity_date_recorded());
            if ($last_activity_recorded < $atime) {
                $last_activity_recorded = $atime;
            }
            bp_get_template_part('activity/entry');
        }
    }
    $newest_activities['activities'] = ob_get_contents();
    $newest_activities['last_recorded'] = $last_activity_recorded;
    ob_end_clean();
    // Remove the temporary filter.
    remove_filter('bp_get_activity_css_class', 'bp_activity_newest_class', 10, 1);
    if (!empty($newest_activities['last_recorded'])) {
        $response['bp_activity_newest_activities'] = $newest_activities;
    }
    return $response;
}
开发者ID:mawilliamson,项目名称:wordpress,代码行数:47,代码来源:bp-activity-filters.php

示例6: bp_activity_date_recorded

/**
 * Outputs the date the activity was recorded
 *
 * @since 1.2.0
 *
 * @uses bp_get_activity_date_recorded()
 */
function bp_activity_date_recorded()
{
    echo bp_get_activity_date_recorded();
}
开发者ID:nxtclass,项目名称:NXTClass,代码行数:11,代码来源:bp-activity-template.php

示例7: bp_displayed_user_mentionname

					</p>
				<?php 
    }
    ?>

			<?php 
}
?>

			<p class="bp-embed-header-meta">
				<?php 
if (bp_is_active('activity') && bp_activity_do_mentions()) {
    ?>
					<span class="bp-embed-mentionname">@<?php 
    bp_displayed_user_mentionname();
    ?>
 &middot; </span>
				<?php 
}
?>

				<span class="bp-embed-timestamp"><a href="<?php 
bp_activity_thread_permalink();
?>
"><?php 
echo date_i18n(get_option('time_format') . ' - ' . get_option('date_format'), strtotime(bp_get_activity_date_recorded()));
?>
</a></span>
			</p>
		</div>
开发者ID:CompositeUK,项目名称:clone.BuddyPress,代码行数:30,代码来源:header-activity.php

示例8: bp_activity_avatar

bp_activity_avatar('type=thumb&width=30&height=30');
?>
		</a>
	</div>

	<div class="activity-content">

		<div class="activity-header">
			<?php 
echo bpgr_get_review_rating_html(bp_activity_get_meta(bp_get_activity_id(), 'bpgr_rating'));
?>
 <?php 
printf(__('By %s', 'bpgr'), bp_core_get_userlink(bp_get_activity_user_id()));
?>
 (<?php 
printf(__('%s ago', 'bpgr'), bp_core_time_since(bp_get_activity_date_recorded()));
?>
) <a href="<?php 
echo site_url(BP_ACTIVITY_SLUG . '/p/' . bp_get_activity_id() . '/');
?>
"><?php 
_e('#', 'bpgr');
?>
</a>
		</div>

		<?php 
if (bp_activity_has_content()) {
    ?>
			<div class="activity-inner">
				<?php 
开发者ID:adisonc,项目名称:MaineLearning,代码行数:31,代码来源:entry.php

示例9: wall_read_filter

/**
 * This filters wall actions, when reading an item it will convert it to use wall markup
 *
 * @since BuddyBoss 2.0
 */
function wall_read_filter($action)
{
    global $activities_template;
    $curr_id = $activities_template->current_activity;
    $act_id = $activities_template->activities[$curr_id]->id;
    $bbwall_action = bp_activity_get_meta($act_id, 'buddyboss_wall_action');
    // file_put_contents( ABSPATH . 'lglg.txt', print_r( $bbwall_action, true )."\n", FILE_APPEND );
    // file_put_contents( ABSPATH . 'lglg.txt', print_r( $curr_id, true )."\n", FILE_APPEND );
    // file_put_contents( ABSPATH . 'lglg.txt', print_r( $act_id, true )."\n\n", FILE_APPEND );
    if ($bbwall_action) {
        $with_meta = $bbwall_action . ' <a class="activity-time-since"><span class="time-since">' . bp_core_time_since(bp_get_activity_date_recorded()) . '</span></a>';
        if ($with_meta) {
            return $with_meta;
        }
        return $bbwall_action;
    }
    return $action;
}
开发者ID:tvolmari,项目名称:hammydowns,代码行数:23,代码来源:buddyboss-wall-loader.php

示例10: buddyboss_pics_read_activity_filter

/**
 * This filters pics actions, when reading an item it will convert it to use pics language
 *
 * @since BuddyBoss 2.0
 */
function buddyboss_pics_read_activity_filter($action)
{
    global $activities_template;
    $current_activity = $activities_template->current_activity;
    $current_activity_id = $activities_template->activities[$current_activity]->id;
    $buddyboss_pics_action = bp_activity_get_meta($current_activity_id, 'buddyboss_pics_action');
    if (!$buddyboss_pics_action) {
        $buddyboss_pics_action = bp_activity_get_meta($current_activity_id, 'bboss_pics_action');
    }
    if ($buddyboss_pics_action) {
        $with_meta = $buddyboss_pics_action . ' <a class="activity-time-since"><span class="time-since">' . bp_core_time_since(bp_get_activity_date_recorded()) . '</span></a>';
        if ($with_meta) {
            return $with_meta;
        }
        return $buddyboss_pics_action;
    }
    return $action;
}
开发者ID:tvolmari,项目名称:hammydowns,代码行数:23,代码来源:buddyboss-pics-loader.php

示例11: do_action

</language>
	<?php 
do_action('etivite_bp_activity_hashtags_feed_head');
?>
	<?php 
if (bp_has_activities('max=50&display_comments=stream&search_terms=#' . bp_action_variable(0) . '<')) {
    ?>
		<?php 
    while (bp_activities()) {
        bp_the_activity();
        ?>
			<?php 
        if (etivite_bp_activity_hashtags_current_activity() == 0) {
            ?>
				<pubDate><?php 
            echo mysql2date('D, d M Y H:i:s O', bp_get_activity_date_recorded(), false);
            ?>
</pubDate>
			<?php 
        }
        ?>
			<item>
				<guid><?php 
        bp_activity_thread_permalink();
        ?>
</guid>
				<title><![CDATA[<?php 
        bp_activity_feed_item_title();
        ?>
]]></title>
				<link><?php 
开发者ID:socialray,项目名称:surfied-2-0,代码行数:31,代码来源:bp-activity-hashtags-feed.php


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