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


PHP ossn_set_page_layout函数代码示例

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


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

示例1: ossn_search_page

function ossn_search_page($pages)
{
    $page = $pages[0];
    if (empty($page)) {
        $page = 'search';
    }
    ossn_trigger_callback('page', 'load:search');
    switch ($page) {
        case 'search':
            $query = input('q');
            $type = input('type');
            $title = ossn_print("search:result", array($query));
            if (empty($type)) {
                $params['type'] = 'users';
            } else {
                $params['type'] = $type;
            }
            $type = $params['type'];
            if (ossn_is_hook('search', "type:{$type}")) {
                $contents['contents'] = ossn_call_hook('search', "type:{$type}", array('q' => input('q')));
            }
            $contents = array('content' => ossn_plugin_view('search/pages/search', $contents));
            $content = ossn_set_page_layout('search', $contents);
            echo ossn_view_page($title, $content);
            break;
        default:
            ossn_error_page();
            break;
    }
}
开发者ID:nongdanit-nongdanit,项目名称:ossn,代码行数:30,代码来源:ossn_com.php

示例2: chatroom_page

function chatroom_page()
{
    $title = 'Chatroom';
    $contents = array('content' => ossn_view('components/chatroom/index'));
    $content = ossn_set_page_layout('newsfeed', $contents);
    echo ossn_view_page($title, $content);
}
开发者ID:kreativmind,项目名称:ossn-signup-age-tool,代码行数:7,代码来源:ossn_com.php

示例3: profile_about_user_page

/**
 * Register user about page
 *
 * @return string
 */
function profile_about_user_page($hook, $type, $return, $params)
{
    $page = $params['subpage'];
    if ($page == 'about') {
        $content = ossn_plugin_view('profile/about', $params);
        echo ossn_set_page_layout('module', array('title' => ossn_print('aboutuser'), 'content' => $content));
    }
}
开发者ID:ctlui,项目名称:aboutuser,代码行数:13,代码来源:ossn_com.php

示例4: ossn_invite_pagehandler

/**
 * Invite page handler
 * 
 * @note Please don't call this function directly in your code.
 *
 * @return mixed
 * @access private
 */
function ossn_invite_pagehandler()
{
    if (!ossn_isLoggedin()) {
        ossn_error_page();
    }
    $title = ossn_print('com:ossn:invite:friends');
    $contents['content'] = ossn_view('components/OssnInvite/pages/invite');
    $content = ossn_set_page_layout('newsfeed', $contents);
    echo ossn_view_page($title, $content);
}
开发者ID:aidovoga,项目名称:opensource-socialnetwork,代码行数:18,代码来源:ossn_com.php

示例5: severpages

function severpages($pages)
{
    if (!ossn_isLoggedin()) {
        ossn_error_page();
    }
    $title = ossn_print('com:ossn:severload');
    //give a exact path to file <components/serverpages/pages/serverload>
    $contents['content'] = ossn_view('components/serverpages/pages/severload');
    $content = ossn_set_page_layout('contents', $contents);
    echo ossn_view_page($title, $content);
}
开发者ID:alexmwiti,项目名称:componets,代码行数:11,代码来源:ossn_com.php

示例6: ossn_site_pages

function ossn_site_pages($pages)
{
    $page = $pages[0];
    if (empty($page)) {
        redirect(REF);
    }
    $OssnSitePages = new OssnSitePages();
    switch ($page) {
        case 'about':
            $OssnSitePages->pagename = 'about';
            $OssnSitePages = $OssnSitePages->getPage();
            if (isset($OssnSitePages->description)) {
                $params['contents'] = html_entity_decode(html_entity_decode($OssnSitePages->description));
            }
            $params['title'] = ossn_print('site:about');
            $title = $params['title'];
            $contents = array('content' => ossn_view('components/OssnSitePages/pages/page', $params));
            $content = ossn_set_page_layout('contents', $contents);
            echo ossn_view_page($title, $content);
            break;
        case 'terms':
            $OssnSitePages->pagename = 'terms';
            $OssnSitePages = $OssnSitePages->getPage();
            if (isset($OssnSitePages->description)) {
                $params['contents'] = html_entity_decode(html_entity_decode($OssnSitePages->description));
            }
            $params['title'] = ossn_print('site:terms');
            $title = $params['title'];
            $contents = array('content' => ossn_view('components/OssnSitePages/pages/page', $params));
            $content = ossn_set_page_layout('contents', $contents);
            echo ossn_view_page($title, $content);
            break;
        case 'privacy':
            $OssnSitePages->pagename = 'privacy';
            $OssnSitePages = $OssnSitePages->getPage();
            if (isset($OssnSitePages->description)) {
                $params['contents'] = html_entity_decode(html_entity_decode($OssnSitePages->description));
            }
            $params['title'] = ossn_print('site:privacy');
            $title = $params['title'];
            $contents = array('content' => ossn_view('components/OssnSitePages/pages/page', $params));
            $content = ossn_set_page_layout('contents', $contents);
            echo ossn_view_page($title, $content);
            break;
        default:
            ossn_error_page();
            break;
    }
}
开发者ID:aidovoga,项目名称:opensource-socialnetwork,代码行数:49,代码来源:ossn_com.php

