本文整理汇总了PHP中ossn_is_hook函数的典型用法代码示例。如果您正苦于以下问题:PHP ossn_is_hook函数的具体用法?PHP ossn_is_hook怎么用?PHP ossn_is_hook使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ossn_is_hook函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ossn_css_pagehandler
function ossn_css_pagehandler($css)
{
if (ossn_site_settings('cache') == 1) {
return false;
}
header("Content-type: text/css");
$page = $css[0];
if (empty($css[1])) {
echo '404 SWITCH ERROR';
}
if (empty($page)) {
$page = 'view';
}
switch ($page) {
case 'view':
if (ossn_site_settings('cache') == 1) {
return false;
}
if (ossn_is_hook('css', "register")) {
echo ossn_call_hook('css', "register", $css);
}
break;
default:
echo '404 SWITCH ERROR';
break;
}
}
示例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;
}
}
示例3: ossn_css_pagehandler
/**
* Add css page handler
*
* @return false|null
*/
function ossn_css_pagehandler($css)
{
if (ossn_site_settings('cache') == 1) {
return false;
}
header("Content-type: text/css");
$page = $css[0];
if (empty($css[1])) {
header('Content-Type: text/html; charset=utf-8');
ossn_error_page();
}
if (empty($page)) {
$page = 'view';
}
switch ($page) {
case 'view':
if (ossn_site_settings('cache') == 1) {
return false;
}
if (ossn_is_hook('css', "register")) {
echo ossn_call_hook('css', "register", $css);
}
break;
default:
header('Content-Type: text/html; charset=utf-8');
ossn_error_page();
break;
}
}
示例4: ossn_view
/**
* View a file
*
* @param string $file valid file name of php file without extension;
* @param array $params Options;
* @last edit: $arsalanshah
* @return mixed data
*/
function ossn_view($path = '', $params = array())
{
global $VIEW;
if (isset($path) && !empty($path)) {
//call hook in case to over ride the view
if (ossn_is_hook('halt', "view:{$path}")) {
return ossn_call_hook('halt', "view:{$path}", $params);
}
$path = ossn_route()->www . $path;
$file = ossn_include($path . '.php', $params);
return $file;
}
}
示例5: array
* @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
*/
?>
<style> body {
background: #FDFDFD;
} </style>
<div class="ossn-layout-newsfeed">
<div class="ossn-inner">
<div class="coloum-left">
<?php
if (ossn_is_hook('search', "left")) {
$searchleft = ossn_call_hook('search', "left", NULL, array());
echo implode('', $searchleft);
}
?>
</div>
<div class="coloum-middle">
<?php
echo $params['content'];
?>
</div>
<div class="coloum-right">
<div style="padding:12px;min-height:300px;">
<?php
示例6: ossn_site_url
<table border="0" class="ossn-photo-viewer">
<tr>
<td class="image-block" style="text-align: center;width:465px;min-height:200px;">
<img
src="<?php
echo ossn_site_url("album/getcover/") . $image->owner_guid;
?>
/<?php
echo $img;
?>
"/>
</td>
</tr>
</table>
</div>
<br/>
<br/>
<?php
$vars['entity'] = $image;
$vars['full_view'] = true;
echo ossn_plugin_view('entity/comment/like/share/view', $params);
?>
<div class="ossn-photo-view-controls">
<?php
if (ossn_is_hook('cover:view', 'profile:controls')) {
echo ossn_call_hook('cover:view', 'profile:controls', $image);
}
?>
</div>
示例7: ossn_view_form
<?php
if (!ossn_isLoggedin()) {
return;
}
?>
<div class="sidebar">
<div class="sidebar-contents">
<?php
if (ossn_is_hook('newsfeed', "sidebar:left")) {
$newsfeed_left = ossn_call_hook('newsfeed', "sidebar:left", NULL, array());
echo implode('', $newsfeed_left);
}
echo ossn_view_form('search', array('component' => 'OssnSearch', 'class' => 'ossn-search', 'autocomplete' => 'off', 'method' => 'get', 'security_tokens' => false, 'action' => ossn_site_url("search")), false);
?>
</div>
</div>
示例8: ossn_wall_view_template
/**
* View wall post view template
*
* @param array $params Options
*
* @return mixed data
* @access private
*/
function ossn_wall_view_template(array $params)
{
$type = $params['post']->type;
if (isset($params['post']->item_type)) {
$type = $params['post']->item_type;
}
if (ossn_is_hook('wall:template', $type)) {
return ossn_call_hook('wall:template', $type, $params);
}
return false;
}
示例9: ossn_plugin_view
if (com_is_active('OssnAds')) {
echo ossn_plugin_view('ads/page/view_small');
}
?>
</div>
<div class="ossn-profile-bottom">
<?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);
}
?>
示例10: array
* 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
*/
?>
<style> body { background:#e9eaed; } </style>
<div class="ossn-layout-newsfeed">
<div class="ossn-inner">
<div class="coloum-left">
<?php
if (ossn_is_hook('newsfeed', "left")) {
$newsfeed_left = ossn_call_hook('newsfeed', "left", NULL, array());
echo implode('', $newsfeed_left);
}
?>
</div>
<div class="coloum-middle">
<?php
echo $params['content'];
?>
</div>
<div class="coloum-right">
<div style="padding:12px;min-height:300px;">
<?php
示例11: 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
*/
//unused pagebar skeleton when ads are disabled #628
if (ossn_is_hook('newsfeed', "sidebar:right")) {
$newsfeed_right = ossn_call_hook('newsfeed', "sidebar:right", NULL, array());
$sidebar = implode('', $newsfeed_right);
$isempty = trim($sidebar);
}
?>
<div class="container">
<div class="row">
<?php
echo ossn_plugin_view('theme/page/elements/system_messages');
?>
<div class="ossn-layout-newsfeed">
<div class="col-md-7">
<div class="newsfeed-middle">
<?php
echo $params['content'];
?>
</div>
示例12: ossn_call_hook
?>
?size=view"/>
</td>
</tr>
</table>
</div>
<br/>
<br/>
<div class="comments-likes ossn-photos-comments" style="width:525px;">
<?php
if (ossn_is_hook('post', 'likes:entity')) {
$entity['entity_guid'] = $params['photo'];
echo ossn_call_hook('post', 'likes:entity', $entity);
}
?>
<?php
if (ossn_is_hook('post', 'comments:entity')) {
$entity['entity_guid'] = $params['photo'];
echo ossn_call_hook('post', 'comments:entity', $entity);
}
?>
</div>
<div class="ossn-photo-view-controls">
<?php
if (ossn_is_hook('photo:view', 'album:controls')) {
echo ossn_call_hook('photo:view', 'album:controls', $image);
}
?>
</div>
示例13: get
/**
* Get notifications
*
* @param integer $guid_two User guid
* @param integer $poster_guid Guid of item poster;
*
* @return array
*/
public function get($guid_two, $unread = false)
{
$getunread = '';
if ($unread === true) {
$getunread = "AND viewed IS NULL";
}
$baseurl = ossn_site_url();
$this->statement("SELECT * FROM ossn_notifications WHERE(\n\t\t owner_guid='{$guid_two}' {$getunread}) ORDER by guid DESC");
$this->execute();
$get = $this->fetch(true);
if (!$get) {
return false;
}
foreach ($get as $notif) {
if (ossn_is_hook('notification:view', $notif->type)) {
$messages[] = ossn_call_hook('notification:view', $notif->type, $notif);
}
}
return $messages;
}
示例14: ossn_site_url
</a>
<br/>
<table border="0" class="ossn-photo-viewer">
<tr>
<td class="image-block" style="text-align: center;width:465px;min-height:200px;">
<img
src="<?php
echo ossn_site_url("album/getphoto/") . $image->owner_guid;
?>
/<?php
echo $img;
?>
?type=1"/>
</td>
</tr>
</table>
</div>
<br/>
<br/>
<?php
$vars['entity'] = $image;
echo ossn_plugin_view('entity/comment/like/share/view', $vars);
?>
<div class="ossn-photo-view-controls">
<?php
if (ossn_is_hook('photo:view', 'profile:controls')) {
echo ossn_call_hook('photo:view', 'profile:controls', $image);
}
?>
</div>
示例15:
?>
<div class="activity-item" id="activity-item-<?php
echo $params['post']->guid;
?>
">
<div class="activity-item-container">
<div class="owner">
<img src="<?php
echo $params['user']->iconURL()->small;
?>
" width="40" height="40"/>
</div>
<div class="post-controls">
<?php
if (ossn_is_hook('wall', 'post:menu') && ossn_isLoggedIn()) {
$menu['post'] = $params['post'];
echo ossn_call_hook('wall', 'post:menu', $menu);
}
?>
</div>
<div class="subject">
<?php
if ($params['user']->guid == $params['post']->owner_guid) {
?>
<a class="owner-link"
href="<?php
echo $params['user']->profileURL();
?>
"> <?php