/**
  * 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');
 }
Beispiel #2
0
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');
    }
}
Beispiel #3
0
<?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');
Beispiel #4
0
<?php

/*
 * Wolf CMS - Content Management Simplified. <http://www.wolfcms.org>
 * Copyright (C) 2009-2010 Martijn van der Kleijn <*****@*****.**>
 *
 * 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 <*****@*****.**>
 * @copyright Martijn van der Kleijn, 2010
 * @author Philippe Archambault <*****@*****.**>
 * @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');
Beispiel #5
0
<?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');
Beispiel #6
0
 * 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 <*****@*****.**>
 * @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');
Beispiel #7
0
<?php

/*
 * @author Chris Earls <*****@*****.**>
 * @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
Beispiel #8
0
 * 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 <*****@*****.**>
 * @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');
Beispiel #9
0
 * 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 <*****@*****.**>
 * @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');
Beispiel #10
0
 * 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'] . '\'');
Beispiel #11
0
<?php

/*
 * Wolf CMS - Content Management Simplified. <http://www.wolfcms.org>
 * Copyright (C) 2009-2010 Martijn van der Kleijn <*****@*****.**>
 *
 * 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 <*****@*****.**>
 * @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');