示例7: ossn_post_page

/**
 * OssnWall post page handlers 
 * 
 * @param array $pages List of pages
 *
 * @return false|mixed data
 * @access private
 */
function ossn_post_page($pages)
{
    $page = $pages[0];
    if (empty($page)) {
        return false;
    }
    switch ($page) {
        case 'view':
            $title = ossn_print('post:view');
            $wall = new OssnWall();
            $post = $pages[1];
            $post = $wall->GetPost($post);
            if (empty($post->guid) || empty($pages[1])) {
                ossn_error_page();
            }
            $params['post'] = $post;
            $contents = array('content' => ossn_plugin_view('wall/pages/view', $params));
            $content = ossn_set_page_layout('newsfeed', $contents);
            echo ossn_view_page($title, $content);
            break;
        case 'photo':
            if (isset($pages[1]) && isset($pages[2])) {
                $image = ossn_get_userdata("object/{$pages[1]}/ossnwall/images/{$pages[2]}");
                header('Content-Type: image/jpeg');
                echo file_get_contents($image);
            }
            break;
        case 'privacy':
            if (ossn_is_xhr()) {
                $params = array('title' => ossn_print('privacy'), 'contents' => ossn_plugin_view('wall/privacy'), 'callback' => '#ossn-wall-privacy');
                echo ossn_plugin_view('output/ossnbox', $params);
            }
            break;
        case 'refresh_home':
            echo ossn_plugin_view('wall/siteactivity');
            break;
        default:
            ossn_error_page();
            break;
    }
}
开发者ID:sthefanysoares,项目名称:Social-Network,代码行数:49,代码来源:ossn_com.php

示例8: ossn_user_pagehandler

/**
 * Register basic pages
 * @pages:
 *       home,
 *    login,
 *       registered
 *
 * @return mixed contents
 */
function ossn_user_pagehandler($home, $handler)
{
    switch ($handler) {
        case 'home':
            if (!ossn_isLoggedin()) {
                ossn_error_page();
            }
            $title = ossn_print('news:feed');
            if (com_is_active('OssnWall')) {
                $contents['content'] = ossn_plugin_view('wall/pages/wall');
            }
            $content = ossn_set_page_layout('newsfeed', $contents);
            echo ossn_view_page($title, $content);
            break;
        case 'resetlogin':
            if (ossn_isLoggedin()) {
                redirect('home');
            }
            $user = input('user');
            $code = input('c');
            $contents['content'] = ossn_plugin_view('pages/contents/user/resetlogin');
            if (!empty($user) && !empty($code)) {
                $contents['content'] = ossn_plugin_view('pages/contents/user/resetcode');
            }
            $title = ossn_print('reset:login');
            $content = ossn_set_page_layout('startup', $contents);
            echo ossn_view_page($title, $content);
            break;
        case 'login':
            if (ossn_isLoggedin()) {
                redirect('home');
            }
            $title = ossn_print('site:login');
            $contents['content'] = ossn_plugin_view('pages/contents/user/login');
            $content = ossn_set_page_layout('startup', $contents);
            echo ossn_view_page($title, $content);
            break;
        case 'registered':
            if (ossn_isLoggedin()) {
                redirect('home');
            }
            $title = ossn_print('account:registered');
            $contents['content'] = ossn_plugin_view('pages/contents/user/registered');
            $content = ossn_set_page_layout('startup', $contents);
            echo ossn_view_page($title, $content);
            break;
        default:
            ossn_error_page();
            break;
    }
}
开发者ID:nongdanit-nongdanit,项目名称:ossn,代码行数:60,代码来源:ossn.lib.initialize.php

