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


PHP Plugin::addJavascript方法代码示例

本文整理汇总了PHP中Plugin::addJavascript方法的典型用法代码示例。如果您正苦于以下问题:PHP Plugin::addJavascript方法的具体用法?PHP Plugin::addJavascript怎么用?PHP Plugin::addJavascript使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Plugin的用法示例。


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

示例1: Init

 /**
  * Registers the plugin and controller in the system as well as the observers.
  */
 public static function Init()
 {
     // Register plugin
     Plugin::setInfos(array('id' => self::PLUGIN_ID, 'title' => __('Page Part Forms'), 'description' => __('Allows to create custom page part forms'), 'version' => self::PLUGIN_VERSION, 'license' => 'AGPL', 'author' => 'THE M', 'website' => 'http://github.com/them/frog_page_part_forms/', 'update_url' => 'http://github.com/them/frog_page_part_forms/raw/master/frog-plugins.xml', 'require_frog_version' => '0.9.5'));
     // Register controller
     Plugin::addController(self::PLUGIN_ID, __('Page Part Forms'), 'administrator, developer', true);
     // Add extra scripting for JSON
     Plugin::addJavascript(self::PLUGIN_ID, "labs_json.js");
     // The callbacks for the backend
     Observer::observe('view_page_page_metadata', __CLASS__ . '::callback_view_page_page_metadata');
     Observer::observe('view_page_edit_popup', __CLASS__ . '::callback_view_page');
 }
开发者ID:billzeller,项目名称:frog_page_part_forms,代码行数:15,代码来源:PagePartFormsController.php

示例2: ckeditor_filter_setup

function ckeditor_filter_setup()
{
    $config_path = USE_MOD_REWRITE ? 'ckeditor/' : '../../?/wolf/plugins/ckeditor/';
    $controllers = '(page|snippet)';
    $actions = '(add|edit)';
    $pattern = '/^' . ADMIN_DIR . '\\/' . $controllers . '\\/' . $actions . '/';
    if (preg_match($pattern, CURRENT_URI)) {
        Plugin::addJavascript('ckeditor', 'scripts/ckeditor/ckeditor.js');
        Plugin::addJavascript('ckeditor', 'scripts/init.js');
        /* nasty way of including scripts */
        Plugin::$javascripts[] = $config_path . 'ckeditor_config.js';
        // load it AFTER ckeditor_config!
        //         Plugin::addJavascript('ckeditor', 'scripts/user/config.js');
    }
}
开发者ID:sindotnet,项目名称:cona,代码行数:15,代码来源:index.php

示例3: __

<?php

$plugin_id = "page_versions";
$controller_name = 'PageVersionsController';
Plugin::setInfos(array('id' => $plugin_id, 'title' => 'Page Versions', 'description' => 'Stores all the previous versions of a page', 'version' => '0.1', 'author' => 'Jules Piccotti', 'website' => 'http://fresh.jules.it/page_versions'));
Plugin::addController($plugin_id, __('Page Versions'), null, false);
Plugin::addJavascript($plugin_id, "page_versions.js");
Behavior::add('version', 'page_versions/page_versions.php');
Behavior::add('current_version', 'page_versions/page_versions.php');
Observer::observe('page_add_after_save', $controller_name . '::callback_page_updated');
Observer::observe('page_edit_after_save', $controller_name . '::callback_page_updated');
Observer::observe('page_before_execute_find', $controller_name . '::callback_filter_out_versions');
//Observer::observe('pages_tree_item_found', $controller_name.'::callback_tree_item_found');
开发者ID:julpi,项目名称:freshcms_page_versions,代码行数:13,代码来源:index.php

示例4: __

<?php

/*
 * Wolf CMS - Content Management Simplified. <http://www.wolfcms.org>
 * Copyright (C) 2009-2010 Martijn van der Kleijn <martijn.niji@gmail.com>
 *
 * This file is part of Wolf CMS. Wolf CMS is licensed under the GNU GPLv3 license.
 * Please see license.txt for the full license text.
 */
/* Security measure */
if (!defined('IN_CMS')) {
    exit;
}
/**
 * The Markdown plugin allows users edit pages using the markdown syntax.
 *
 * @package Plugins
 * @subpackage markdown
 *
 * @author Martijn van der Kleijn <martijn.niji@gmail.com>
 * @copyright Martijn van der Kleijn, 2010
 * @author Philippe Archambault <philippe.archambault@gmail.com>
 * @copyright Philippe Archambault, 2008
 * @license http://www.gnu.org/licenses/gpl.html GPLv3 License
 */
Plugin::setInfos(array('id' => 'markdown', 'title' => __('Markdown filter'), 'description' => __('Allows you to use the Markdown text filter.'), 'version' => '2.0.1', 'website' => 'http://www.wolfcms.org/', 'update_url' => 'http://www.wolfcms.org/plugin-versions.xml'));
Filter::add('markdown', 'markdown/filter_markdown.php');
Plugin::addController('markdown', __('Markdown'), 'administrator', false);
Plugin::addJavascript('markdown', 'markdown.php');
开发者ID:chaobj001,项目名称:tt,代码行数:29,代码来源:index.php

