Exemplo n.º 1
0
 *
 * @package   (Informatikon.com).ossn
 * @author    OSSN Core Team <info@opensource-socialnetwork.org>
 * @copyright 2014 iNFORMATIKON TECHNOLOGIES
 * @license   General Public Licence http://www.opensource-socialnetwork.org/licence
 * @link      http://www.opensource-socialnetwork.org/licence
 */
if ($params['ismember'] === 1) {
    echo '<div class="ossn-wall-container">';
    echo ossn_view_form('group/container', array('action' => ossn_site_url() . 'action/wall/post/g', 'component' => 'OssnWall', 'id' => 'ossn-wall-form', 'params' => array('group' => $params['group'])), false);
    echo '</div>';
}
echo '<div class="user-activity">';
$posts = new OssnWall();
$posts = $posts->GetPostByOwner($params['group']['group']->guid, 'group');
$Pagination = new OssnPagination();
$Pagination->setItem($posts);
$posts = false;
if ($params['ismember'] === 1 || $params['membership'] == OSSN_PUBLIC) {
    $posts = $Pagination->getItem();
}
if ($posts) {
    foreach ($posts as $post) {
        $data = json_decode(html_entity_decode($post->description));
        $text = ossn_restore_new_lines($data->post, true);
        $location = '';
        if (isset($data->location)) {
            $location = '- ' . $data->location;
        }
        if (!isset($data->friend)) {
            $data->friend = '';
Exemplo n.º 2
0
/**
 * Add search group link on search page
 *
 * @return void;
 * @access private
 */
function ossn_group_search_link($event, $type, $params)
{
    $url = OssnPagination::constructUrlArgs(array('type'));
    ossn_register_menu_link('search:users', 'search:groups', "search?type=groups{$url}", 'search');
}
Exemplo n.º 3
0
/**
 * Open Source Social Network
 *
 * @package   (Informatikon.com).ossn
 * @author    OSSN Core Team <info@opensource-socialnetwork.org>
 * @copyright 2014 iNFORMATIKON TECHNOLOGIES
 * @license   General Public Licence http://www.opensource-socialnetwork.org/licence
 * @link      http://www.opensource-socialnetwork.org/licence
 */
$pages = range(1, $params['total']);
//unset non-required vars
unset($_GET['h']);
unset($_GET['p']);
unset($_GET['offset']);
$args_url = OssnPagination::constructUrlArgs();
//if there is only one page don't show pagination
if (count($pages) !== 1) {
    $spilt = array_chunk($pages, 4);
    $spilt = arraySerialize($spilt);
    foreach ($spilt as $page) {
        $serialized_pages[] = arraySerialize($page);
    }
    $serialized_pages = arraySerialize($serialized_pages);
    //get key by offset
    $key = ossn_recursive_array_search($params['offset'], $serialized_pages);
    $new_total = count($serialized_pages);
    //get last page
    $last = array_reverse($serialized_pages[$new_total]);
    $last = $last[0];
    //get first page
Exemplo n.º 4
0
/**
 * Add profile search page handler
 *
 * @return string data;
 */
function profile_search_handler($hook, $type, $return, $params)
{
    $Pagination = new OssnPagination();
    $users = new OssnUser();
    $data = $users->searchUsers($params['q']);
    $Pagination->setItem($data);
    $user['users'] = $Pagination->getItem();
    $search = ossn_plugin_view('output/users', $user);
    $search .= $Pagination->pagination();
    if (empty($data)) {
        return ossn_print('ossn:search:no:result');
    }
    return $search;
}
<?php

/**
 *    OpenSource-SocialNetwork
 *
 * @package   (Informatikon.com).ossn
 * @author    OSSN Core Team <info@opensource-socialnetwork.com>
 * @copyright 2014 iNFORMATIKON TECHNOLOGIES
 * @license   General Public Licence http://opensource-socialnetwork.com/licence
 * @link      http://www.opensource-socialnetwork.com/licence
 */
$users = new OssnUser();
$pagination = new OssnPagination();
$pagination->setItem($users->getUnvalidatedUSERS());
$list = $pagination->getItem();
?>
<div class="top-controls top-controls-users-page">
    <a href="<?php 
echo ossn_site_url("administrator/adduser");
?>
" class="ossn-admin-button button-green"><?php 
echo ossn_print('add');
?>
</a>
</div>
<table class="table ossn-users-list">
    <tbody>
    <tr class="table-titles">
        <td><?php 
echo ossn_print('name');
?>
/**
 * Create a pagiantion using count and page limit
 *
 * @param integer $count total entities/objects
 * @param integer $page_limit Number of entities/objects per page
 *
 * @return false|mixed data
 */
function ossn_view_pagination($count = false, $page_limit = 10)
{
    $page_limit = ossn_call_hook('pagination', 'page_limit', false, $page_limit);
    if (!empty($count) && !empty($page_limit)) {
        $pagination = new OssnPagination();
        $params = array();
        $params['limit'] = $count;
        $params['page_limit'] = $page_limit;
        $offset = input('offset');
        if (empty($offset)) {
            ossn_set_input('offset', 1);
        }
        return $pagination->pagination($params);
    }
    return false;
}
Exemplo n.º 7
0
<?php

/**
 *    OpenSource-SocialNetwork
 *
 * @package   (Informatikon.com).ossn
 * @author    OSSN Core Team <info@opensource-socialnetwork.com>
 * @copyright 2014 iNFORMATIKON TECHNOLOGIES
 * @license   General Public Licence http://opensource-socialnetwork.com/licence
 * @link      http://www.opensource-socialnetwork.com/licence
 */
$search = input('search_users');
$users = new OssnUser();
$pagination = new OssnPagination();
if (!empty($search)) {
    $pagination->setItem($users->SearchSiteUsers($search));
} else {
    $pagination->setItem($users->getSiteUsers());
}
?>
<div class="top-controls top-controls-users-page">
    <a href="<?php 
echo ossn_site_url("administrator/adduser");
?>
"
       class="ossn-admin-button button-green"><?php 
echo ossn_print('add');
?>
</a>
</div>
<table class="table ossn-users-list">
function profile_search_handler($hook, $type, $return, $params)
{
    $Pagination = new OssnPagination();
    $users = new OssnUser();
    $data = $users->searchUsers($params['q']);
    $Pagination->setItem($data);
    $user['users'] = $Pagination->getItem();
    $search = ossn_view('system/templates/users', $user);
    $search .= $Pagination->pagination();
    if (empty($data)) {
        return 'No result found';
    }
    return $search;
}
Exemplo n.º 9
0
<?php

/**
 * Open Source Social Network
 *
 * @package   (Informatikon.com).ossn
 * @author    OSSN Core Team <info@opensource-socialnetwork.org>
 * @copyright 2014 iNFORMATIKON TECHNOLOGIES
 * @license   General Public Licence http://www.opensource-socialnetwork.org/licence
 * @link      http://www.opensource-socialnetwork.org/licence
 */
$users = new OssnUser();
$pagination = new OssnPagination();
$search = input('search_users');
$data = $users->getUnvalidatedUSERS($search);
$pagination->setItem($data);
$list = $pagination->getItem();
?>
<div class="row">
    <form method="post">
        <input type="text" name="search_users" placeholder="<?php 
echo ossn_print('search');
?>
" />
        <input type="submit" class="btn btn-primary" value="<?php 
echo ossn_print('search');
?>
"/>
    </form>    
</div>
<div class="row margin-top-10">
Exemplo n.º 10
0
<?php

/**
 * Open Source Social Network
 *
 * @package   Open Source Social Network
 * @author    Open Social Website Core Team <info@informatikon.com>
 * @copyright 2014 iNFORMATIKON TECHNOLOGIES
 * @license   General Public Licence http://www.opensource-socialnetwork.org/licence
 * @link      http://www.opensource-socialnetwork.org/licence
 */
$ads = new OssnAds();
$pagination = new OssnPagination();
$pagination->setItem($ads->getAds());
?>
<div class="top-controls">
    <a href="<?php 
echo ossn_site_url("administrator/component/OssnAds?settings=add");
?>
"
       class="ossn-admin-button button-green"><?php 
echo ossn_print('add');
?>
</a>
       <input type="submit" class="ossn-admin-button button-red" value="<?php 
echo ossn_print('delete');
?>
"/>
</div>
<table class="table">
    <tbody>