function pop_body_class($echo = true) { /** * Print body classes. * * @param string $echo Optional parameter. * @return print string with all body classes concatenated */ osc_add_filter('pop_bodyClass', 'pop_add_body_class_construct'); $classes = osc_apply_filter('pop_bodyClass', array()); if ($echo && count($classes)) { echo 'class="' . implode(' ', $classes) . '"'; } else { return $classes; } }
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')); }
function fbc_extend_email($user) { $manager = User::newInstance(); $manager->dao->select(); $manager->dao->from(DB_TABLE_PREFIX . 't_facebook_connect'); $manager->dao->where('fk_i_user_id', $user['pk_i_id']); $result = $manager->dao->get(); if ($result != false) { if ($result->result() != array()) { osc_add_filter('email_user_registration_title', 'fbc_extend_email_title'); } } }
function osclasswizards_body_class($echo = true) { osc_add_filter('osclasswizards_bodyClass', 'osclasswizards_add_body_class_construct'); $classes = osc_apply_filter('osclasswizards_bodyClass', array()); if ($echo && count($classes)) { echo 'class="' . implode(' ', $classes) . '"'; } else { return $classes; } }
} multilanguage_form_create_field($locale, $field); if ($num_locales > 1) { echo '</div>'; } } } } if (!OC_ADMIN) { if (!function_exists('add_close_button_fm')) { function add_close_button_fm($message) { return $message . '<a class="close">×</a>'; } if (osc_version() < 300) { osc_add_filter('flash_message_text', 'add_close_button_fm'); } } if (!function_exists('add_close_button_action')) { function add_close_button_action() { echo '<script type="text/javascript">'; echo '$(".FlashMessage .close, .flashmessage .ico-close").click(function(){'; echo '$(this).parent().hide();'; echo '});'; echo '</script>'; } osc_add_hook('footer', 'add_close_button_action'); } } if (!function_exists('get_gravatar')) {
* WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public * License along with this program. If not, see <http://www.gnu.org/licenses/>. */ // meta tag robots osc_add_hook('header', 'osclasswizards_nofollow_construct'); osclasswizards_add_body_class('user user-profile'); osc_add_hook('before-main', 'sidebar'); function sidebar() { osc_current_web_theme_path('user-sidebar.php'); } osc_add_filter('meta_title_filter', 'custom_meta_title'); function custom_meta_title($data) { return __('Update account', OSCLASSWIZARDS_THEME_FOLDER); } osc_current_web_theme_path('header.php'); $osc_user = osc_user(); ?> <div class="row"> <?php osc_current_web_theme_path('user-sidebar.php'); ?> <div class="col-sm-8 col-md-9"> <h1 class="title"> <?php
/** * Send email to non-reg user requesting item activation */ if( Session::newInstance()->_get('userId') == '' && $aItem['active']=='INACTIVE' ) { osc_run_hook('hook_email_item_validation_non_register_user', $item); } else if ( $aItem['active']=='INACTIVE' ) { // USER IS REGISTERED osc_run_hook('hook_email_item_validation', $item); } else if( Session::newInstance()->_get('userId') == '' ){ // USER IS NOT REGISTERED osc_run_hook('hook_email_new_item_non_register_user', $item); } /** * Send email to admin about the new item */ if (osc_notify_new_item()) { osc_run_hook('hook_email_admin_new_item', $item); } } } if(osc_force_jpeg()) { function osc_force_jpeg_extension($content) { return 'jpg'; } function osc_force_jpeg_mime($content) { return 'image/jpeg'; } osc_add_filter('upload_image_extension', 'osc_force_jpeg_extension'); osc_add_filter('upload_image_mime', 'osc_force_jpeg_mime'); }
* License along with this program. If not, see <http://www.gnu.org/licenses/>. */ ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="<?php echo str_replace('_', '-', osc_current_user_locale()); ?> "> <head> <?php osc_current_web_theme_path('head.php'); ?> <?php if (osc_is_search_page()) { if (osc_count_items() == 0) { osc_add_filter('meta_robots', 'meta_robots_custom'); function meta_robots_custom() { return 'noindex, nofollow'; } } } ?> <meta name="robots" content="<?php echo osc_apply_filter('meta_robots', 'index, follow'); ?> " /> <meta name="googlebot" content="<?php echo osc_apply_filter('meta_robots', 'index, follow'); ?> " />
function payment_pro_admin_title() { switch (Params::getParam('route')) { case 'payment-pro-admin-conf': osc_remove_filter('admin_title', 'customPageTitle'); osc_add_filter('admin_title', 'payments_pro_admin_title_settings'); break; case 'payment-pro-admin-prices': osc_remove_filter('admin_title', 'customPageTitle'); osc_add_filter('admin_title', 'payments_pro_admin_title_settings'); break; case 'payment-pro-admin-log': osc_remove_filter('admin_title', 'customPageTitle'); osc_add_filter('admin_title', 'payments_pro_admin_title_log'); break; default: break; } }
public function __construct() { osc_add_filter('datatable_payment_log_status_class', array(&$this, 'row_class')); osc_add_filter('datatable_payment_log_status_text', array(&$this, '_status')); }
<?php // meta tag robots osc_add_hook('header', 'pop_nofollow_construct'); osc_add_filter('meta_title_filter', 'pop_title_404'); function pop_title_404($title) { $header_text = __("Sorry but I can't find the page you're looking for", 'pop'); if (View::newInstance()->_get('pop_404_header_text') != '') { $header_text = View::newInstance()->_get('pop_404_header_text'); } return $header_text; } pop_add_body_class('_404'); osc_current_web_theme_path('header.php'); ?> <div class="form-container box"> <div class="header"> <?php $header_text = __("Sorry but I can't find the page you're looking for", 'pop'); if (View::newInstance()->_get('pop_404_header_text') != '') { $header_text = View::newInstance()->_get('pop_404_header_text'); } ?> <h1><?php echo $header_text; ?> </h1> </div> <div class="form-content"> <div class="flashmessage-404">
function feed_get_product_data($item) { $conn = getConnection(); $detail = $conn->osc_dbFetchResult("SELECT * FROM %st_item_products_attr WHERE fk_i_item_id = %d", DB_TABLE_PREFIX, $item['pk_i_id']); $item['s_make'] = $detail['s_make']; $item['s_model'] = $detail['s_model']; return $item; } 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>'; } // 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", ''); osc_add_filter('admin_menu', 'feed_admin_menu'); osc_add_filter('feed_indeed', 'feed_indeed'); osc_add_filter('feed_trovit_houses', 'feed_trovit_houses'); osc_add_filter('feed_trovit_jobs', 'feed_trovit_jobs'); osc_add_filter('feed_trovit_products', 'feed_trovit_products'); osc_add_filter('feed_trovit_cars', 'feed_trovit_cars'); osc_add_filter('feed_google_jobs', 'feed_google_jobs'); osc_add_filter('feed_google_cars', 'feed_google_cars'); osc_add_filter('feed_oodle_jobs', 'feed_oodle_jobs'); osc_add_filter('feed_oodle_cars', 'feed_oodle_cars'); osc_add_filter('feed_oodle_realstate', 'feed_oodle_realstate');
<ul> <li><a href="' . osc_admin_render_plugin_url(osc_plugin_folder(__FILE__) . 'conf.php') . '">» ' . __('Help', 'extra_feeds') . '</a></li> </ul>'; } if (osc_version() < 320) { osc_add_hook('admin_menu', 'contact_counter_admin_menu'); } else { osc_add_hook('admin_menu_init', 'contact_counter_admin_menu'); } // routes osc_add_route('stats-contact-counter', 'stats-contact-counter/(.+)/([0-9]+)', 'stats-contact-counter/{type_stat}/{id}', osc_plugin_folder(__FILE__) . 'admin/stats.php'); // custom title/header stats page if (Params::getParam('page') == 'plugins' && Params::getParam('file') == 'contact_counter/admin/stats.php' || Params::getParam('route') == 'stats-contact-counter') { osc_add_hook('admin_header', 'contact_counter_remove_title_header'); osc_add_hook('admin_page_header', 'contact_counter_PageHeader_stats'); osc_add_filter('admin_title', 'contact_counter_customPageTitle'); } function contact_counter_remove_title_header() { osc_remove_hook('admin_page_header', 'customPageHeader'); } function contact_counter_PageHeader_stats() { ?> <h1><?php _e('Contact stats', 'contact_counter'); ?> <a href="#" class="btn ico ico-32 ico-help float-right"></a> </h1> <?php }
text-decoration: none !important; } a.MCtooltip:hover { z-index:999; } a.MCtooltip span { display: none; } a.MCtooltip:hover span { display: block; position: absolute; top:1em; left:1em; width:100%; padding:5px; background-color: #ffffff; } </style> <?php } /** * ADD HOOKS */ osc_register_plugin(osc_plugin_path(__FILE__), 'multicurrency_install'); osc_add_hook(osc_plugin_path(__FILE__) . "_uninstall", 'multicurrency_uninstall'); osc_add_hook('cron_hourly', 'multicurrency_get_data'); osc_add_hook('header', 'multicurrency_header'); osc_add_filter('item_price', 'multicurrency_add_prices');
$file = explode('/', Params::getParam('file')); if ($file[0] == 'all_in_one') { $title = '<i class="fa fa-line-chart"></i> All in One SEO Plugin'; } return $title; } osc_add_filter('custom_plugin_title', 'allSeoTitle'); // This is needed in order to be able to activate the plugin osc_register_plugin(osc_plugin_path(__FILE__), 'allSeo_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', 'allSeo_call_after_uninstall'); // This will add own meta osc_add_filter('meta_title_filter', 'allSeo_title_filter'); osc_add_filter('meta_description_filter', 'allSeo_description_filter'); // This will add own keywords osc_add_filter('meta_keywords_filter', 'allSeo_keywords_filter'); // Display help function allSeo_conf() { osc_admin_render_plugin(osc_plugin_path(dirname(__FILE__)) . '/admin/listings.php'); } // This is a hack to show a Configure link at plugins table (you could also use some other hook to show a custom option panel) osc_add_hook(osc_plugin_path(__FILE__) . '_configure', 'allSeo_conf'); // Add font awesome style to header function seo_font_awesome() { echo '<link href="http://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet" type="text/css" />'; } osc_add_hook('admin_header', 'seo_font_awesome'); function config_menu() {
<?php osc_add_filter('meta_title_filter', 'seo_meta_title_filter'); osc_add_filter('meta_description_filter', 'seo_meta_description_filter'); osc_add_filter('meta_keywords_filter', 'seo_meta_keywords_filter'); function seo_meta_title_filter() { $location = Rewrite::newInstance()->get_location(); $section = Rewrite::newInstance()->get_section(); $text = ''; switch ($location) { case 'item': switch ($section) { case 'item_add': $text = __('Publish a listing') . seo_page_title_separator() . seo_page_title(); break; case 'item_edit': $text = __('Edit your listing') . seo_page_title_separator() . seo_page_title(); break; case 'send_friend': $text = __('Send to a friend') . seo_page_title_separator() . osc_item_title() . seo_page_title_separator() . seo_page_title(); break; case 'contact': $text = __('Contact seller') . seo_page_title_separator() . osc_item_title(); break; default: $detail = seo_get_row(osc_item_id()); if (empty($detail['seo_item_meta_title'])) { $text = osc_item_title() . ' ' . osc_item_city() . seo_page_title_separator() . seo_page_title(); } else { $text = $detail['seo_item_meta_title'];
function mdh_emailmagick_admin_controller() { if (preg_match('/^' . mdh_current_plugin_name() . '.*$/', Params::getParam("route"))) { osc_add_hook("admin_header", function () { osc_enqueue_script(mdh_current_plugin_name() . "_admin"); osc_enqueue_style(mdh_current_plugin_name() . "_admin", mdh_current_plugin_url("assets/css/admin.css")); }); $filter = function ($string) { return __("Madhouse EmailMagick", mdh_current_plugin_name()); }; // Page title (in <head />) osc_add_filter("admin_title", $filter); // Page title (in <h1 />) osc_add_filter("custom_plugin_title", $filter); osc_add_filter("admin_body_class", function ($classes) { array_push($classes, "madhouse"); return $classes; }); // Add a .row-offset to wrapping <div /> element. osc_add_filter("render-wrapper", function ($string) { return "row-offset"; }); $do = new Madhouse_EmailMagick_Controllers_Admin(); $do->doModel(); } }
<?php if (!defined('OC_ADMIN')) { exit('Direct access is not allowed.'); } osc_add_filter('admin_body_class', 'admin_modeCompact_class'); function admin_modeCompact_class($args) { $compactMode = osc_get_preference('compact_mode', 'modern_admin_theme'); if ($compactMode == true) { $args[] = 'compact'; } return $args; } osc_add_hook('ajax_admin_compactmode', 'modern_compactmode_actions'); function modern_compactmode_actions() { $compactMode = osc_get_preference('compact_mode', 'modern_admin_theme'); $modeStatus = array('compact_mode' => true); if ($compactMode == true) { $modeStatus['compact_mode'] = false; } osc_set_preference('compact_mode', $modeStatus['compact_mode'], 'modern_admin_theme'); echo json_encode($modeStatus); } function admin_header_favicons() { $favicons = array(); $favicons[] = array('rel' => 'shortcut icon', 'sizes' => '', 'href' => osc_current_admin_theme_url('images/favicon-48.png')); $favicons[] = array('rel' => 'apple-touch-icon-precomposed', 'sizes' => '144x144', 'href' => osc_current_admin_theme_url('images/favicon-144.png')); $favicons[] = array('rel' => 'apple-touch-icon-precomposed', 'sizes' => '114x114', 'href' => osc_current_admin_theme_url('images/favicon-114.png'));
}); </script> <?php ItemForm::location_javascript_new('admin'); ?> <?php if (osc_images_enabled_at_items()) { ItemForm::photos_javascript(); } ?> <?php } osc_add_hook('admin_header', 'customHead', 10); $new_item = __get('new_item'); $actions = __get('actions'); osc_add_filter('render-wrapper', 'render_offset'); function render_offset() { return 'row-offset'; } osc_current_admin_theme_path('parts/header.php'); ?> <div id="pretty-form"> <div class="grid-row no-bottom-margin"> <div class="row-wrapper"> <h2 class="render-title"><?php echo customText('subtitle'); ?> </h2> </div> </div>
osc_add_hook('item_detail', 'voting_item_detail_user'); osc_add_hook('delete_item', 'voting_item_delete'); osc_add_hook('delete_user', 'voting_user_delete'); $file = '-'; if (Params::getParam('file') != '') { $file = Params::getParam('file'); } if (Params::getParam('page') == 'plugins' && strpos('voting/admin/help.php', $file) === 0) { osc_add_filter('custom_plugin_title', 'voting_help_title'); } function voting_help_title($title) { return __('Help', 'voting'); } if (Params::getParam('page') == 'plugins' && strpos('voting/admin/conf.php', $file) === 0) { osc_add_filter('custom_plugin_title', 'voting_conf_title'); } function voting_conf_title($title) { return __('Configuration', 'voting'); } /** * ADMIN MENU */ if (osc_version() >= 300) { osc_add_hook('admin_menu_init', 'voting_init_admin_menu'); } else { osc_add_hook('admin_menu', 'voting_admin_menu'); } function votingmenu() {
public function __construct() { osc_add_filter('datatable_user_class', array(&$this, 'row_class')); }
osc_add_hook('admin_page_header', 'customPageHeader'); function customPageHeader() { ?> <h1><?php _e('Settings'); ?> <a href="#" class="btn ico ico-32 ico-help float-right"></a> </h1> <?php } function customPageTitle($string) { return sprintf(__('Comment Settings » %s'), $string); } osc_add_filter('admin_title', 'customPageTitle'); osc_current_admin_theme_path('parts/header.php'); ?> <div id="general-settings"> <ul id="error_list"></ul> <form name="comments_form" action="<?php echo osc_admin_base_url(true); ?> " method="post"> <input type="hidden" name="page" value="settings" /> <input type="hidden" name="action" value="comments_post" /> <fieldset> <div class="form-horizontal"> <h2 class="render-title"><?php _e('Comment Settings'); ?>
$content .= '<li class="google-plus"><script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script><g:plusone size="medium"></g:plusone></li>'; // pinterest $content .= '<li class="pinterest"><script type="text/javascript" src="//assets.pinterest.com/js/pinit.js"></script><a href="#" class="pin-it-button" count-layout="horizontal"><img border="0" src="//assets.pinterest.com/images/PinExt.png" title="Pin It" /></a></li>'; $content .= '</ul>'; // clear $content .= '<div class="clear"></div>'; $content .= '</div>'; // pinterest $content .= '<script type="text/javascript" >$(document).ready(function() {var media = $("img[src*=\\"oc-content/uploads/\\"]").attr("src"); if(media==undefined) { media = ""; $(".pinterest").remove(); } else { media = "&media="+escape(media); };$(".pinterest").find("a").attr("href","http://pinterest.com/pin/create/button/?url="+escape(document.URL)+"&description="+escape(document.title)+media);});</script>'; return $content; } function social_bookmarks_header() { $location = Rewrite::newInstance()->get_location(); $section = Rewrite::newInstance()->get_section(); if ($location == 'item' && $section == '') { echo ' <style type="text/css"> .social-bookmarks ul { margin: 10px 0; list-style: none; } .social-bookmarks ul li { float: left; } .social-bookmarks .clear { clear:both; } </style>'; } } /** * HOOKS */ osc_register_plugin(osc_plugin_path(__FILE__), ''); osc_add_hook(osc_plugin_path(__FILE__) . '_uninstall', ''); osc_add_filter('item_description', 'social_bookmarks'); osc_add_hook('header', 'social_bookmarks_header');