Ejemplo n.º 1
0
function watchlist_footer()
{
    echo '<!-- Watchlist js -->';
    echo '<script type="text/javascript">';
    echo 'var watchlist_url = "' . osc_ajax_plugin_url('watchlist/ajax_watchlist.php') . '";';
    echo '</script>';
    echo '<script type="text/javascript" src="' . osc_plugin_url('watchlist/js/watchlist.js') . 'watchlist.js"></script>';
    echo '<!-- Watchlist js end -->';
}
Ejemplo n.º 2
0
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;
    }
}
Ejemplo n.º 3
0
/*       This program is free software: you can redistribute it and/or
 *     modify it under the terms of the GNU Affero General Public License
 *     as published by the Free Software Foundation, either version 3 of
 *            the License, or (at your option) any later version.
 *
 *     This program is distributed in the hope that it will be useful, but
 *         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/>.
 */
osc_register_script('jquery-cookie', osc_plugin_url(__FILE__) . 'jquery.cookie.js', array('jquery'));
osc_register_script('jquery-cookiecuttr', osc_plugin_url(__FILE__) . 'jquery.cookiecuttr.js', array('jquery', 'jquery-cookie'));
osc_enqueue_style('cookiecuttr-style', osc_plugin_url(__FILE__) . 'cookiecuttr.css');
osc_enqueue_script('jquery-cookiecuttr');
function cookie_load()
{
    ?>
        <script type="text/javascript" >
        $(document).ready(function () {
            var options = new Object();
            <?php 
    if (osc_get_preference('accept', 'cookie') == 1) {
        echo 'options.cookieAcceptButton = true;';
    }
    if (osc_get_preference('decline', 'cookie') == 1) {
        echo 'options.cookieDeclineButton = true;';
    }
    if (osc_get_preference('reset', 'cookie') == 1) {
Ejemplo n.º 4
0
?>
        </span> </div>
      <div class="form-control-list">
        <label for="seo_item_meta_keywords">
          <?php 
_e('Meta Keywords', SEO_PLUGIN_FOLDER);
?>
          : </label>
        <textarea placeholder="keyword1, keyword2" id="seo_item_meta_keywords" name="seo_item_meta_keywords" title="<?php 
_e('The keywords help to tell search engines what the topic of the page is.', SEO_PLUGIN_FOLDER);
?>
"><?php 
echo $detail['seo_item_meta_keywords'];
?>
</textarea>
        <span id="sep_wiz">
        <?php 
_e('Separate keywords with commas.', SEO_PLUGIN_FOLDER);
?>
        </span> </div>
    </div>
  </div>
  <address class="wizards_address">
  <span>&copy; 2015 <a target="_blank" title="Premium Osclass Themes - OsclassWizards" title="Premium Osclass Themes - OsclassWizards" href="http://www.osclasswizards.com/">OsclassWizards</a>. All rights reserved.</span>
  </address>
</div>
<script type="text/javascript" src="<?php 
echo osc_plugin_url(SEO_PLUGIN_FOLDER . '/js/script.js') . 'script.js';
?>
"></script> 
Ejemplo n.º 5
0
<?php

/*
 Plugin Name: GZ News
 Plugin URI: https://github.com/Germanaz0/gz_news
 Description: This plugin allows admins to upload them news like a blog post.
 Version: 1.0
 Author: Germanaz0
 Author URI: http://www.github.com/germanaz0
*/
define('GZ_NEWS_PLUGIN_FOLDER', osc_plugin_folder(__FILE__));
define('GZ_NEWS_PATH', dirname(__FILE__) . '/');
define('GZ_NEWS_URL', osc_plugin_url(__FILE__));
gz_news_autoload();
/**
 * Autoload function to automatical includes files and classes
 */
function gz_news_autoload()
{
    $classes = array('GzNewsDao', 'GzNewsUtils', 'GzNewsModel', 'GzNewsForm');
    $class_path = GZ_NEWS_PATH . 'classes/';
    foreach ($classes as $class) {
        $filename = $class_path . $class . '.php';
        if (file_exists($filename)) {
            include_once $filename;
        }
    }
}
/**
 * Create news table after module install
 */
Ejemplo n.º 6
0
function item_success_meta_og()
{
    $image = null;
    $r = ItemResource::newInstance()->getResource(osc_item_id());
    if (isset($r['pk_i_id'])) {
        $image = (string) osc_base_url() . $r['s_path'] . $r['pk_i_id'] . "_thumbnail." . $r['s_extension'];
    }
    $_item = Item::newInstance()->findByPrimaryKey(osc_item_id());
    ?>
<meta property="og:title" content="<?php 
    echo osc_esc_html($_item['s_title']);
    ?>
"/>
<meta property="og:url" content="<?php 
    echo osc_item_url();
    ?>
"/>
<?php 
    if ($image != null) {
        ?>
<meta property="og:image" content="<?php 
        echo $image;
        ?>
"/>
<?php 
    } else {
        ?>
<meta property="og:image" content="<?php 
        echo osc_plugin_url(true) . 'item_success/images/no_photo.gif';
        ?>
"/>
<?php 
    }
    ?>
<meta property="og:site_name" content="<?php 
    echo osc_esc_html(meta_title());
    ?>
"/>

<meta property="og:description" content="<?php 
    echo osc_esc_html(osc_highlight($_item['s_description']));
    ?>
"/>
<?php 
}
Ejemplo n.º 7
0
/**
 * Admin script and css loading
 */
function minify_admin_header()
{
    osc_enqueue_script('prism');
    osc_enqueue_style('prism', osc_plugin_url('lz_item_code/admin/assets/css') . 'css/prism' . (minify_is_live() ? '.min' : '') . '.css');
}
Ejemplo n.º 8
0
    <form id="plugin-frm" action="<?php 
echo osc_admin_base_url(true);
?>
" enctype="multipart/form-data" method="post">
        <input type="hidden" name="page" value="plugins" />
        <input type="hidden" name="action" value="configure_post" />
        <input type="hidden" name="plugin" value="minifyer/index.php" />
        <input type="hidden" name="plugin_short_name" value="<?php 
echo $plugin_data['short_name'];
?>
" />
        <fieldset>
            <div class="header">
                <h2 class="render-title">
                    <img src="<?php 
echo osc_plugin_url('minifyer/admin/assets/img') . 'img/logo.png';
?>
" width="240"/>
                    <small><?php 
echo $plugin_data['description'];
?>
</small>
                </h2>
            </div>
            <br clear="all"/>
            <div>
                <div id="tabs">
                    <ul>
                        <li><a href="#tab-default"><?php 
_e('About', 'minify');
?>