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


PHP ossn_plugin_view函数代码示例

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


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

示例1: ossn_js_page_handler

function ossn_js_page_handler($pages)
{
    switch ($pages[0]) {
        case 'boot':
            if (!ossn_isLoggedIn()) {
                ossn_error_page();
            }
            if (isset($pages[1]) && $pages[1] == 'ossn.boot.chat.js') {
                header('Content-Type: application/javascript');
                echo ossn_plugin_view('js/OssnChat.Boot');
            }
            break;
        case 'selectfriend':
            $user = input('user');
            if (!empty($user)) {
                $user = ossn_user_by_guid($user);
                OssnChat::setUserChatSession($user);
                $friend['user'] = $user;
                echo ossn_plugin_view('chat/selectfriend', $friend);
            }
            break;
        default:
            ossn_error_page();
            break;
    }
}
开发者ID:nongdanit-nongdanit,项目名称:ossn,代码行数:26,代码来源:ossn_com.php

示例2: 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

示例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_plugin_view('invites/pages/invite');
    $content = ossn_set_page_layout('newsfeed', $contents);
    echo ossn_view_page($title, $content);
}
开发者ID:nongdanit-nongdanit,项目名称:ossn,代码行数:18,代码来源:ossn_com.php

示例5: 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

示例6: ossn_comment_view

/**
 * Comment view
 * 
 * @param array $vars Options
 * @param string $template Template name
 * @return mixed data
 */
function ossn_comment_view($params, $template = 'comment')
{
    $vars = ossn_call_hook('comment:view', 'template:params', $params, $params);
    return ossn_plugin_view("comments/templates/{$template}", $vars);
}
开发者ID:emnaborgi,项目名称:RS,代码行数:12,代码来源:ossn_com.php

示例7: ossn_plugin_view

<?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
 */
?>
<div class="ossn-layout-admin">
	<?php 
echo ossn_plugin_view('theme/page/elements/system_messages', array('admin' => true));
?>
    
	<div class="row">
    	<div class="col-md-12 contents">
    	 	<?php 
echo $params['contents'];
?>
    	</div>
	</div>
</div>    
开发者ID:atlantidaformacion,项目名称:nestheme,代码行数:25,代码来源:login.php

示例8: ossn_wall_templates

/**
 * Wall template view 
 * Depends on wall post type
 *
 * @param string $callback Name of callback
 * @param string $type Callback type
 * @param array $params Arrays or Objects
 *
 * @return mixed data
 * @access private
 */
function ossn_wall_templates($hook, $type, $return, $params)
{
    $params = ossn_call_hook('wall', 'templates:item', $params, $params);
    return ossn_plugin_view("wall/templates/wall/{$type}/item", $params);
}
开发者ID:sthefanysoares,项目名称:Social-Network,代码行数:16,代码来源:ossn_com.php

示例9: ossn_print

    <option value="male" <?php 
echo $male;
?>
><?php 
echo ossn_print('male');
?>
 </option>
    <option value="female" <?php 
echo $female;
?>
><?php 
echo ossn_print('female');
?>
</option>
</select>
<label><?php 
echo ossn_print('language');
?>
</label>
<?php 
echo ossn_plugin_view('input/dropdown', array('name' => 'language', 'value' => $user->language, 'options' => ossn_get_installed_translations(false)));
?>
<input type="hidden" value="<?php 
echo $user->username;
?>
" name="username"/>
<input type="submit" class="ossn-button ossn-button-submit" value="<?php 
echo ossn_print('save');
?>
"/>
开发者ID:sthefanysoares,项目名称:Social-Network,代码行数:30,代码来源:edit.php

示例10: ossn_site_url

                <div class="ossn-topbar-dropdown-menu">
                    <label class="ossn-topbar-dropdown-menu-button"><span class="arrow"></span></label>
                    <ul class="ossn-topbar-dropdown-menu-content">
                        <li>
                            <a href="<?php 
    echo ossn_site_url("u/" . ossn_loggedin_user()->username . "/edit");
    ?>
"><?php 
    echo ossn_print('acount:settings');
    ?>
</a>
                        </li>
                        <li>
                          <?php 
    echo ossn_plugin_view('output/url', array('href' => ossn_site_url('action/user/logout'), 'text' => ossn_print('logout'), 'action' => true));
    ?>
                        </li>
                    </ul>

                </div>
            </div>
<!-- notification box -->
        <div class="ossn-notifications-box" style="height: 140px;">
            <div class="selected"></div>
            <div class="type-name"> <?php 
    echo ossn_print('notifications');
    ?>
 </div>
            <div class="metadata">
                <div style="height: 66px;">
