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


PHP osc_plugin_path函数代码示例

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


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

示例1: mdh_emailmagick_bump_me

/**
 * Makes this plugin the first to be loaded.
 * - Bumps this plugin at the top of the active_plugins stack.
 */
function mdh_emailmagick_bump_me()
{
    if (OC_ADMIN) {
        // @legacy : ALWAYS remove this if active.
        if (osc_plugin_is_enabled("madhouse_utils/index.php")) {
            Plugins::deactivate("madhouse_utils/index.php");
        }
        // Sanitize & get the {PLUGIN_NAME}/index.php.
        $path = str_replace(osc_plugins_path(), '', osc_plugin_path(__FILE__));
        if (osc_plugin_is_installed($path)) {
            // Get the active plugins.
            $plugins_list = unserialize(osc_active_plugins());
            if (!is_array($plugins_list)) {
                return false;
            }
            // Remove $path from the active plugins list
            foreach ($plugins_list as $k => $v) {
                if ($v == $path) {
                    unset($plugins_list[$k]);
                }
            }
            // Re-add the $path at the beginning of the active plugins.
            array_unshift($plugins_list, $path);
            // Serialize the new active_plugins list.
            osc_set_preference('active_plugins', serialize($plugins_list));
            if (Params::getParam("page") === "plugins" && Params::getParam("action") === "enable" && Params::getParam("plugin") === $path) {
                //osc_redirect_to(osc_admin_base_url(true) . "?page=plugins");
            } else {
                osc_redirect_to(osc_admin_base_url(true) . "?" . http_build_query(Params::getParamsAsArray("get")));
            }
        }
    }
}
开发者ID:bomvendador,项目名称:soroka_r,代码行数:37,代码来源:index.php

示例2: actions

 public function actions()
 {
     osc_register_plugin(osc_plugin_path(__FILE__), array('DLN_Classified', 'install'));
     // Add admin menu
     //$helper_premium = $this->get_helper( 'DLN_Helper_Premium' );
     //osc_add_hook('admin_menu_init', array( $helper_premium, 'init_admin_menu' ) );
     // Add google map drag n drop
     $helper_google = $this->get_helper('DLN_Helper_Google');
     osc_add_hook('user_form', array($helper_google, 'load_google_map'));
     osc_add_hook('user_edit_completed', array($helper_google, 'insert_google_map'));
     // For users premium
     $helper_premium = $this->get_helper('DLN_Helper_Premium');
     osc_add_hook('admin_users_table', array($helper_premium, 'admin_users_table'));
     osc_add_filter('users_processing_row', array($helper_premium, 'users_processing_row'));
     osc_add_hook('after_admin_html', array($helper_premium, 'users_html_modal'));
 }
开发者ID:httvncoder,项目名称:151722441,代码行数:16,代码来源:index.php

示例3: map_ru_help

function map_ru_help()
{
    osc_admin_render_plugin(osc_plugin_path(dirname(__FILE__)) . '/help.php');
}
开发者ID:bomvendador,项目名称:soroka_r,代码行数:4,代码来源:index.php

示例4: google_analytics_call_after_uninstall

    Preference::newInstance()->insert($fields);
}
function google_analytics_call_after_uninstall()
{
    Preference::newInstance()->delete(array("s_section" => "plugin-google_analytics", "s_name" => "google_analytics_id"));
}
function google_analytics_admin()
{
    osc_admin_render_plugin('google_analytics/admin.php');
}
// HELPER
function osc_google_analytics_id()
{
    return osc_get_preference('google_analytics_id', 'plugin-google_analytics');
}
/**
 * This function is called every time the page footer is being rendered
 */