示例5:

<?php

if (!defined('IN_CMS')) {
    exit;
}
// Provide the neccessary plugin information for Wolf.
Plugin::setInfos(array('id' => 'ssp', 'title' => 'Slide Show Pro', 'description' => 'Slide Show Pro integration for Wolf', 'version' => '1.5.0', 'author' => 'Arik Savage', 'website' => 'http://www.example.com', 'require_wolf_version' => '0.5.5'));
/**
 * Load the plugin controller.
 *
 * addController explained:
 * 'menu' => The plugin ID.
 * 'Menu' => The plugin tab label.
 * 'administrator' => permission name or group name - restricts who can access the controller.
 * 'true' => If set to true, a plugin tab is displayed in the backend navigation menu (default = false).
 */
Plugin::addController('ssp', 'SlideShow Pro', 'administrator', true);
Filter::add('slideshow', 'ssp/filter_slideshow.php');
// Load the plugin models.
AutoLoader::addFolder(PLUGINS_ROOT . DS . 'ssp' . DS . 'models');
//load javascript for backend
Plugin::addJavascript('ssp', 'js/ssp_scripts.js');
Plugin::addJavascript('ssp', 'js/slideshow.js');
开发者ID:ariksavage,项目名称:wolf_ssp,代码行数:23,代码来源:index.php

示例6: __

 * it under the terms of the GNU 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 General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */
/**
 * The CKEditor plugin for Wolf cms
 *
 * @package wolf
 * @subpackage plugin.ckeditor
 *
 * @author Andri Kusumah <rombeh@gmail.com>
 * @version 1.0
 * @since Wolf version 0.5.5
 * @license http://www.gnu.org/licenses/gpl.html GPL License
 * @copyright Andri Kusumah, 2009
 */
Plugin::setInfos(array('id' => 'ckeditor', 'title' => __('CKEditor'), 'description' => __('CKEditor Text Filter'), 'version' => '1.1', 'license' => 'GPLv3', 'author' => 'Andri Kusumah (Goroworks)', 'website' => 'http://www.goroworks.com/', 'update_url' => 'http://ulin.goroworks.com/files/oss/wolf/ckeditor-wolf-version.xml', 'require_wolf_version' => '0.7.3'));
Plugin::addController('ckeditor', __('CKEditor'), 'administrator', false);
Filter::add('ckeditor', 'ckeditor/filter_ckeditor.php');
Plugin::addController('ckeditor', 'ckeditor', 'administrator,developer', false);
Plugin::addJavascript('ckeditor', 'init.js.php');
Plugin::addJavascript('ckeditor', 'ckeditor/ckeditor.js');
开发者ID:nowotny,项目名称:wolf_ckeditor,代码行数:30,代码来源:index.php

示例7: collection

<?php

/*
 * @author Chris Earls <cgearls@gmail.com>
 * @version 1.0.0
 * @since Frog version 0.9.5
 * @license http://www.gnu.org/licenses/agpl.html AGPL License
 * @copyright Chris Earls, 2009
 */
