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


PHP ossn_route函数代码示例

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


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

示例1: ossn_register_plugins_by_path

/**
 * Register a plugins by path
 * This will help us to override components files easily.
 * 
 * @param string $path A valid path;
 * @return boolean
 */
function ossn_register_plugins_by_path($path)
{
    global $Ossn;
    if (ossn_site_settings('cache') == 1) {
        return false;
    }
    $type = 'default';
    $type = ossn_call_hook('plugins', 'type', false, $type);
    $path = $path . $type . '/';
    if (!is_dir($path)) {
        //disable error log, will cause a huge log file
        //error_log("Ossn tried to register invalid plugins by path: {$path}");
        return false;
    }
    $path = str_replace("\\", "/", $path);
    $directory = new RecursiveDirectoryIterator($path, RecursiveDirectoryIterator::SKIP_DOTS);
    $iterator = new RecursiveIteratorIterator($directory);
    if ($iterator) {
        foreach ($iterator as $file) {
            if (pathinfo($file, PATHINFO_EXTENSION) == "php") {
                $file = str_replace("\\", "/", $file);
                $location = str_replace(dirname(__FILE__) . '/plugins/', '', $file);
                $name = str_replace($path, '', $location);
                $name = substr($name, 0, -4);
                $fpath = substr($file, 0, -4);
                $fpath = str_replace(array($name, ossn_route()->www), '', $fpath);
                $Ossn->plugins[$name] = $fpath;
            }
        }
    }
    return true;
}
开发者ID:sthefanysoares,项目名称:Social-Network,代码行数:39,代码来源:ossn.lib.plugins.php

示例2: ossn_disable_cache

function ossn_disable_cache()
{
    $database = new OssnDatabase();
    $params['table'] = 'siteayarlari';
    $params['names'] = array('value');
    $params['values'] = array(0);
    $params['wheres'] = array("setting_id='4'");
    if ($database->update($params)) {
        OssnFile::DeleteDir(ossn_route()->cache);
        return true;
    }
    return false;
}
开发者ID:alibasli,项目名称:Social-Network-PHP-Joomla,代码行数:13,代码来源:ossn.lib.cache.php

示例3: ossn_admin

/**
 * Initialize the admin library
 *
 * @return void
 */