function google_analytics_footer()
{
    if (osc_google_analytics_id() != '') {
        $id = osc_google_analytics_id();
        require osc_plugins_path() . 'google_analytics/footer.php';
    }
}
// This is needed in order to be able to activate the plugin
osc_register_plugin(osc_plugin_path(__FILE__), 'google_analytics_call_after_install');
// This is a hack to show a Uninstall link at plugins table (you could also use some other hook to show a custom option panel)
osc_add_hook(osc_plugin_path(__FILE__) . "_uninstall", 'google_analytics_call_after_uninstall');
osc_add_hook(osc_plugin_path(__FILE__) . "_configure", 'google_analytics_admin');
osc_add_hook('footer', 'google_analytics_footer');
开发者ID:acharei,项目名称:OSClass,代码行数:31,代码来源:index.php

示例5: breadcrumbs_help

function breadcrumbs_help()
{
    if (osc_version() < 320) {
        osc_admin_render_plugin(osc_plugin_path(dirname(__FILE__)) . '/help.php');
    } else {
        osc_redirect_to(osc_route_admin_url('breadcrumbs-admin-help'));
    }
}
开发者ID:oanav,项目名称:closetshare,代码行数:8,代码来源:index.php

示例6: seo_admin_menu

function seo_admin_menu()
{
    echo '<h3><a href="#" style="font-weight:bold">All in One SEO</a></h3>
<ul> 
  <li><a style="color:blue;font-weight:bold" href="' . osc_admin_render_plugin_url(osc_plugin_path(dirname(__FILE__)) . '/admin/listings.php') . '"><i class="fa fa-angle-right"></i> ' . __('listings', 'all_in_one') . '</a></li>
  <li><a style="color:DarkTurquoise;font-weight:bold" href="' . osc_admin_render_plugin_url(osc_plugin_path(dirname(__FILE__)) . '/admin/categories.php') . '"><i class="fa fa-angle-right"></i> ' . __('categories', 'all_in_one') . '</a></li>
  <li><a style="color:Dred;font-weight:bold" href="' . osc_admin_render_plugin_url(osc_plugin_path(dirname(__FILE__)) . '/admin/locations.php') . '"><i class="fa fa-angle-right"></i> ' . __('locations', 'all_in_one') . '</a></li>
  <li><a style="color:goldenrod;font-weight:bold" href="' . osc_admin_render_plugin_url(osc_plugin_path(dirname(__FILE__)) . '/admin/pages.php') . '"><i class="fa fa-angle-right"></i> ' . __('static pages', 'all_in_one') . '</a></li>
  <li><a style="color:#D86B00;font-weight:bold" href="' . osc_admin_render_plugin_url(osc_plugin_path(dirname(__FILE__)) . '/admin/links.php') . '"><i class="fa fa-angle-right"></i> ' . __('back links', 'all_in_one') . '</a></li>
  <li><a style="color:purple;font-weight:bold" href="' . osc_admin_render_plugin_url(osc_plugin_path(dirname(__FILE__)) . '/admin/generate.php') . '"><i class="fa fa-angle-right"></i> ' . __('sitemap', 'all_in_one') . '</a></li>
  <li><a style="color:green;font-weight:bold" href="' . osc_admin_render_plugin_url(osc_plugin_path(dirname(__FILE__)) . '/admin/htaccess.php') . '"><i class="fa fa-angle-right"></i> ' . __('htaccess', 'all_in_one') . '</a></li>
  <li><a style="color:red;font-weight:bold" href="' . osc_admin_render_plugin_url(osc_plugin_path(dirname(__FILE__)) . '/admin/robots.php') . '"><i class="fa fa-angle-right"></i> ' . __('robots.txt', 'all_in_one') . '</a></li>
  <li><a style="color:DarkRed;font-weight:bold" href="' . osc_admin_render_plugin_url(osc_plugin_path(dirname(__FILE__)) . '/admin/stats.php') . '"><i class="fa fa-angle-right"></i> ' . __('stats', 'all_in_one') . '</a></li>
</ul>';
}
开发者ID:michaelxizhou,项目名称:myeden69-original-backup,代码行数:15,代码来源:index.php

示例7: admanage_config

