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


PHP Activity::getFriendsActivities方法代码示例

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


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

示例1: social_news

function social_news()
{
    global $db;
    $news = array();
    $actvity_obj = new Activity();
    $activities = $actvity_obj->getFriendsActivities($_SESSION['member_id']);
    foreach ($activities as $row) {
        $link_title = printSocialName($row['member_id']) . ' ' . $row['title'];
        $news[] = array('time' => $row['created_date'], 'object' => $row, 'thumb' => 'images/home-directory_sm.png', 'link' => '<span title="' . strip_tags($link_title) . '">' . $link_title . "</span>");
    }
    return $news;
}
开发者ID:vicentborja,项目名称:ATutor,代码行数:12,代码来源:module_news.php

示例2: unset

            unset($mail);
        }
    } elseif ($_GET['approval'] == 'n') {
        rejectFriendRequest($id);
    }
    header('Location: ' . url_rewrite(AT_SOCIAL_BASENAME . AT_SOCIAL_INDEX, AT_PRETTY_URL_IS_HEADER));
    exit;
}
include AT_INCLUDE_PATH . 'header.inc.php';
?>
<div class="social-wrapper">
	<div class="network-activity"> 
		<?php 
//network updates
$actvity_obj = new Activity();
$savant->assign('activities', $actvity_obj->getFriendsActivities($_SESSION['member_id']));
$savant->display('social/activities.tmpl.php');
//applications/gagdets
$applications_obj = new Applications();
$savant->assign('list_of_my_apps', $applications_obj->listMyApplications(true));
$savant->display('social/tiny_applications.tmpl.php');
//			echo '<div class="gadget_wrapper">';
//			echo '<div class="gadget_title_bar">Applications</div>';
//			echo '<div class="gadget_container">TODO: GADGETS/Applications</div>';
//			echo '</div>';
?>
	</div>

	<div class="my-contacts">
		<?php 
//if friends array is not empty.
开发者ID:vicentborja,项目名称:ATutor,代码行数:31,代码来源:index.php

示例3: strpos

        $pos_after_last_match = strpos($str, $tag[0]) + strlen($tag[0]);
        $str_after_last_match = substr($str, $pos_after_last_match);
        if ($curr_len + strlen($str_after_last_match) > $length) {
            $rtn .= substr($str_after_last_match, 0, $length - $curr_len) . ' ...';
        } else {
            $rtn = $str;
        }
    } else {
        $rtn = substr($str, 0, $length);
    }
    return $rtn;
}
global $db;
$link_limit = 3;
//Numero massimo dei possibili sottocontenuti visualizzabili nella home-page
$cnt = 0;
$actvity_obj = new Activity();
$activities = $actvity_obj->getFriendsActivities($_SESSION['member_id']);
if (is_array($activities)) {
    foreach ($activities as $i => $activity) {
        if ($cnt >= $link_limit) {
            break;
        }
        $cnt++;
        $link_title = printSocialName($activity['member_id']) . ' ' . $activity['title'];
        $list[] = '<span title="' . strip_tags($link_title) . '">' . substring($link_title, SUBLINK_TEXT_LEN) . "</span>";
    }
    return $list;
} else {
    return 0;
}
开发者ID:vicentborja,项目名称:ATutor,代码行数:31,代码来源:sublinks.php


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