function ossn_admin()
{
    ossn_register_admin_sidemenu('admin/sidemenu', 'admin:components', ossn_site_url('administrator/components'), ossn_print('admin:sidemenu:components'));
    ossn_register_admin_sidemenu('admin/sidemenu', 'admin:install', ossn_site_url('administrator/com_installer'), ossn_print('admin:sidemenu:components'));
    ossn_register_admin_sidemenu('admin/sidemenu', 'admin:themes', ossn_site_url('administrator/themes'), ossn_print('admin:sidemenu:themes'));
    ossn_register_admin_sidemenu('admin/sidemenu', 'admin:install', ossn_site_url('administrator/theme_installer'), ossn_print('admin:sidemenu:themes'));
    ossn_register_admin_sidemenu('admin/sidemenu', 'admin:basic', ossn_site_url('administrator/settings/basic'), ossn_print('admin:sidemenu:settings'));
    ossn_register_admin_sidemenu('admin/sidemenu', 'admin:cache', ossn_site_url('administrator/cache'), ossn_print('admin:sidemenu:settings'));
    //ossn_register_admin_sidemenu('admin/sidemenu', 'admin:mode', ossn_site_url('administrator/theme_installer'), ossn_print('admin:sidemenu:settings'));
    ossn_register_admin_sidemenu('admin/sidemenu', 'admin:users', ossn_site_url('administrator/users'), ossn_print('admin:sidemenu:usermanager'));
    ossn_register_admin_sidemenu('admin/sidemenu', 'admin:add:user', ossn_site_url('administrator/adduser'), ossn_print('admin:sidemenu:usermanager'));
    ossn_register_admin_sidemenu('admin/sidemenu', 'admin:users:unvalidated', ossn_site_url('administrator/unvalidated_users'), ossn_print('admin:sidemenu:usermanager'));
    ossn_register_menu_link('home', 'admin:dashboard', ossn_site_url('administrator'), 'topbar_admin');
    ossn_register_menu_link('configure', 'Configure', '#', 'topbar_admin');
    ossn_register_menu_link('help', 'admin:help', 'http://community.opensource-socialnetwork.org', 'topbar_admin');
    ossn_register_menu_link('support', 'admin:support', 'http://community.opensource-socialnetwork.org', 'topbar_admin');
    ossn_register_menu_link('viewsite', 'admin:view:site', ossn_site_url(), 'topbar_admin');
    ossn_register_action('admin/login', ossn_route()->actions . 'administrator/login.php');
    ossn_register_action('admin/logout', ossn_route()->actions . 'administrator/logout.php');
    if (ossn_isAdminLoggedin()) {
        ossn_register_site_settings_page('account', 'pages/account');
        ossn_register_action('component/enable', ossn_route()->actions . 'administrator/component/enable.php');
        ossn_register_action('component/disable', ossn_route()->actions . 'administrator/component/disable.php');
        ossn_register_action('component/delete', ossn_route()->actions . 'administrator/component/delete.php');
        ossn_register_action('theme/enable', ossn_route()->actions . 'administrator/theme/enable.php');
        ossn_register_action('theme/delete', ossn_route()->actions . 'administrator/theme/delete.php');
        ossn_register_action('admin/add/user', ossn_route()->actions . 'administrator/user/add.php');
        ossn_register_action('admin/edit/user', ossn_route()->actions . 'administrator/user/edit.php');
        ossn_register_action('admin/delete/user', ossn_route()->actions . 'administrator/user/delete.php');
        ossn_register_action('admin/validate/user', ossn_route()->actions . 'administrator/user/validate.php');
        ossn_register_action('admin/com_install', ossn_route()->actions . 'administrator/component/com_install.php');
        ossn_register_action('admin/theme_install', ossn_route()->actions . 'administrator/theme/theme_install.php');
        ossn_register_action('admin/settings/save/basic', ossn_route()->actions . 'administrator/settings/save/basic.php');
        ossn_register_action('admin/cache/create', ossn_route()->actions . 'administrator/cache/create.php');
        ossn_register_action('admin/cache/flush', ossn_route()->actions . 'administrator/cache/flush.php');
    }
    /*
     * Register login and backend pages
     */
    if (ossn_isAdminLoggedin()) {
        ossn_register_page('administrator', 'ossn_administrator_pagehandler');
        ossn_register_site_settings_page('basic', 'settings/admin/basic_settings');
        ossn_register_menu_item('topbar_dropdown', array('name' => 'administration', 'text' => ossn_print('admin'), 'href' => ossn_site_url('administrator')));
    } else {
        ossn_register_page('administrator', 'ossn_administrator_login_pagehandler');
    }
}
开发者ID:nongdanit-nongdanit,项目名称:ossn,代码行数:52,代码来源:ossn.lib.admin.php

示例4: ossn_initialize

function ossn_initialize()
{
    $url = ossn_site_url();
    $icon = ossn_site_url('components/OssnWall/images/news-feed.png');
    ossn_register_sections_menu('newsfeed', array('text' => ossn_print('news:feed'), 'url' => "{$url}home", 'section' => 'links', 'icon' => $icon));
    ossn_extend_view('ossn/js/head', 'javascripts/head');
    //actions
    ossn_register_action('user/login', ossn_route()->actions . 'user/login.php');
    ossn_register_action('user/register', ossn_route()->actions . 'user/register.php');
    ossn_register_action('user/logout', ossn_route()->actions . 'user/logout.php');
    ossn_register_action('friend/add', ossn_route()->actions . 'friend/add.php');
    ossn_register_action('friend/remove', ossn_route()->actions . 'friend/remove.php');
    ossn_register_action('resetpassword', ossn_route()->actions . 'user/resetpassword.php');
    ossn_register_action('resetlogin', ossn_route()->actions . 'user/resetlogin.php');
    ossn_register_page('index', 'ossn_index_pagehandler');
    ossn_register_page('home', 'ossn_user_pagehandler');
    ossn_register_page('login', 'ossn_user_pagehandler');
    ossn_register_page('registered', 'ossn_user_pagehandler');
    ossn_register_page('syserror', 'ossn_system_error_pagehandler');
    ossn_register_page('resetlogin', 'ossn_user_pagehandler');
    ossn_add_hook('newsfeed', "left", 'newfeed_menu_handler');
}
开发者ID:alibasli,项目名称:Social-Network-PHP-Joomla,代码行数:22,代码来源:ossn.lib.initialize.php

示例5: ossn_trigger_upgrades

/**
 * Trigger upgrade / Run upgrade
 *
 * @return void;
 * @access private
 */