function admanage_config()
{
    osc_admin_render_plugin(osc_plugin_path(dirname(__FILE__)) . '/admin.php');
}
开发者ID:oanav,项目名称:closetshare,代码行数:4,代码来源:index.php

示例8: popular_ads_end

        }
        global $stored_items;
        $stored_items = View::newInstance()->_get('item');
        //save existing item array
        View::newInstance()->_exportVariableToView('items', $item_array);
    } else {
        echo 'No Results.';
    }
}
function popular_ads_end()
{
    global $stored_items;
    View::newInstance()->_exportVariableToView('items', $stored_items);
    //restore original item array
}
function pop_ad_style()
{
    echo '<link href="' . osc_base_url() . "oc-content/plugins/popular_ads/pop_ads_style.css" . '" rel="stylesheet" type="text/css" />';
}
// This is needed in order to be able to activate the plugin
osc_register_plugin(osc_plugin_path(__FILE__), 'popular_ads_install');
// This is a hack to show a Uninstall link at plugins table (you could also use some other hook to show a custom option panel)
osc_add_hook(osc_plugin_path(__FILE__) . '_uninstall', 'popular_ads_uninstall');
// This is needed in order to be able to activate the plugin
osc_register_plugin(osc_plugin_path(__FILE__), '');
// This is a hack to show a Uninstall link at plugins table (you could also use some other hook to show a custom option panel)
osc_add_hook(osc_plugin_path(__FILE__) . '_uninstall', '');
// Include our style sheet in the header
osc_add_hook('header', 'pop_ad_style');
// Add the Help page to the admin menu
osc_add_hook('admin_menu', 'popular_ads_admin_help');
开发者ID:oanav,项目名称:closetshare,代码行数:31,代码来源:index.php

示例9: anr_call_after_install