Plugin::setInfos(array('id' => 'ecommerce', 'title' => 'Ecommerce', 'description' => 'Ecommerce solution for Frog CMS', 'version' => '1.0.0', 'license' => 'AGPL', 'author' => 'Chris Earls', 'website' => 'http://www.chrisearls.net/', 'require_frog_version' => '0.9.5'));
Plugin::addController('ecommerce', 'Ecommerce');
Plugin::addJavascript('ecommerce', 'javascripts/ajaxupload.2.4.js');
Plugin::addJavascript('ecommerce', 'javascripts/tagger.js');
Observer::observe('page_found', 'ecommerce_frontend');
function collection($id)
{
    $ec = new EcommerceController();
    echo $ec->collection_show($id);
}
function ecommerce_frontend($page)
{
    $ec = new EcommerceController();
    include 'classes/cart.class.php';
    ob_start();
    $page->_executeLayout();
    $output = ob_get_contents();
    ob_end_clean();
    $uri_arr = explode('/', $page->url);
    if (in_array('products', $uri_arr)) {
        $cart = new Cart('shopping_cart');
        // search
开发者ID:shuhrat,项目名称:frog_ecommerce,代码行数:31,代码来源:index.php

示例8:

 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU 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 General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */
/**
 * The TinyMCE plugin provides the TinyMCE editor to Wolf CMS users.
 *
 * @package wolf
 * @subpackage plugin.tinymce
 *
 * @author Martijn van der Kleijn <martijn.niji@gmail.com>
 * @version 3.0.0
 * @since Wolf version 0.5.5
 * @license http://www.gnu.org/licenses/gpl.html GPL License
 * @copyright Martijn van der Kleijn, 2008,2009,2010
 */
Plugin::setInfos(array('id' => 'tinymce', 'title' => 'TinyMCE Editor', 'description' => 'Allows you to use the TinyMCE text editor.', 'version' => '3.5.0', 'license' => 'GPLv3', 'author' => 'Martijn van der Kleijn', 'website' => 'http://www.vanderkleijn.net/wolf-cms.html', 'update_url' => 'http://www.vanderkleijn.net/plugins.xml', 'require_wolf_version' => '0.7.3'));
Filter::add('tinymce', 'tinymce/filter_tinymce.php');
Plugin::addController('tinymce', 'Tinymce', 'administrator,developer', false);
Plugin::addJavascript('tinymce', 'tinymce/jscripts/tiny_mce/tiny_mce.js');
Plugin::addJavascript('tinymce', 'tiny_init.php');
开发者ID:ariksavage,项目名称:idsog.org,代码行数:30,代码来源:index.php

示例9: Crookston

 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU 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 General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */
/**
 * The CKFrog plugin provides the CKEditor to Frog users.
 *
 * @package frog
 * @subpackage plugin.ckfrog
 *
 * @author Andrew Crookston <andrew@casystems.se>
 * @version 0.1.0
 * @since Frog version 0.9.5
 * @license http://www.gnu.org/licenses/gpl.html GPL License
 * @copyright Andrew Crookston, 2009
 */
Plugin::setInfos(array('id' => 'ckfrog', 'title' => 'CKEditor filter', 'description' => 'Allows you to use the CKEditor for text editing.', 'version' => '0.1.0', 'license' => 'GPLv3', 'author' => 'Andrew Crookston (CA Systems)', 'website' => 'http://www.casystems.se', 'update_url' => 'http://www.casystems.se/frog-plugin-versions.xml', 'require_frog_version' => '0.9.5'));
// Using 'ckeditor' as first argument, this is what is shown in filter dropdown
Filter::add('ckeditor', 'ckfrog/ckfrog_filter.php');
Plugin::addJavascript('ckfrog', 'jscripts/ckeditor/ckeditor.js');
Plugin::addJavascript('ckfrog', 'ckfrog_config.js.php');
开发者ID:acrookston,项目名称:ckfrog,代码行数:30,代码来源:index.php

示例10: redirector_catch_redirect

 * Copyright (c) 2010 Design Spike
 *
 * Licensed under the MIT license:
 *   http://www.opensource.org/licenses/mit-license.php
 *
 * Project home:
 *   http://themes.designspike.ca/redirector/help/
 *
 */
Plugin::setInfos(array('id' => 'redirector', 'title' => 'Redirector', 'description' => 'Provides an interface to manage redirects.', 'version' => '0.1', 'license' => 'MIT', 'author' => 'Design Spike', 'website' => 'http://themes.designspike.ca/redirector/', 'update_url' => 'http://themes.designspike.ca/redirector/redirector-versions.xml'));
Behavior::add('page_not_found', '');
Observer::observe('page_requested', 'redirector_catch_redirect');
Observer::observe('page_not_found', 'redirector_log_404');
AutoLoader::addFolder(dirname(__FILE__) . '/models');
Plugin::addController('redirector', 'Redirector');
Plugin::addJavascript('redirector', 'js/jquery.scrollTo-min.js');
// redirect urls already set up
function redirector_catch_redirect()
{
    $redirect = Record::findAllFrom('RedirectorRedirects', 'url = \'' . $_SERVER['REQUEST_URI'] . '\'');
    if (sizeof($redirect) > 0) {
        Record::update('RedirectorRedirects', array('hits' => $redirect[0]->hits + 1), 'id = ' . $redirect[0]->id);
        header('HTTP/1.1 301 Moved Permanently', true);
        header('Location: ' . $redirect[0]->destination);
        exit;
    }
}
// watch and log 404 errors
function redirector_log_404()
{
    $redirect = Record::findAllFrom('Redirector404s', 'url = \'' . $_SERVER['REQUEST_URI'] . '\'');
开发者ID:julpi,项目名称:FreshCMS,代码行数:31,代码来源:index.php

示例11: __

<?php

/*
 * Wolf CMS - Content Management Simplified. <http://www.wolfcms.org>
 * Copyright (C) 2009-2010 Martijn van der Kleijn <martijn.niji@gmail.com>
 *
 * This file is part of Wolf CMS. Wolf CMS is licensed under the GNU GPLv3 license.
 * Please see license.txt for the full license text.
 */
/**
 * The Textile plugin provides a Filter that uses the Textile parser.
 *
 * @package Plugins
 * @subpackage textile
 *
 * @author Martijn van der Kleijn <martijn.niji@gmail.com>
 * @copyright Martijn van der Kleijn, 2010
 * @license http://www.gnu.org/licenses/gpl.html GPLv3 License
 */
/* Security measure */
if (!defined('IN_CMS')) {
    exit;
}
Plugin::setInfos(array('id' => 'textile', 'title' => __('Textile filter'), 'description' => __('Allows you to use the Textile text filter.'), 'version' => '2.0.0', 'website' => 'http://www.wolfcms.org/', 'update_url' => 'http://www.wolfcms.org/plugin-versions.xml'));
Filter::add('textile', 'textile/filter_textile.php');
Plugin::addController('textile', null, 'admin_view', false);
Plugin::addJavascript('textile', 'textile.php');
开发者ID:crick-ru,项目名称:wolfcms,代码行数:27,代码来源:index.php


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