function ossn_trigger_upgrades()
{
    if (!ossn_isAdminLoggedin()) {
        ossn_error_page();
    }
    $upgrades = ossn_get_process_upgrade_files();
    if (!is_array($upgrades) || empty($upgrades)) {
        ossn_trigger_message(ossn_print('upgrade:not:available'), 'error', 'admin');
        redirect('administrator');
        return false;
    }
    foreach ($upgrades as $upgrade) {
        $file = ossn_route()->upgrade . "upgrades/{$upgrade}";
        if (!(include_once $file)) {
            throw new exception(ossn_print('upgrade:file:load:error'));
        }
    }
    //need to reset cache files
    if (ossn_site_settings('cache') !== 0) {
        ossn_trigger_css_cache();
        ossn_trigger_js_cache();
    }
    return true;
}
开发者ID:alibasli,项目名称:Social-Network-PHP-Joomla,代码行数:30,代码来源:ossn.lib.upgrade.php

示例6: define

<?php

/**
 * Open Source Social Network
 *
 * @packageOpen 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
 */
define('__OSSN_SEARCH__', ossn_route()->com . 'OssnSearch/');
require_once __OSSN_SEARCH__ . 'classes/OssnSearch.php';
function ossn_search()
{
    ossn_register_page('search', 'ossn_search_page');
    ossn_add_hook('search', "left", 'search_menu_handler');
    ossn_extend_view('css/ossn.default', 'css/search');
}
function search_menu_handler($hook, $type, $return)
{
    $return[] = ossn_view_menu('search');
    return $return;
}
function ossn_search_page($pages)
{
    $page = $pages[0];
    if (empty($page)) {
        $page = 'search';
    }
    ossn_trigger_callback('page', 'load:search');
开发者ID:nongdanit-nongdanit,项目名称:ossn,代码行数:31,代码来源:ossn_com.php

示例7: define

<?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
 */
define('BLOG', ossn_route()->com . 'Blog/');
require_once BLOG . 'classes/Blog.php';
function blog_init()
{
    if (ossn_isLoggedin()) {
        ossn_register_action('blog/add', BLOG . 'actions/add.php');
        ossn_register_action('blog/edit', BLOG . 'actions/edit.php');
        ossn_register_action('blog/delete', BLOG . 'actions/delete.php');
    }
    ossn_register_callback('page', 'load:search', 'ossn_blpg_search_link');
    ossn_register_callback('user', 'delete', 'ossn_user_blog_delete');
}
function ossn_blpg_search_link()
{
    return;
}
function ossn_user_blog_delete()
{
    return;
}
开发者ID:sathish4fri,项目名称:Blog,代码行数:31,代码来源:ossn_com.php

示例8: deletecom

 /**
  * Delete component
  *
  * @return bool;
  */
 public function deletecom($com)
 {
     if (in_array($com, $this->requiredComponents())) {
         return false;
     }
     $this->statement("DELETE FROM ossn_components WHERE(com_id='{$com}');");
     if ($this->execute()) {
         OssnFile::DeleteDir(ossn_route()->com . "{$com}/");
         return true;
     }
     return false;
 }
开发者ID:aidovoga,项目名称:opensource-socialnetwork,代码行数:17,代码来源:OssnComponents.php

示例9: define

<?php

/**
 * Open Source Social Network
 *
 * @packageOpen 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
 */
define('__OSSN_WALL__', ossn_route()->com . 'OssnWall/');
require_once __OSSN_WALL__ . 'classes/OssnWall.php';
/**
 * Initialize Ossn Wall Component
 *
 * @return void
 * @access private
 */
function ossn_wall()
{
    ossn_register_com_panel('OssnWall', 'settings');
    //actions
    if (ossn_isLoggedin()) {
        ossn_register_action('wall/post/a', __OSSN_WALL__ . 'actions/wall/post/home.php');
        ossn_register_action('wall/post/u', __OSSN_WALL__ . 'actions/wall/post/user.php');
        ossn_register_action('wall/post/g', __OSSN_WALL__ . 'actions/wall/post/group.php');
        ossn_register_action('wall/post/delete', __OSSN_WALL__ . 'actions/wall/post/delete.php');
    }
    if (ossn_isAdminLoggedin()) {
        ossn_register_action('wall/admin/settings', __OSSN_WALL__ . 'actions/wall/admin/settings.php');
开发者ID:sthefanysoares,项目名称:Social-Network,代码行数:31,代码来源:ossn_com.php

示例10: delete

 /**
  * Delete component
  *
  * @return boolean
  */
 public function delete($com)
 {
     if (in_array($com, $this->requiredComponents())) {
         return false;
     }
     $params = array();
     $params['from'] = "ossn_components";
     $params['wheres'] = array("com_id='{$com}'");
     if (parent::delete($params)) {
         OssnFile::DeleteDir(ossn_route()->com . "{$com}/");
         return true;
     }
     return false;
 }
开发者ID:emnaborgi,项目名称:RS,代码行数:19,代码来源:OssnComponents.php

示例11: define

<?php

/**
 * Open Source Social Network
 *
 * @packageOpen 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
 */
define('__OSSN_COMMENTS__', ossn_route()->com . 'OssnComments/');
require_once __OSSN_COMMENTS__ . 'classes/OssnComments.php';
require_once __OSSN_COMMENTS__ . 'libs/comments.php';
/**
 * Initialize Comments Component
 *
 * @return void;
 * @access private
 */
function ossn_comments()
{
    if (ossn_isLoggedin()) {
        ossn_register_action('post/comment', __OSSN_COMMENTS__ . 'actions/post/comment.php');
        ossn_register_action('post/entity/comment', __OSSN_COMMENTS__ . 'actions/post/entity/comment.php');
        ossn_register_action('delete/comment', __OSSN_COMMENTS__ . 'actions/comment/delete.php');
    }
    ossn_add_hook('post', 'comments', 'ossn_post_comments');
    ossn_add_hook('post', 'comments:entity', 'ossn_post_comments_entity');
    ossn_register_callback('comment', 'load', 'ossn_comment_menu');
    ossn_extend_view('js/opensource.socialnetwork', 'js/OssnComments');
开发者ID:emnaborgi,项目名称:RS,代码行数:31,代码来源:ossn_com.php

示例12: ossn_system_plugins_load

/**
 * Loads system plugins before we load components.
 *
 * @return void
 */
function ossn_system_plugins_load()
{
    //load system plugins before components load #451
    ossn_register_plugins_by_path(ossn_route()->system . 'plugins/');
}
开发者ID:nongdanit-nongdanit,项目名称:ossn,代码行数:10,代码来源:ossn.lib.initialize.php

示例13: define

<?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
 */
define('__THEMEDIR__', ossn_route()->themes . 'default/');
ossn_new_css('ossn.default', 'themes/default/style/default');
ossn_new_css('ossn.admin.default', 'themes/default/style/administrator');
ossn_load_css('ossn.default');
ossn_load_css('ossn.admin.default', 'admin');
开发者ID:aidovoga,项目名称:opensource-socialnetwork,代码行数:16,代码来源:ossn_theme.php

示例14: define

<?php

/**
 * Open Source Social Network
 *
 * @packageOpen 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
 */
define('__HTML_SIDEBAR__', ossn_route()->com . 'HtmlSidebar/');
/**
 * Home sidebar initlize the component
 * 
 * return void
 */
function html_sidebar()
{
    ossn_add_hook('newsfeed', "sidebar:right", 'html_widget');
    ossn_register_com_panel('HtmlSidebar', 'settings');
    if (ossn_isAdminLoggedin()) {
        ossn_register_action('html/sidebar/save', __HTML_SIDEBAR__ . 'actions/save.php');
    }
}
/**
 * Show a html on sidebar
 * 
 * return array
 */
function html_widget($hook, $tye, $return)
开发者ID:ctlui,项目名称:HtmlSidebar,代码行数:31,代码来源:ossn_com.php

示例15: define

<?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
 */
define('__OSSN_SITE_PAGES__', ossn_route()->com . 'OssnSitePages/');
require_once __OSSN_SITE_PAGES__ . 'classes/OssnSitePages.php';
function ossn_sitepages()
{
    //css
    ossn_extend_view('css/ossn.default', 'components/OssnSitePages/css/pages');
    //register pages
    ossn_register_page('site', 'ossn_site_pages');
    //register admin panel page
    ossn_register_com_panel('OssnSitePages', 'settings');
    //actions
    ossn_register_action('sitepage/edit/terms', __OSSN_SITE_PAGES__ . 'actions/edit/terms.php');
    ossn_register_action('sitepage/edit/about', __OSSN_SITE_PAGES__ . 'actions/edit/about.php');
    ossn_register_action('sitepage/edit/privacy', __OSSN_SITE_PAGES__ . 'actions/edit/privacy.php');
    //register menu links in footer
    ossn_register_menu_link('about', ossn_print('site:about'), ossn_site_url('site/about'), 'footer');
    ossn_register_menu_link('site', ossn_print('site:terms'), ossn_site_url('site/terms'), 'footer');
    ossn_register_menu_link('privacy', ossn_print('site:privacy'), ossn_site_url('site/privacy'), 'footer');
}
function ossn_site_pages($pages)
开发者ID:aidovoga,项目名称:opensource-socialnetwork,代码行数:31,代码来源:ossn_com.php


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