function anr_call_after_install()
{
    osc_set_preference('theme', 'light', 'plugin-anr_nocaptcha');
    osc_set_preference('error_message', 'ERROR: Please solve Captcha correctly.', 'plugin-anr_nocaptcha');
}
osc_add_hook(osc_plugin_path(__FILE__) . "_uninstall", 'anr_call_after_uninstall');
function anr_call_after_uninstall()
{
    osc_delete_preference('site_key', 'plugin-anr_nocaptcha');
    osc_delete_preference('secret_key', 'plugin-anr_nocaptcha');
    osc_delete_preference('language', 'plugin-anr_nocaptcha');
    osc_delete_preference('theme', 'plugin-anr_nocaptcha');
    osc_delete_preference('error_message', 'plugin-anr_nocaptcha');
    osc_delete_preference('no_js', 'plugin-anr_nocaptcha');
}
osc_add_hook(osc_plugin_path(__FILE__) . "_configure", 'anr_render_admin');
function anr_render_admin()
{
    osc_admin_render_plugin(osc_plugin_folder(__FILE__) . 'admin/admin.php');
}
// Admin Menu
function anr_admin_menu()
{
    echo '<h3><a href="#">' . __('noCaptcha reCaptcha', 'anr') . '</a></h3>
	<ul>
	<li><a href="' . osc_admin_render_plugin_url(osc_plugin_folder(__FILE__) . 'admin/admin.php') . '">' . '&raquo; ' . __('Settings', 'anr') . '</a><li>
	</ul>';
}
function anr_admin_menu_new()
{
    osc_add_admin_submenu_divider('plugins', 'noCaptcha reCaptcha', 'anr_divider', 'administrator');
开发者ID:bomvendador,项目名称:soroka_r,代码行数:31,代码来源:index.php

示例10: osc_add_route

osc_add_route('payment-pro-admin-pay', 'paymentpro/admin/pay/([0-1]+)/(.+)', 'paymentpro/admin/pay/{pay}/{id}', PAYMENT_PRO_PLUGIN_FOLDER . 'admin/pay.php');
osc_add_route('payment-pro-admin-conf', 'paymentpro/admin/conf', 'paymentpro/admin/conf', PAYMENT_PRO_PLUGIN_FOLDER . 'admin/conf.php');
osc_add_route('payment-pro-admin-prices', 'paymentpro/admin/prices', 'paymentpro/admin/prices', PAYMENT_PRO_PLUGIN_FOLDER . 'admin/conf_prices.php');
osc_add_route('payment-pro-admin-log', 'paymentpro/admin/log', 'paymentpro/admin/log', PAYMENT_PRO_PLUGIN_FOLDER . 'admin/log.php');
osc_add_route('payment-pro-checkout', 'paymentpro/checkout', 'paymentpro/checkout', PAYMENT_PRO_PLUGIN_FOLDER . 'user/checkout.php', false, 'custom', 'custom', __('Checkout', 'payment_pro'));
osc_add_route('payment-pro-cart-delete', 'paymentpro/cart/delete/(.+)', 'paymentpro/cart/delete/{id}', PAYMENT_PRO_PLUGIN_FOLDER . 'user/cart-delete.php');
osc_add_route('payment-pro-addcart', 'paymentpro/cart/add/(.+)', 'paymentpro/cart/add/{item}', PAYMENT_PRO_PLUGIN_FOLDER . 'user/cart-add.php');
osc_add_route('payment-pro-done', 'paymentpro/done/(.*)', 'paymentpro/done/{tx}', PAYMENT_PRO_PLUGIN_FOLDER . 'user/done.php', false, 'custom', 'custom', __('Checkout', 'payment_pro'));
osc_add_route('payment-pro-ajax', 'paymentpro/ajax', 'paymentpro/ajax', PAYMENT_PRO_PLUGIN_FOLDER . 'ajax.php');
osc_add_route('payment-pro-user-menu', 'paymentpro/menu', 'paymentpro/menu', PAYMENT_PRO_PLUGIN_FOLDER . 'user/menu.php', true, 'custom', 'custom', __('Payment status', 'payment_pro'));
/**
 * ADD HOOKS
 */
osc_register_plugin(osc_plugin_path(__FILE__), 'payment_pro_install');
osc_add_hook(osc_plugin_path(__FILE__) . "_configure", 'payment_pro_configure_link');
osc_add_hook(osc_plugin_path(__FILE__) . "_uninstall", 'payment_pro_uninstall');
osc_add_hook('admin_menu_init', 'payment_pro_admin_menu');
osc_add_hook('init', 'payment_pro_admin_title');
osc_add_hook('admin_header', 'payment_pro_admin_page_header');
osc_add_hook('posted_item', 'payment_pro_publish', 8);
osc_add_hook('edited_item', 'payment_pro_edited_item', 8);
osc_add_hook('user_menu', 'payment_pro_user_menu');
osc_add_hook('cron_hourly', 'payment_pro_cron');
osc_add_hook('item_premium_off', 'payment_pro_premium_off');
osc_add_hook('before_item_edit', 'payment_pro_before_edit');
osc_add_hook('show_item', 'payment_pro_show_item');
osc_add_hook('delete_item', 'payment_pro_item_delete');
osc_add_hook('enable_item', 'payment_pro_enable_item');
osc_add_hook('disable_item', 'payment_pro_disable_item');
osc_add_hook('item_form', 'payment_pro_form');
osc_add_hook('item_edit', 'payment_pro_form');
开发者ID:michaelxizhou,项目名称:myeden69-original-backup,代码行数:31,代码来源:index.php

示例11: seo_delete_item

if (!function_exists('seo_delete_item')) {
    function seo_delete_item($itemID)
    {
        $conn = DBConnectionClass::newInstance();
        $c_db = $conn->getOsclassDb();
        $comm = new DBCommandClass($c_db);
        $where = array('fk_i_item_id' => $itemID);
        $comm->delete(SEO_PLUGIN_ITEM_META_TABLE, $where);
    }
}
// when the plugin is installed
osc_register_plugin(osc_plugin_path(__FILE__), 'seo_after_install');
// when the plugin is uninstalled
osc_add_hook(osc_plugin_path(__FILE__) . '_uninstall', 'seo_after_uninstall');
//configure
osc_add_hook(osc_plugin_path(__FILE__) . "_configure", 'seo_configure');
//hooks
osc_add_hook('init_admin', 'seo_init_admin');
if (osc_is_admin_user_logged_in()) {
    osc_add_hook('item_form', 'seo_item_form');
    osc_add_hook('item_edit', 'seo_item_edit');
    osc_add_hook('posted_item', 'seo_posted_item');
    osc_add_hook('edited_item', 'seo_edited_item');
}
osc_add_hook('delete_item', 'seo_delete_item');
//filters
require SEO_PLUGIN_PATH . 'filters.php';
function seo_wiz_menu()
{
    ?>
<style>
开发者ID:syedfiraat4,项目名称:bikade.com,代码行数:31,代码来源:index.php

示例12: osc_register_plugin

                } else {
                    if (preg_match('/youtube\\.com\\/verify_age\\?next_url=\\/watch%3Fv%3D([^\\&\\?\\/]+)/', $url, $id)) {
                        $values = $id[1];
                    } else {
                        // not an youtube video
                    }
                }
            }
        }
    }
    return $values;
}
// create the youtube table when the plugin is installed
osc_register_plugin(osc_plugin_path(__FILE__), 'youtube_call_after_install');
// drop youtube table when the plugin is uninstalled
osc_add_hook(osc_plugin_path(__FILE__) . '_uninstall', 'youtube_call_after_uninstall');
// update
osc_add_hook('init', 'youtube_update');
// show field in item post layout
osc_add_hook('item_form', 'youtube_form');
// insert youtube string
osc_add_hook('posted_item', 'youtube_form_post');
// show video in item detail layout
osc_add_hook('item_detail', 'youtube_item_detail');
// show field in item edit layout
osc_add_hook('item_edit', 'youtube_item_edit');
// update youtube string after edit POST
osc_add_hook('edited_item', 'youtube_item_edit_post');
// delete youtube video of the deleted item
osc_add_hook('delete_item', 'youtube_delete_item');
/* file end: ./youtube/index.php */
开发者ID:michaelxizhou,项目名称:myeden69-original-backup,代码行数:31,代码来源:index.php

