Example #1
0
    $browse->store();
    ?>
        </div>
        <div id="followers" class="tab_content">
        <?php 
    $follower_ids = $client->get_followers();
    $browse = new Browse();
    $browse->set_type('user');
    $browse->set_simple_browse(false);
    $browse->show_objects($follower_ids);
    $browse->store();
    ?>
        </div>
            <div id="timeline" class="tab_content">
                <?php 
    if (Preference::get_by_user($client->id, 'allow_personal_info_recent')) {
        $activities = Useractivity::get_activities($client->id);
        Useractivity::build_cache($activities);
        foreach ($activities as $aid) {
            $activity = new Useractivity($aid);
            $activity->show();
        }
    }
    ?>
            </div>
        <?php 
}
?>
    </div>
</div>
Example #2
0
 /**
  * timeline
  * This get an user timeline
  * @param array $input
  */
 public static function timeline($input)
 {
     if (AmpConfig::get('sociable')) {
         $username = $input['username'];
         $limit = intval($input['limit']);
         $since = intval($input['since']);
         if (!empty($username)) {
             $user = User::get_from_username($username);
             if ($user !== null) {
                 if (Preference::get_by_user($user->id, 'allow_personal_info_recent')) {
                     $activities = Useractivity::get_activities($user->id, $limit, $since);
                     ob_end_clean();
                     echo XML_Data::timeline($activities);
                 }
             }
         } else {
             debug_event('api', 'Username required on timeline function call.', 1);
         }
     } else {
         debug_event('api', 'Sociable feature is not enabled.', 3);
     }
 }