示例9: ossn_messages_page

function ossn_messages_page($pages)
{
    if (!ossn_isLoggedin()) {
        ossn_error_page();
    }
    $OssnMessages = new OssnMessages();
    $page = $pages[0];
    if (empty($page)) {
        $page = 'messages';
    }
    switch ($page) {
        case 'message':
            $username = $pages[1];
            if (!empty($username)) {
                $user = ossn_user_by_username($username);
                if (empty($user->guid)) {
                    ossn_error_page();
                }
                $title = ossn_print('ossn:message:between', array($user->fullname));
                $OssnMessages->markViewed($user->guid, ossn_loggedin_user()->guid);
                $params['data'] = $OssnMessages->get(ossn_loggedin_user()->guid, $user->guid);
                $params['user'] = $user;
                $params['recent'] = $OssnMessages->recentChat(ossn_loggedin_user()->guid);
                $contents = array('content' => ossn_plugin_view('messages/pages/view', $params));
                $content = ossn_set_page_layout('media', $contents);
                echo ossn_view_page($title, $content);
            } else {
                ossn_error_page();
            }
            break;
        case 'all':
            $params['recent'] = $OssnMessages->recentChat(ossn_loggedin_user()->guid);
            $active = $params['recent'][0];
            if (isset($active->message_to) && $active->message_to == ossn_loggedin_user()->guid) {
                $getuser = $active->message_from;
            }
            if (isset($active->message_from) && $active->message_from == ossn_loggedin_user()->guid) {
                $getuser = $active->message_to;
            }
            if (isset($getuser)) {
                $user = ossn_user_by_guid($getuser);
                $OssnMessages->markViewed($getuser, ossn_loggedin_user()->guid);
                $params['data'] = $OssnMessages->get(ossn_loggedin_user()->guid, $getuser);
                $params['user'] = $user;
            }
            $contents = array('content' => ossn_plugin_view('messages/pages/messages', $params));
            if (!isset($getuser)) {
                $contents = array('content' => ossn_plugin_view('messages/pages/messages-none'));
            }
            $title = ossn_print('messages');
            $content = ossn_set_page_layout('media', $contents);
            echo ossn_view_page($title, $content);
            break;
        case 'getnew':
            $username = $pages[1];
            $guid = ossn_user_by_username($username)->guid;
            $messages = $OssnMessages->getNew($guid, ossn_loggedin_user()->guid);
            if ($messages) {
                foreach ($messages as $message) {
                    $user = ossn_user_by_guid($message->message_from);
                    $message = $message->message;
                    $params['user'] = $user;
                    $params['message'] = $message;
                    echo ossn_plugin_view('messages/templates/message-send', $params);
                }
                $OssnMessages->markViewed($guid, ossn_loggedin_user()->guid);
                echo '<script>Ossn.playSound();</script>';
            }
            break;
        case 'getrecent':
            $params['recent'] = $OssnMessages->recentChat(ossn_loggedin_user()->guid);
            echo ossn_plugin_view('messages/templates/message-with', $params);
            break;
        default:
            ossn_error_page();
            break;
    }
}
开发者ID:sthefanysoares,项目名称:Social-Network,代码行数:78,代码来源:ossn_com.php

示例10: ossn_print

<?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
 */
$title = ossn_print('site:index');
$content = ossn_set_page_layout('startup', array('content' => ossn_view('pages/contents/index')));
echo ossn_view_page($title, $content);
开发者ID:aidovoga,项目名称:opensource-socialnetwork,代码行数:14,代码来源:index.php

示例11: ossn_administrator_login_pagehandler

/**
 * Register a page handler for administrator login;
 * @pages:
 *       administrator/login,
 * @return mixeddata
 */