示例13: osc_add_hook

    ModelContactCounter::newInstance()->insertItemStat($item['pk_i_id']);
}
osc_add_hook('hook_email_item_inquiry', 'contact_counter_increase');
function contact_counter_increase($item)
{
    ModelContactCounter::newInstance()->increaseItemStat($item['id']);
}
osc_register_plugin(osc_plugin_path(__FILE__), 'contact_counter_install');
function contact_counter_install()
{
    // create table structure
    ModelContactCounter::newInstance()->import("contact_counter/struct.sql");
    // initialize stats
    ModelContactCounter::newInstance()->init();
}
osc_add_hook(osc_plugin_path(__FILE__) . "_uninstall", 'contact_counter_uninstall');
function contact_counter_uninstall()
{
    // remove table structure
    ModelContactCounter::newInstance()->uninstall();
}
// add link to item contact stats page / manage listing, under more actions link
function contact_counter_more_actions_link($options_more, $aRow)
{
    // get number of contact by listing
    $num_contacts = ModelContactCounter::newInstance()->getTotalContactsByItemId($aRow['pk_i_id']);
    $aux = $options_more;
    $aux[] = '<a href="' . osc_route_admin_url('stats-contact-counter', array('id' => $aRow['pk_i_id'])) . '">' . sprintf(__('<b>%s</b> contacts +'), $num_contacts) . '</a>';
    return $aux;
}
osc_add_hook('actions_manage_items', 'contact_counter_more_actions_link');
开发者ID:syedfiraat4,项目名称:bikade.com,代码行数:31,代码来源:index.php