开发者ID:emnaborgi,项目名称:RS,代码行数:30,代码来源:page.php

示例11: foreach

    $posts = $wall->getFriendsPosts();
}
if ($posts) {
    foreach ($posts as $post) {
        if (!isset($post->poster_guid)) {
            $post = ossn_get_object($post->guid);
        }
        $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($post->{'file:wallphoto'})) {
            $image = str_replace('ossnwall/images/', '', $post->{'file:wallphoto'});
        } else {
            $image = '';
        }
        $user = ossn_user_by_guid($post->poster_guid);
        if ($post->access == OSSN_FRIENDS) {
            if (ossn_user_is_friend(ossn_loggedin_user()->guid, $post->owner_guid) || ossn_loggedin_user()->guid == $post->owner_guid) {
                echo ossn_plugin_view('wall/templates/activity-item', array('post' => $post, 'friends' => explode(',', $data->friend), 'text' => $text, 'location' => $location, 'user' => $user, 'image' => $image));
            }
        }
        if ($post->access == OSSN_PUBLIC) {
            echo ossn_plugin_view('wall/templates/activity-item', array('post' => $post, 'friends' => explode(',', $data->friend), 'text' => $text, 'location' => $location, 'user' => $user, 'image' => $image));
        }
        unset($data->friend);
    }
}
echo ossn_view_pagination($count);
开发者ID:sthefanysoares,项目名称:Social-Network,代码行数:31,代码来源:siteactivity.php

示例12: ossn_plugin_view

    </script>
</head>

<body>

	<div class="ossn-halt ossn-light"></div>
	<div class="ossn-message-box"></div>
	<div class="ossn-viewer" style="display:none"></div>
    
    <div class="opensource-socalnetwork">
    	<?php 
echo ossn_plugin_view('theme/page/elements/sidebar');
?>
    	 <div class="ossn-page-container">
			  <?php 
echo ossn_plugin_view('theme/page/elements/topbar');
?>
          <div class="ossn-inner-page">    
  	  		  <?php 
echo $contents;
?>
          </div>    
		</div>
    </div>
    <?php 
echo ossn_fetch_extend_views('ossn/page/footer');
?>
           
</body>
</html>
开发者ID:atlantidaformacion,项目名称:nestheme,代码行数:30,代码来源:page.php

示例13: switch

if (empty($settings)) {
    $settings = 'list';
}
switch ($settings) {
    case 'list':
        echo ossn_plugin_view('ads/pages/list');
        break;
    case 'add':
        echo ossn_plugin_view('ads/pages/add');
        break;
    case 'edit':
        $id = input('id');
        if (!empty($id)) {
            $ads = new OssnAds();
            $params['entity'] = $ads->getAd($id);
            echo ossn_plugin_view('ads/pages/edit', $params);
        }
        break;
        //missing 'view' case - 'Browse' didn't work #233
    //missing 'view' case - 'Browse' didn't work #233
    case 'view':
        $id = input('id');
        if (!empty($id)) {
            $ads = new OssnAds();
            $params['entity'] = $ads->getAd($id);
            echo ossn_plugin_view('ads/pages/view', $params);
        }
        break;
    default:
        break;
}
开发者ID:nongdanit-nongdanit,项目名称:ossn,代码行数:31,代码来源:settings.php

示例14: ossn_plugin_view

<?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
 */
echo '<div class="ossn-viewer-comments">';
echo ossn_plugin_view('comments/base', array('entity_guid' => $params['entity_guid']));
echo '</div>';
开发者ID:nongdanit-nongdanit,项目名称:ossn,代码行数:14,代码来源:comments.php

示例15: ossn_call_hook

    <?php 
if (isset($params['subpage']) && !empty($params['subpage']) && ossn_is_profile_subapge($params['subpage'])) {
    if (ossn_is_hook('profile', 'subpage')) {
        echo ossn_call_hook('profile', 'subpage', $params);
    }
} else {
    ?>
        <div class="ossn-profile-modules">
            <?php 
    if (ossn_is_hook('profile', 'modules')) {
        $params['user'] = $user;
        $modules = ossn_call_hook('profile', 'modules', $params);
        echo implode('', $modules);
    }
    ?>

        </div>

        <div class="ossn-profile-wall">
            <?php 
    if (com_is_active('OssnWall')) {
        $params['user'] = $user;
        echo ossn_plugin_view('wall/user/wall', $params);
    }
    ?>
        </div>
    <?php 
}
?>
</div>
开发者ID:emnaborgi,项目名称:RS,代码行数:30,代码来源:profile.php


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