function ossn_administrator_login_pagehandler($pages)
{
    $page = $pages[0];
    if (empty($page)) {
        $page = 'login';
    }
    switch ($page) {
        case 'login':
            $title = 'Login';
            $contents['contents'] = ossn_view("pages/administrator/contents/login");
            $contents['title'] = $title;
            $content = ossn_set_page_layout('administrator/login', $contents);
            echo ossn_view_page($title, $content, 'administrator');
            break;
        default:
            echo 403;
            break;
    }
}
开发者ID:alibasli,项目名称:Social-Network-PHP-Joomla,代码行数:25,代码来源:ossn.lib.admin.php

示例12: ossn_notifications_page

/**
 * Notifications page
 *
 * @param (array) $pages Array containg pages
 *
 * @return mixed data;
 * @access public
 */
function ossn_notifications_page($pages)
{
    $page = $pages[0];
    if (empty($page)) {
        return false;
    }
    switch ($page) {
        case 'all':
            $title = 'Notifications';
            $contents = array('content' => ossn_view('components/OssnNotifications/pages/all'));
            $content = ossn_set_page_layout('media', $contents);
            echo ossn_view_page($title, $content);
            break;
        default:
            ossn_error_page();
            break;
    }
}
开发者ID:alibasli,项目名称:Social-Network-PHP-Joomla,代码行数:26,代码来源:ossn_com.php

示例13: profile_trips_page

/**
 * Register user trips page (profile subpage)
 *
 * @return mix data
 * @access private;
 */
function profile_trips_page($hook, $type, $return, $params)
{
    $page = $params['subpage'];
    if ($page == 'trips') {
        $user['user'] = $params['user'];
        $control = false;
        //show add trip if loggedin user is owner
        if (ossn_loggedin_user()->guid == $user['user']->guid) {
            $owner = ossn_user_by_guid($user['user']->guid);
            //$url = ossn_site_url() . 'trip/add';
            $addtrip = array('text' => ossn_print('add:trip'), 'href' => ossn_site_url("trip/add"), 'id' => 'ossn-add-trip', 'class' => 'button-grey');
            $control = ossn_plugin_view('output/url', $addtrip);
        }
        $map = ossn_plugin_view('trips/pages/trip/get', $user);
        //Mostra el els viatges
        echo ossn_set_page_layout('module', array('title' => ossn_print('trips:ossn'), 'content' => $map, 'controls' => $control));
    }
}
开发者ID:tricotrin,项目名称:OptionTrips,代码行数:24,代码来源:ossn_com.php

示例14: ossn_profile_photos_page

/**
 * Register user photos page (profile subpage)
 *
 * @return mix data
 * @access private;
 */
function ossn_profile_photos_page($hook, $type, $return, $params)
{
    $page = $params['subpage'];
    if ($page == 'photos') {
        $user['user'] = $params['user'];
        $control = false;
        //show add album if loggedin user is owner
        if (ossn_loggedin_user()->guid == $user['user']->guid) {
            $addalbum = array('text' => ossn_print('add:album'), 'href' => 'javascript::;', 'id' => 'ossn-add-album', 'class' => 'button-grey');
            $control = ossn_plugin_view('output/url', $addalbum);
        }
        $friends = ossn_plugin_view('photos/pages/photos', $user);
        echo ossn_set_page_layout('module', array('title' => ossn_print('photo:albums'), 'content' => $friends, 'controls' => $control));
    }
}
开发者ID:sthefanysoares,项目名称:Social-Network,代码行数:21,代码来源:ossn_com.php

示例15: group_requests_page

/**
 * Group member requests page
 *
 * Page:
 *      group/<guid>/requests
 *
 * @return mixdata;
 * @access private
 */
function group_requests_page($hook, $type, $return, $params)
{
    $page = $params['subpage'];
    $group = ossn_get_group_by_guid(ossn_get_page_owner_guid());
    if ($page == 'requests') {
        if ($group->owner_guid !== ossn_loggedin_user()->guid) {
            redirect("group/{$group->guid}");
        }
        $mod_content = ossn_plugin_view('groups/pages/requests', array('group' => $group));
        $mod = array('title' => ossn_print('requests'), 'content' => $mod_content);
        echo ossn_set_page_layout('module', $mod);
    }
}
开发者ID:emnaborgi,项目名称:RS,代码行数:22,代码来源:ossn_com.php


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