示例14: logbee_header

function logbee_header()
{
    $location = Rewrite::newInstance()->get_location();
    $section = Rewrite::newInstance()->get_section();
    if ($location == 'item' && $section == '') {
        echo '
<style type="text/css">
  .logbee ul { margin: 10px 0; list-style: none; }
  .logbee ul li { float: left; }
  .logbee .clear { clear:both; }
</style>';
        // meta-tags
        $address_array = array();
        if (osc_item_address() != "") {
            $address_array[] = osc_item_address();
        }
        if (osc_item_city_area() != "") {
            $address_array[] = osc_item_city_area();
        }
        if (osc_item_zip() != "") {
            $address_array[] = osc_item_zip();
        }
        if (osc_item_city() != "") {
            $address_array[] = osc_item_city();
        }
        if (osc_item_region() != "") {
            $address_array[] = osc_item_region();
        }
        if (osc_item_country() != "") {
            $address_array[] = osc_item_country();
        }
        $address = implode(", ", $address_array);
        $price = '';
        if (osc_item_formated_price() != "") {
            $price = osc_item_formated_price();
        }
        $email = '';
        if (osc_item_show_email()) {
            $email = osc_item_contact_email();
        }
        echo '
 <meta property="logbee:title" content="' . osc_esc_html(osc_item_title()) . '"/>
 <meta property="logbee:url"   content="' . osc_esc_html(osc_item_url()) . '"/>
 <meta property="logbee:desc"  content="' . osc_esc_html(osc_item_description()) . '"/>
 <meta property="logbee:addr"  content="' . osc_esc_html($address) . '"/>
 <meta property="logbee:email" content="' . osc_esc_html($email) . '"/>
 <meta property="logbee:price" content="' . osc_esc_html($price) . '"/>';
        // do we have the cars_plugin enabled?
        if (osc_plugin_is_enabled('cars_attributes/index.php')) {
            require_once osc_plugin_path('') . '/cars_attributes/ModelCars.php';
            if (osc_is_this_category('cars_plugin', osc_item_category_id())) {
                $detail = ModelCars::newInstance()->getCarAttr(osc_item_id());
                echo '
 <meta property="logbee:type" content="car"/>
 <meta property="logbee:mileage" content="' . osc_esc_html(@$detail['i_mileage']) . '"/>
 <meta property="logbee:firstreg" content="' . osc_esc_html(@$detail['i_year']) . '"/>';
            }
        }
        // do we have the realestate_plugin enabled?
        if (osc_plugin_is_enabled('realestate_attributes/index.php')) {
            require_once osc_plugin_path('') . '/realestate_attributes/ModelRealEstate.php';
            if (osc_is_this_category('realestate_plugin', osc_item_category_id())) {
                $detail = ModelRealEstate::newInstance()->getAttributes(osc_item_id());
                echo '
 <meta property="logbee:type" content="realty"/>
 <meta property="logbee:rooms" content="' . osc_esc_html(@$detail['i_num_rooms']) . '"/>
 <meta property="logbee:size" content="' . osc_esc_html(@$detail['s_square_meters']) . ' sqm"/>';
            }
        }
        // images
        osc_reset_resources();
        $images_array = array();
        for ($i = 0; osc_has_item_resources(); $i++) {
            $images_array[] = osc_esc_html(osc_resource_url());
        }
        $images = implode("|", $images_array);
        echo '
 <meta property="logbee:imgurl" content="' . $images . '"/>
 ';
        osc_reset_resources();
        echo "\n";
    }
}
开发者ID:bomvendador,项目名称:soroka_r,代码行数:83,代码来源:index.php

示例15: watchlist_help

function watchlist_help()
{
    osc_admin_render_plugin(osc_plugin_path(dirname(__FILE__)) . '/help.php');
}
开发者ID:oanav,项目名称:closetshare,代码行数:4,代码来源:index.php


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