本文整理汇总了PHP中osc_plugin_folder函数的典型用法代码示例。如果您正苦于以下问题:PHP osc_plugin_folder函数的具体用法?PHP osc_plugin_folder怎么用?PHP osc_plugin_folder使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了osc_plugin_folder函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: popular_ads_admin_help
function popular_ads_admin_help()
{
echo '<h3><a href="#">Popular Ads</a></h3>
<ul>
<li><a href="' . osc_admin_render_plugin_url(osc_plugin_folder(__FILE__) . 'admin_config.php') . '">» ' . __('Configure', 'Popular Ads') . '</a><li>
</ul>';
}
示例2: feed_admin_menu
function feed_admin_menu()
{
echo '<h3><a href="#">Extra Feeds help</a></h3>
<ul>
<li><a href="' . osc_admin_render_plugin_url(osc_plugin_folder(__FILE__) . 'conf.php') . '">» ' . __('Help', 'extra_feeds') . '</a></li>
</ul>';
}
示例3: button
public static function button($amount = '0.00', $description = '', $itemnumber = '101', $extra_array = null)
{
$extra = payment_prepare_custom($extra_array);
$extra .= 'concept,' . $description . '|';
$extra .= 'product,' . $itemnumber . '|';
$r = rand(0, 1000);
$extra .= 'random,' . $r;
echo '<li class="payment coinjar-btn"><a href="javascript:coinjar_pay(\'' . $amount . '\',\'' . $description . '\',\'' . $itemnumber . '\',\'' . $extra . '\');" ><img src="' . osc_base_url() . 'oc-content/plugins/' . osc_plugin_folder(__FILE__) . 'payment.png" ></a></li>';
}
示例4: button
/**
* Create and print a "Pay with Paypal" button
*
* @param float $amount
* @param string $description
* @param string $itemnumber (publish fee, premium, pack and which category)
* @param string $extra custom variables
*/
public static function button($amount = '0.00', $description = '', $itemnumber = '101', $extra_array = null)
{
if (osc_get_preference('currency', 'payment') != 'BTC') {
$amount = osc_file_get_contents("https://blockchain.info/tobtc?currency=" . osc_get_preference('currency', 'payment') . "&value=" . $amount);
}
$extra = payment_prepare_custom($extra_array);
$extra .= 'concept,' . $description . '|';
$extra .= 'product,' . $itemnumber . '|';
$r = rand(0, 1000);
$extra .= 'random,' . $r;
$CALLBACK_URL = osc_base_url() . 'oc-content/plugins/' . osc_plugin_folder(__FILE__) . 'callback.php?extra=' . $extra;
?>
<li class="payment bitcoin-btn">
<div class="blockchain-btn"
data-address="<?php
echo osc_get_preference('blockchain_btc_address', 'payment');
?>
"
data-anonymous="false"
data-callback="<?php
echo $CALLBACK_URL;
?>
">
<div class="blockchain stage-begin">
<img src="<?php
echo osc_base_url() . 'oc-content/plugins/' . osc_plugin_folder(__FILE__);
?>
pay_now_64.png">
</div>
<div class="blockchain stage-loading" style="text-align:center">
<img src="<?php
echo osc_base_url() . 'oc-content/plugins/' . osc_plugin_folder(__FILE__);
?>
loading-large.gif">
</div>
<div class="blockchain stage-ready">
<p align="center"><?php
printf(__('Please send %f BTC to <br /> <b>[[address]]</b></p>', 'payment'), $amount);
?>
<p align="center" class="qr-code"></p>
</div>
<div class="blockchain stage-paid">
<?php
_e('Payment Received <b>[[value]] BTC</b>. Thank You.', 'payment');
?>
</div>
<div class="blockchain stage-error">
<span color="red">[[error]]</span>
</div>
</div>
</li>
<?php
}
示例5: button
public static function button($amount = '0.00', $description = '', $itemnumber = '101', $extra_array = null)
{
$extra = payment_prepare_custom($extra_array);
$r = rand(0, 1000);
$extra .= 'random,' . $r;
$apcs = self::customToAPC($extra);
$RETURNURL = osc_base_url() . 'oc-content/plugins/' . osc_plugin_folder(__FILE__) . 'return.php?extra=' . $extra;
$CANCELURL = osc_base_url() . 'oc-content/plugins/' . osc_plugin_folder(__FILE__) . 'cancel.php?extra=' . $extra;
?>
<form method="post" action="https://secure.payza.com/checkout" >
<input type="hidden" name="ap_merchant" value="seller_1_desteban@osclass.org"/>
<input type="hidden" name="ap_purchasetype" value="service"/>
<input type="hidden" name="ap_itemname" value="<?php
echo $description;
?>
"/>
<input type="hidden" name="ap_amount" value="<?php
echo $amount;
?>
"/>
<input type="hidden" name="ap_currency" value="<?php
echo osc_get_preference('currency', 'payment');
?>
"/>
<input type="hidden" name="ap_quantity" value="1"/>
<input type="hidden" name="ap_itemcode" value="<?php
echo $itemnumber;
?>
"/>
<input type="hidden" name="ap_description" value="Audio equipment"/>
<input type="hidden" name="ap_returnurl" value="<?php
echo $RETURNURL;
?>
"/>
<input type="hidden" name="ap_cancelurl" value="<?php
echo $CANCELURL;
?>
"/>
<?php
foreach ($apcs as $k => $v) {
echo '<input type="hidden" name="apc_' . $k . '" value="' . $v . '"/>';
}
?>
<input type="image" src="<?php
echo osc_base_url() . 'oc-content/plugins/' . osc_plugin_folder(__FILE__);
?>
payza-buy-now.png"/>
</form>
<?php
}
示例6: qrcode_admin_menu
function qrcode_admin_menu()
{
if (osc_version() < 320) {
echo '<h3><a href="#">QR Code</a></h3>
<ul>
<li><a href="' . osc_admin_render_plugin_url(osc_plugin_folder(__FILE__) . 'conf.php') . '">» ' . __('Settings', 'qrcode') . '</a></li>
<li><a href="' . osc_admin_render_plugin_url(osc_plugin_folder(__FILE__) . 'help.php') . '">» ' . __('Help', 'qrcode') . '</a></li>
</ul>';
} else {
osc_add_admin_submenu_divider('plugins', 'QR Codes', 'qrcode_divider', 'administrator');
osc_add_admin_submenu_page('plugins', __('QR Settings', 'qrcode'), osc_admin_render_plugin_url(osc_plugin_folder(__FILE__) . 'conf.php'), 'qrcode_settings', 'administrator');
osc_add_admin_submenu_page('plugins', __('QR Help', 'qrcode'), osc_admin_render_plugin_url(osc_plugin_folder(__FILE__) . 'help.php'), 'qrcode_help', 'administrator');
}
}
示例7: digitalgoods_admin_menu
function digitalgoods_admin_menu()
{
if (osc_version() < 320) {
echo '<h3><a href="#">Digital Goods</a></h3>
<ul>
<li><a href="' . osc_admin_render_plugin_url(osc_plugin_folder(__FILE__) . 'admin/conf.php') . '">» ' . __('Settings', 'digitalgoods') . '</a></li>
<li><a href="' . osc_admin_configure_plugin_url("digitalgoods/index.php") . '">» ' . __('Configure categories', 'digitalgoods') . '</a></li>
<li><a href="' . osc_admin_render_plugin_url(osc_plugin_folder(__FILE__) . 'admin/stats.php') . '">» ' . __('Stats', 'digitalgoods') . '</a></li>
</ul>';
} else {
osc_add_admin_submenu_divider('plugins', 'Digital Goods', 'digitalgoods_divider', 'administrator');
osc_add_admin_submenu_page('plugins', __('Settings', 'digitalgoods'), osc_route_admin_url('digitalgoods-admin-conf'), 'digitalgoods_settings', 'administrator');
osc_add_admin_submenu_page('plugins', __('Configure categories', 'digitalgoods'), osc_admin_configure_plugin_url("digitalgoods/index.php"), 'digitalgoods_categories', 'administrator');
osc_add_admin_submenu_page('plugins', __('File stats', 'digitalgoods'), osc_route_admin_url('digitalgoods-admin-stats'), 'digitalgoods_stats', 'administrator');
}
}
示例8: payment_load_lib
/**
* Load payment's js library
*/
function payment_load_lib()
{
if (Params::getParam('page') == 'custom') {
osc_enqueue_style('payment-plugin', osc_base_url() . 'oc-content/plugins/' . osc_plugin_folder(__FILE__) . 'style.css');
if (osc_get_preference('paypal_enabled', 'payment') == 1) {
osc_register_script('paypal', 'https://www.paypalobjects.com/js/external/dg.js', array('jquery'));
osc_enqueue_script('paypal');
}
if (osc_get_preference('blockchain_enabled', 'payment') == 1) {
osc_register_script('blockchain', 'https://blockchain.info/Resources/wallet/pay-now-button.js', array('jquery'));
osc_enqueue_script('blockchain');
}
if (osc_get_preference('stripe_enabled', 'payment') == 1) {
osc_register_script('stripe', 'https://checkout.stripe.com/v2/checkout.js', array('jquery'));
osc_enqueue_script('stripe');
}
}
}
示例9: seo_init_admin
function seo_init_admin()
{
//scripts
osc_enqueue_style('seoCSS', osc_plugin_url(SEO_PLUGIN_FOLDER . '/css/style.css') . 'style.css');
//admin menu pages
osc_add_admin_menu_page(__('SEO Wiz', SEO_PLUGIN_FOLDER), osc_admin_render_plugin_url(osc_plugin_folder(__FILE__) . 'configure.php'), 'seo_dashboard');
osc_add_admin_submenu_page('seo_dashboard', __('Configure Plugin', SEO_PLUGIN_FOLDER), osc_admin_render_plugin_url(osc_plugin_folder(__FILE__) . 'configure.php'), 'configure');
osc_add_admin_submenu_page('seo_dashboard', __('Titles & Metas', SEO_PLUGIN_FOLDER), osc_admin_render_plugin_url(osc_plugin_folder(__FILE__) . 'titles_metas.php'), 'titles_metas');
//form actions
switch (Params::getParam('seo_action')) {
//configure page
case 'seo_configure':
$page_title_separator = Params::getParam('page_title_separator', false, false, false);
osc_set_preference('page_title_separator', $page_title_separator, 'seo_plugin');
osc_add_flash_ok_message(__('Saved correctly', SEO_PLUGIN_FOLDER), 'admin');
osc_redirect_to(osc_admin_render_plugin_url(osc_plugin_folder(__FILE__) . 'configure.php'));
break;
//titles_metas_home
//titles_metas_home
case 'titles_metas_home':
$seo_titles = Params::getParam('seo_titles');
if (!empty($seo_titles)) {
foreach ($seo_titles as $key => $value) {
osc_set_preference($key, trim($value), 'seo_plugin');
}
}
osc_add_flash_ok_message(__('Saved correctly', SEO_PLUGIN_FOLDER), 'admin');
osc_redirect_to(osc_admin_render_plugin_url(osc_plugin_folder(__FILE__) . 'titles_metas.php#home'));
break;
//titles_metas_pages
//titles_metas_pages
case 'titles_metas_pages':
$seo_titles = Params::getParam('seo_titles');
if (!empty($seo_titles)) {
foreach ($seo_titles as $key => $value) {
osc_set_preference($key, trim($value), 'seo_plugin');
}
}
osc_add_flash_ok_message(__('Saved correctly', SEO_PLUGIN_FOLDER), 'admin');
osc_redirect_to(osc_admin_render_plugin_url(osc_plugin_folder(__FILE__) . 'titles_metas.php#pages'));
break;
}
}
示例10: cookie_menu
});
</script>
<?php
}
function cookie_menu()
{
osc_admin_menu_plugins('Cookies settings', osc_route_admin_url('cookie-conf'), 'cookie-conf');
}
function cookie_install()
{
osc_set_preference('analytics_msg', 'We use cookies, just to track visits to our website, we store no personal details.', 'cookie', 'STRING');
osc_set_preference('non_analytics_msg', 'We use cookies on this website, you can <a href="{{cookiePolicyLink}}" title="read about our cookies">read about them here</a>. To use the website as intended please...', 'cookie', 'STRING');
osc_set_preference('analytics_id', '', 'cookie', 'STRING');
osc_set_preference('policy_link', osc_base_url(), 'cookie', 'STRING');
osc_set_preference('what_are_link', 'http://www.allaboutcookies.org/', 'cookie', 'STRING');
osc_set_preference('domain', '', 'cookie', 'STRING');
osc_set_preference('accept', 1, 'cookie', 'BOOLEAN');
osc_set_preference('decline', 1, 'cookie', 'BOOLEAN');
osc_set_preference('reset', 0, 'cookie', 'BOOLEAN');
}
function cookie_uninstall()
{
Preference::newInstance()->delete(array('s_section' => 'cookie'));
}
osc_add_route('cookie-conf', 'cookie/conf', 'cookie/conf', osc_plugin_folder(__FILE__) . 'admin/conf.php');
osc_register_plugin(osc_plugin_path(__FILE__), 'cookie_install');
osc_add_hook(osc_plugin_path(__FILE__) . "_uninstall", 'cookie_uninstall');
if (OC_ADMIN != 1) {
osc_add_hook('header', 'cookie_load', 10);
}
osc_add_hook('admin_menu_init', 'cookie_menu');
示例11: osc_admin_base_url
</button>
</div>
</fieldset>
</form>
<div class="clear"></div>
<br /><br />
<form name="promo_form" id="promo_form" action="<?php
echo osc_admin_base_url(true);
?>
" method="POST" enctype="multipart/form-data" >
<input type="hidden" name="page" value="plugins" />
<input type="hidden" name="action" value="renderplugin" />
<input type="hidden" name="file" value="<?php
echo osc_plugin_folder(__FILE__);
?>
links.php" />
<input type="hidden" name="plugin_action" value="rec_link" />
<input type="hidden" name="link_rec_add_update" id="link_rec_add_update" value="" />
<fieldset class="round3">
<legend class="orange round2"><?php
_e('Reciprocal links Management', 'all_in_one');
?>
</legend>
<div class="title"><i class="fa fa-pencil"></i> <?php
_e('Add new reciprocal link', 'all_in_one');
?>
</div>
示例12: osc_format_date
<?php
$user = User::newInstance()->findByPrimaryKey($recipPM['recip_id']);
?>
<td class="pmCheckboxes"><input class="delChecks" type="checkbox" id="delete<?php
echo $recipPM['pm_id'];
?>
" name="pms[]" value="<?php
echo $recipPM['pm_id'];
?>
" /></td>
<td><?php
echo osc_format_date($recipPM['message_date']) . ', ' . osclass_pm_format_time($recipPM['message_date']);
?>
</td>
<td><a class="mesLink" href="<?php
echo osc_render_file_url(osc_plugin_folder(__FILE__) . 'user-messages.php?message=' . $recipPM['pm_id'] . '&box=outbox');
?>
"><?php
echo $recipPM['pm_subject'];
?>
</a></td>
<td><?php
echo $user['s_name'];
?>
</td>
</tr>
<?php
}
?>
<?php
}
示例13: moreedit_admin_menu
function moreedit_admin_menu()
{
echo '<h3><a href="#">More Edit Options</a></h3>
<ul>
<li><a href="' . osc_admin_render_plugin_url(osc_plugin_folder(__FILE__) . 'admin/conf.php') . '">» ' . __('More Options', 'moreedit') . '</a></li>
</ul>';
}
示例14: xml_import_export_category_admin_menu
function xml_import_export_category_admin_menu()
{
osc_add_admin_submenu_page('plugins', __('XML Import Export Category', 'xml_import_export_category'), osc_admin_render_plugin_url(osc_plugin_folder(__FILE__) . "functions.php"), 'xml_import_export_category', 'moderator');
}
示例15: delete_dg_file
function delete_dg_file(id, item_id,name, secret) {
var result = confirm('<?php
echo __('This action can\\\'t be undone. Are you sure you want to continue?', 'digitalgoods');
?>
');
if(result) {
$.ajax({
type: "POST",
<?php
if (osc_version() < 320) {
?>
url: '<?php
echo osc_base_url(true);
?>
?page=ajax&action=custom&ajaxfile=<?php
echo osc_plugin_folder(__FILE__) . 'ajax.php';
?>
&id='+id+'&item='+item_id+'&code='+name+'&secret='+secret,
<?php
} else {
?>
url: '<?php
echo osc_route_ajax_url('digitalgoods-ajax');
?>
&id='+id+'&item='+item_id+'&code='+name+'&secret='+secret,
<?php
}
?>
dataType: 'json',
success: function(data){
var class_type = "error";