/**
  * 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
 */
/* Security measure */
if (!defined('IN_CMS')) {
    exit;
}
/**
 * The skeleton plugin serves as a basic plugin template.
 *
 * This skeleton plugin makes use/provides the following features:
 * - A controller without a tab
 * - Three views (sidebar, documentation and settings)
 * - A documentation page
 * - A sidebar
 * - A settings page (that does nothing except display some text)
 * - Code that gets run when the plugin is enabled (enable.php)
 *
 * Note: to use the settings and documentation pages, you will first need to enable
 * the plugin!
 *
 * @package plugins
 * @subpackage skeleton
 *
 * @author Jules Piccotti <*****@*****.**>
 * @author Martijn van der Kleijn <*****@*****.**>
 * @version 1.0.0
 * @since Fresh CMS version 0.5.5
 * @license http://www.gnu.org/licenses/gpl.html GPL License
 * @copyright 2008-2010 Jules Piccotti, Martijn van der Kleijn, Philippe Archambault
 */
Plugin::setInfos(array('id' => 'skeleton', 'title' => __('Skeleton'), 'description' => __('Provides a basic plugin implementation. (try enabling it!)'), 'version' => '1.0', 'license' => 'GPL', 'author' => 'Jules Piccotti', 'website' => 'http://freshcms.jules.it/', 'update_url' => 'http://freshcms.jules.it/plugin-versions.xml', 'require_cms_version' => '0.5.5'));
Plugin::addController('skeleton', __('Skeleton'), 'administrator', true);
Beispiel #3
0
<?php

if (!defined('IN_CMS')) {
    exit;
}
/**
 * Image manipulation plugin for Wolf CMS <http://www.wolfcms.org> based on the Kohana Image.
 *
 * @package Plugins
 * @subpackage image
 *
 * @author Devi Mandiri <devi[dot]mandiri[at]gmail[dot]com>
 * @license UNLICENSE - http://unlicense.org
 *
 * Kohana license refer to http://kohanaframework.org/license
 */
Plugin::setInfos(array('id' => 'image', 'type' => 'both', 'title' => __('Image'), 'description' => __('Image manipulation using GD library. Allows images to be resized, cropped, etc.'), 'version' => '1.0.1', 'license' => 'Unlicense', 'author' => 'Devi Mandiri', 'website' => 'http://github.com/devi/wolf-image', 'update_url' => 'http://devi.web.id/wolf-plugin-versions.xml', 'require_wolf_version' => '0.7.3'));
AutoLoader::addFile('Image', PLUGINS_ROOT . '/image/image.class.php');
Plugin::addController('image', '', false, false);
// manipulate image on the fly
Dispatcher::addRoute(array('/wolfimage?:any' => '/plugin/image/wolfimage/$1'));
<?php

/*
 * Email Template - Frog CMS behaviour
 *
 * Copyright (c) 2008-2009 Mika Tuupola
 *
 * Licensed under the MIT license:
 *   http://www.opensource.org/licenses/mit-license.php
 *
 * Project home:
 *   http://www.appelsiini.net/
 */
Plugin::setInfos(array('id' => 'email_template', 'title' => 'Email template', 'description' => 'Provides mailer backend to your forms.', 'version' => '0.2.1', 'author' => 'Mika Tuupola', 'license' => 'MIT', 'update_url' => 'http://www.appelsiini.net/download/frog-plugins.xml', 'website' => 'http://www.appelsiini.net/'));
Behavior::add('Email_template', 'email_template/email_template.php');
Beispiel #5
0
 *
 * 	A semantic and usable contact form for Frog CMS
 *  by Marijn Scholtus (http://thinkbright.nl)
 *
 *  Please keep this comment block intact when redistributing this Frog CMS Plugin.
 */
/**
 * @package frog
 * @subpackage plugin.tb_contactform
 * @author Marijn Scholtus (Thinkbright)
 * @version 1.0
 * @since Frog version 0.9.5
 * @license http://creativecommons.org/licenses/by-sa/3.0/nl/deed.en
 * @copyright Marijn Scholtus, 2009
 */
Plugin::setInfos(array('id' => 'tb_contactform', 'title' => 'TB_Contactform', 'description' => 'A semantic and usable contact form with proper input validation.', 'version' => '1.0.2', 'license' => 'MIT', 'author' => 'Marijn Scholtus (Thinkbright)', 'require_frog_version' => '0.9.5', 'website' => 'http://labs.thinkbright.nl/tb_contactform/', 'update_url' => 'http://labs.thinkbright.nl/frog-plugin-versions.xml'));
/** Contact Form **/
function TB_ContactForm($emailTo, $emailCC = FALSE, $sentHeading = 'Your message was sent successfully.', $sentMessage = 'We will get back to you soon.')
{
    if (isset($_POST['contact_submit'])) {
        $error = "";
        $fullname = makeSafe($_POST['fullname']);
        $email = makeSafe($_POST['email']);
        $phone = makeSafe($_POST['phone']);
        $message = makesafe($_POST['message']);
        $subject = "Enquiry from Estadia by Hatten";
        if (empty($fullname)) {
            $error['fullname'] = "Your name";
        }
        if (empty($email) || !isValidEmail($email)) {
            $error['email'] = "Email Address";
Beispiel #6
0
 *
 * Frog CMS 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.
 *
 * Frog CMS 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 Frog CMS.  If not, see <http://www.gnu.org/licenses/>.
 *
 * Frog CMS has made an exception to the GNU General Public License for plugins.
 * See exception.txt for details and the full text.
 */
/**
 * The Markdown plugin allows users edit pages using the markdown syntax.
 *
 * @package frog
 * @subpackage plugin.markdown
 *
 * @author Philippe Archambault <*****@*****.**>
 * @version 1.0.0
 * @since Frog version 0.9.0
 * @license http://www.gnu.org/licenses/gpl.html GPL License
 * @copyright Philippe Archambault, 2008
 */
Plugin::setInfos(array('id' => 'markdown', 'title' => 'Markdown filter', 'description' => 'Allows you to compose page parts or snippets using the Markdown text filter.', 'version' => '1.0.0', 'website' => 'http://www.madebyfrog.com/', 'update_url' => 'http://www.madebyfrog.com/plugin-versions.xml'));
Filter::add('markdown', 'markdown/filter_markdown.php');
Beispiel #7
0
/*
 * Banner Plugin for WolfCMS <http://www.wolfcms.org>
 * Copyright (C) 2011 Shannon Brooks <*****@*****.**>
 *
 * This file is part of Banner Plugin. Banner Plugin is licensed under the GNU GPLv3 license.
 * Please see license.txt for the full license text.
 */

// Security Measure
if (!defined('IN_CMS')) { exit(); }

Plugin::setInfos(array(
	'id'          => 'banner',
	'title'       => __('Banners'),
	'description' => __('Provides interface to manage banners.'),
	'version'     => '0.0.2',
	'license'     => 'GPL',
	'author'      => 'Shannon Brooks',
	'website'     => 'http://www.dogdoo.net',
	'require_wolf_version' => '0.7.2'
));

/**
 * Root location where Banner plugin lives.
 */
define('BANNER_ROOT', URI_PUBLIC.'wolf/plugins/banner');

//	watch for banner requests
Observer::observe('page_requested', 'banner_catch_click');
Observer::observe('page_requested', 'banner_count_display');
Observer::observe('page_requested', 'banner_catch_json_request');
Beispiel #8
0
<?php

/**
 * Prettify - Google Code Syntax Highlighter
 * Prettify is free for non-profit usage.
 * @package freshcms
 * @subpackage plugin.prettify
 *
 * @author Sanja Andjelkovic <*****@*****.**>
 * @author Dejan Andjelkovic <*****@*****.**>
 * @version 0.0.1
 * @for Fresh CMS version 0.9 and above
 * @license http://www.gnu.org/licenses/gpl.html GPL License
 * @copyright medio.com.hr, 2010
 */
Plugin::setInfos(array('id' => 'prettify', 'title' => 'Prettify', 'description' => 'Google Code Prettify Syntax Highlighter', 'version' => '0.0.1', 'license' => 'GPL', 'author' => 'Dejan Andjelkovic', 'website' => 'http://project79.net/', 'update_url' => 'http://www.project79.net/plugin-versions.xml', 'require_cms_version' => '0.5.5'));
// funkcija poziva css i js
function prettify()
{
    //putanje
    $jspath = BASE_URL . CORE_FOLDER . '/plugins/prettify/';
    $csspath = BASE_URL . CORE_FOLDER . '/plugins/prettify/';
    // loadaj
    echo '<script type="text/javascript" src="', $jspath, 'prettify.js"></script>', "\n";
    echo '<script type="text/javascript" src="', $jspath, 'lang-css.js"></script>', "\n";
    echo '<link href="', $csspath, 'prettify.css" rel="stylesheet" type="text/css">', "\n";
}
Beispiel #9
0
<?php

error_reporting(E_ALL);
Plugin::setInfos(array('id' => 'ADS_functions', 'title' => 'ADS Functions', 'license' => 'GPL', 'description' => 'A collection of useful PHP functions', 'version' => '1.0', 'author' => 'Arik Savage', 'website' => 'http://www.artisticdigital.com/'));
function mail_link($address)
{
    echo '<a href="mailto:' . $address . '">' . $address . '</a>';
}
function trim_text($text, $length, $marker)
{
    $greater = str_pos($text, $marker, $length) + strlen($marker);
    $trimmed = substr($text, 0, $greater);
    return $trimmed;
}
 private static function registerInfos()
 {
     Plugin::setInfos(array('id' => CALENDAR_ID, 'title' => __('Calendar'), 'description' => __('Calendar'), 'version' => '1.1.0', 'license' => 'GPL', 'author' => 'Jacek Ciach', 'require_wolf_version' => '0.8.0', 'website' => 'https://github.com/jacekciach/wolfcms-calendar-plugin', 'update_url' => 'https://raw.githubusercontent.com/jacekciach/wolfcms-calendar-plugin/master/version.xml'));
 }
Beispiel #11
0
}
/**
 * The FileManager allows users to upload and manipulate files.
 *
 * @package Plugins
 * @subpackage file_manager
 *
 * @author Philippe Archambault <*****@*****.**>
 * @author Martijn van der Kleijn <*****@*****.**>
 * @copyright Philippe Archambault & Martijn van der Kleijn, 2008
 * @license http://www.gnu.org/licenses/gpl.html GPLv3 license
 */
/**
 * Root location where Files plugin lives.
 */
define('FILES_ROOT', URI_PUBLIC . 'wolf/plugins/file_manager');
/**
 * Root location where files get uploaded to as an absolute path.
 */
define('FILES_DIR', CMS_ROOT . DS . 'public');
/**
 * Root location where files get uploaded to as a URL.
 */
define('BASE_FILES_DIR', URL_PUBLIC . 'public');
// DO NOT EDIT AFTER THIS LINE -----------------------------------------------
Plugin::setInfos(array('id' => 'file_manager', 'title' => __('File Manager'), 'description' => __('Provides interface to manage files from the administration.'), 'version' => '1.0.0', 'website' => 'http://www.wolfcms.org/', 'update_url' => 'http://www.wolfcms.org/plugin-versions.xml'));
Plugin::addController('file_manager', __('Files'), 'file_manager_view');
// Make sure possible hack attempts get registered if the statistics API is available.
if (Plugin::isEnabled('statistics_api')) {
    Observer::observe('stats_file_manager_hack_attempt', 'StatisticsEvent::registerEvent');
}
Beispiel #12
0
 *
 * Fresh CMS 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 Fresh CMS.  If not, see <http://www.gnu.org/licenses/>.
 *
 * Fresh CMS has made an exception to the GNU General Public License for plugins.
 * See exception.txt for details and the full text.
 */
/* Security measure */
if (!defined('IN_CMS')) {
    exit;
}
/**
 * The Textile plugin allows users to edit pages using the textile syntax.
 *
 * @package plugins
 * @subpackage textile
 *
 * @author Jules Piccotti <*****@*****.**>
 * @author Philippe Archambault <*****@*****.**>
 * @version 1.0.0
 * @since Fresh CMS version 0.9.0
 * @license http://www.gnu.org/licenses/gpl.html GPL License
 * @copyright 2008-2010 Jules Piccotti, Martijn van der Kleijn, Philippe Archambault
 */
Plugin::setInfos(array('id' => 'textile', 'title' => __('Textile filter'), 'description' => __('Allows you to compose page parts or snippets using the Textile text filter.'), 'version' => '1.0.0', 'website' => 'http://freshcms.jules.it/', 'update_url' => 'http://freshcms.jules.it/plugin-versions.xml'));
Filter::add('textile', 'textile/filter_textile.php');
Beispiel #13
0
 * Copyright (c) 2011 Martijn van der Kleijn <*****@*****.**>
 * Copyright (c) 2008-2011 Mika Tuupola
 *
 * Licensed under the MIT license:
 *   http://www.opensource.org/licenses/mit-license.php
 *
 */
define('DASHBOARD_LOG_EMERG', 0);
define('DASHBOARD_LOG_ALERT', 1);
define('DASHBOARD_LOG_CRIT', 2);
define('DASHBOARD_LOG_ERR', 3);
define('DASHBOARD_LOG_WARNING', 4);
define('DASHBOARD_LOG_NOTICE', 5);
define('DASHBOARD_LOG_INFO', 6);
define('DASHBOARD_LOG_DEBUG', 7);
Plugin::setInfos(array('id' => 'dashboard', 'title' => __('Dashboard'), 'description' => __('Keep up to date with what is happening with your site.'), 'version' => '1.0', 'license' => 'MIT', 'author' => 'Martijn van der Kleijn (original Mika Tuupola)', 'website' => 'https://github.com/mvdkleijn/dashboard', 'require_wolf_version' => '0.7.0'));
AutoLoader::addFolder(dirname(__FILE__) . '/models');
Observer::observe('log_event', 'dashboard_log_event');
function dashboard_log_event($message, $ident = 'misc', $priority = DASHBOARD_LOG_NOTICE)
{
    /* BC. Order of parameters was swapped in 0.4.0. */
    if (is_integer($ident)) {
        $warning = __('Message below from <b>:ident</b> uses old Dashboard API.', array(':ident' => $priority));
        dashboard_log_event($warning, 'dashboard', DASHBOARD_LOG_WARNING);
        $data['ident'] = $priority;
        $data['priority'] = $ident;
    } else {
        $data['ident'] = $ident;
        $data['priority'] = $priority;
    }
    $data['message'] = $message;
Beispiel #14
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 #15
0
 * Please see the GNU General Public License for more details.
 *
 * @package frog
 * @subpackage plugin.fsearch
 *
 * @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
 *
 * @todo Only supports text in the Body-part. Should be able to choose fields via settings
 * @todo Known issue: Will not filter out markup like Textile or Markdown. Filters out HTML and PHP etc..
 * @todo Add a disable.php for rolling back the database changes when disabling the plugin
 */
Plugin::setInfos(array('id' => 'fsearch', 'title' => 'FSearch - Frog MySQL Search', 'description' => 'Provides MySQL full-text search capabilities.', 'version' => '1.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'));
// Load the FSearch class into the system
AutoLoader::addFile('FSearch', CORE_ROOT . '/plugins/fsearch/FSearch.php');
// Add observers for page editing
Observer::observe('view_page_edit_plugins', 'fsearch_display_select');
Observer::observe('part_edit_after_save', 'fsearch_clean_contents');
/**
 * Retrieve an array with all pages matching the search phrase.
 * 
 * @param Search $search A string containing MySQL full-text search query.
 * @return Array Returns an array of Page objects, if any.
 */
function fsearch($search)
{
    $pages = FSearch::search(array('search' => $search, 'limit' => 10));
    return $pages;
Beispiel #16
0
<?php

Plugin::setInfos(array('id' => 'hello_world', 'title' => 'Hello world!', 'description' => 'Allows you to display "Hello World! where you want.', 'version' => '1.0.0', 'license' => 'GPL', 'author' => 'Martijn van der Kleijn', 'website' => 'http://www.wolfcms.org/', 'update_url' => 'http://www.siforster.net/plugin-versions.xml', 'require_wolf_version' => '0.5.0'));
function hello()
{
    echo 'Hello World!';
}
Filter::add('hello_world', 'hello_world/filter_hello_world.php');
Beispiel #17
0
<?php

/*
 * First Child - Frog CMS behaviour
 *
 * Copyright (c) 2009 Mika Tuupola
 *
 * Licensed under the MIT license:
 *   http://www.opensource.org/licenses/mit-license.php
 *
 * Project home:
 *   http://www.appelsiini.net/
 */
Plugin::setInfos(array('id' => 'first_child', 'title' => 'First Child', 'description' => 'Redirects page to its first child.', 'version' => '0.1.2', 'license' => 'MIT', 'author' => 'Mika Tuupola', 'update_url' => 'http://www.appelsiini.net/download/frog-plugins.xml', 'website' => 'http://www.appelsiini.net/'));
Behavior::add('Redirect_to_first_child', 'first_child/first_child.php');
Beispiel #18
0
if (!defined('IN_CMS')) {
    exit;
}
/**
 * The Comment plugin provides an interface to enable adding and moderating page comments.
 *
 * @package Plugins
 * @subpackage comment
 *
 * @author Philippe Archambault <*****@*****.**>
 * @author Bebliuc George <*****@*****.**>
 * @author Martijn van der Kleijn <*****@*****.**>
 * @copyright Philippe Archambault, Bebliuc George & Martijn van der Kleijn, 2008
 * @license http://www.gnu.org/licenses/gpl.html GPLv3 license
 */
Plugin::setInfos(array('id' => 'comment', 'title' => __('Comments'), 'description' => __('Provides interface to add page comments.'), 'version' => '1.2.1', 'license' => 'GPL', 'author' => 'Philippe Archambault', 'website' => 'http://www.wolfcms.org/', 'update_url' => 'http://www.wolfcms.org/plugin-versions.xml', 'require_wolf_version' => '0.5.5'));
/**
 * Root location where Comment plugin lives.
 */
define('COMMENT_ROOT', URI_PUBLIC . 'wolf/plugins/comment');
// Load the Comment class into the system.
AutoLoader::addFile('Comment', CORE_ROOT . '/plugins/comment/Comment.php');
// Add the plugin's tab and controller
Plugin::addController('comment', __('Comments'));
// Observe the necessary events.
Observer::observe('view_page_edit_plugins', 'comment_display_dropdown');
Observer::observe('page_found', 'comment_save');
Observer::observe('view_backend_list_plugin', 'comment_display_moderatable_count');
if (Plugin::isEnabled('statistics_api')) {
    Observer::observe('stats_comment_after_add', 'StatisticsEvent::registerEvent');
}
Beispiel #19
0
 * Provides function to run Frog CMS with SQLite 3 database.
 *
 * @package frog
 * @subpackage plugin.sqlite3
 *
 * @author Philippe Archambault <*****@*****.**>
 * @version 1.0
 * @since Frog version 0.9.1
 * @license http://www.gnu.org/licenses/gpl.html GPL License
 * @copyright Philippe Archambault, 2008
 */
/**
 *
 */
if (class_exists('PDO', false)) {
    Plugin::setInfos(array('id' => 'sqlite3', 'title' => 'SQLite 3', 'description' => 'Provides function to run Frog CMS with SQLite 3 database.', 'version' => '1.0.0', 'website' => 'http://www.madebyfrog.com/', 'update_url' => 'http://www.madebyfrog.com/plugin-versions.xml'));
    // adding function date_format to sqlite 3 'mysql date_format function'
    if (!function_exists('mysql_date_format_function')) {
        function mysql_function_date_format($date, $format)
        {
            return strftime($format, strtotime($date));
        }
    }
    if (isset($GLOBALS['__FROG_CONN__'])) {
        if ($GLOBALS['__FROG_CONN__']->getAttribute(PDO::ATTR_DRIVER_NAME) == 'sqlite') {
            $GLOBALS['__FROG_CONN__']->sqliteCreateFunction('date_format', 'mysql_function_date_format', 2);
        } else {
            if (Record::getConnection()->getAttribute(Record::ATTR_DRIVER_NAME) == 'sqlite') {
                Record::getConnection()->sqliteCreateFunction('date_format', 'mysql_function_date_format', 2);
            }
        }
Beispiel #20
0
<?php

if (!defined('IN_CMS')) {
    exit;
}
Plugin::setInfos(array('id' => 'adduserdata', 'title' => 'Add user data', 'description' => 'Add data to the user table', 'version' => '0.1.0', 'license' => 'MIT', 'author' => 'svanlaere', 'website' => 'http://www.wolfcms.org/', 'update_url' => 'http://www.wolfcms.org/plugin-versions.xml', 'require_wolf_version' => '0.7.6'));
AutoLoader::addFile('Kint', PLUGINS_ROOT . DS . 'adduserdata/kint/kint.class.php');
Plugin::addController('adduserdata', 'User data', 'admin_view', true);
Observer::observe('user_after_add', 'add_user_key');
function add_user_key($user_name, $user_id)
{
    // some random string
    $random = sha1(microtime() . rand());
    // insert random string into user_key colomn
    Record::update('User', array('user_key' => $random), 'id = :user_id', array(':user_id' => (int) $user_id));
}
Beispiel #21
0
 * Wolf CMS - Content Management Simplified. <http://www.wolfcms.org>
 * Copyright (C) 2009-2011 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 BackupRestore plugin provides administrators with the option of backing
 * up their pages and settings to an XML file.
 *
 * @package Plugins
 * @subpackage backup_restore
 *
 * @author Martijn van der Kleijn <*****@*****.**>
 * @copyright Martijn van der Kleijn, 2009-2011
 * @license http://www.gnu.org/licenses/gpl.html GPLv3 license
 */
if (!defined('BR_VERSION')) {
    define('BR_VERSION', '0.7.3');
}
/**
 *
 * Root location where Comment plugin lives.
 */
define('BACKUPRESTORE_ROOT', URI_PUBLIC . 'wolf/plugins/backup_restore');
Plugin::setInfos(array('id' => 'backup_restore', 'title' => __('Backup Restore'), 'description' => __('Provides administrators with the option of backing up their pages and settings to an XML file.'), 'version' => BR_VERSION, 'license' => 'GPLv3', 'author' => 'Martijn van der Kleijn', 'website' => 'http://www.wolfcms.org/', 'update_url' => 'http://www.wolfcms.org/plugin-versions.xml', 'require_wolf_version' => '0.6.0'));
Plugin::addController('backup_restore', __('Backup Restore'), 'administrator', true);
Beispiel #22
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 #23
0
<?php

$plugin_id = "console";
Plugin::setInfos(array('id' => $plugin_id, 'title' => 'Interactive Console', 'description' => 'Allow interaction with Fresh CMS in a console environment', 'version' => '0.1', 'author' => 'Jules Piccotti', 'website' => 'http://fresh.jules.it/plugins/console'));
//Plugin::addController($plugin_id, __('Console'), array('developer'), false);
//Plugin::addJavascript($plugin_id, "console.js");
 * @package Plugins
 * @subpackage shopping-cart
 *
 * @author Stefan Miller <*****@*****.**>
 * Copyright (C) 2014 Stefan Miller <*****@*****.**>
 * @license http://www.gnu.org/licenses/gpl.html GPLv3 license
 *
 */
/* Security measure */
if (!defined('IN_CMS')) {
    exit;
}
/**
 * Root location where Files plugin lives.
 */
define('SC_FILES_ROOT', PATH_PUBLIC . 'wolf/plugins/shopping_cart');
/**
 * Root location where files get uploaded to as an absolute path.
 */
define('SC_FILES_DIR', CMS_ROOT . DS . 'public');
/**
 * Root location where files get uploaded to as a URL.
 */
define('BASE_SC_FILES_DIR', URL_PUBLIC . 'public');
// DO NOT EDIT AFTER THIS LINE -----------------------------------------------
Plugin::setInfos(array('id' => 'shopping_cart', 'title' => 'Shopping Cart', 'description' => 'A shopping cart inventory administration module', 'version' => '0.0.1', 'author' => 'Stefan Miller', 'website' => 'http://www.artisticdigital.com', 'require_wolf_version' => '0.7.0'));
Plugin::addController('shopping_cart', __('Shopping Cart'), 'admin_view', true);
// Make sure possible hack attempts get registered if the statistics API is available.
if (Plugin::isEnabled('statistics_api')) {
    Observer::observe('stats_shopping_cart_hack_attempt', 'StatisticsEvent::registerEvent');
}
Beispiel #25
0
 * 
 * @author Andrew Waters <*****@*****.**>
 * @copyright Andrew Waters, 2009
 *
 */
/*
 * Contains the following functions for the Front End :
 *
 * ru_register_page()           Use this on the page you want to have for registrations eg mysite.com/register
 * ru_login_page()		Use this on the page you want to have for logging in eg mysite.com/login
 * ru_confirm_page()		This is the page a user clicks through to validate their account
 * ru_auth_required_page()	Users who are not authorised to view the requested page will be redirected here
 * ru_reset_page()		Will allow a user to have an email sent to them with a lnk to reset their password
 * ru_logout()			A page to logout a user and return them to the hompage
 */
Plugin::setInfos(array('id' => 'registered_users', 'title' => 'Registered Users', 'description' => 'Allows you to manage new user registrations on your site.', 'version' => '1.0-dev', 'author' => 'Martijn van der Kleijn', 'require_wolf_version' => '0.7.7'));
// Only when the plugin is enabled
if (Plugin::isEnabled('registered_users')) {
    Plugin::addController('registered_users', 'Registered Users', 'admin_edit', true);
    Observer::observe('view_page_edit_plugins', 'registered_users_access_page_checkbox');
    Observer::observe('page_add_after_save', 'registered_users_add_page_permissions');
    Observer::observe('page_edit_after_save', 'registered_users_edit_page_permissions');
    Observer::observe('page_delete', 'registered_users_delete_page_permissions');
    Observer::observe('page_found', 'registered_users_page_found');
    Behavior::add('login_page', '');
    include 'classes/RegisteredUser.php';
    include 'classes/RUCommon.php';
    include 'observers/RUObservers.php';
    // @todo Switch this stupid stuff to use routes
    function ru_login_page()
    {
Beispiel #26
0
<?php

/*
 * Funky Cache plugin for Wolf CMS. <http://www.wolfcms.org>
 * 
 * Copyright (C) 2012 Martijn van der Kleijn <*****@*****.**>
 * Copyright (c) 2008-2009 Mika Tuupola
 *
 * This file is part of the Funky Cache plugin for Wolf CMS. It is licensed
 * under the MIT license.
 * 
 * For details, see:  http://www.opensource.org/licenses/mit-license.php
 */
//require_once 'models/FunkyCachePage.php';
Plugin::setInfos(array('id' => 'funky_cache', 'title' => 'Funky Cache', 'description' => 'Enables funky caching, making your site ultra fast.', 'version' => '0.4.1', 'license' => 'MIT', 'author' => 'Mika Tuupola & Martijn van der Kleijn', 'require_wolf_version' => '0.7.5+', 'website' => 'http://vanderkleijn.net/'));
AutoLoader::addFolder(PLUGINS_ROOT . '/funky_cache/models');
/* Stuff for backend. */
if (defined('CMS_BACKEND')) {
    AutoLoader::addFolder(dirname(__FILE__) . '/lib');
    Plugin::addController('funky_cache', __('Cache'), "admin_view", true);
    #Observer::observe('page_edit_after_save',   'funky_cache_delete_one');
    Observer::observe('page_edit_after_save', 'funky_cache_delete_all');
    Observer::observe('page_add_after_save', 'funky_cache_delete_all');
    Observer::observe('page_delete', 'funky_cache_delete_all');
    Observer::observe('view_page_edit_plugins', 'funky_cache_show_select');
    Observer::observe('comment_after_add', 'funky_cache_delete_all');
    Observer::observe('comment_after_edit', 'funky_cache_delete_all');
    Observer::observe('comment_after_delete', 'funky_cache_delete_all');
    Observer::observe('comment_after_approve', 'funky_cache_delete_all');
    Observer::observe('comment_after_unapprove', 'funky_cache_delete_all');
    Observer::observe('layout_after_edit', 'funky_cache_delete_all');
Beispiel #27
0
 *
 * 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 skeleton plugin serves as a basic plugin template.
 *
 * This skeleton plugin makes use/provides the following features:
 * - A controller without a tab
 * - Three views (sidebar, documentation and settings)
 * - A documentation page
 * - A sidebar
 * - A settings page (that does nothing except display some text)
 * - Code that gets run when the plugin is enabled (enable.php)
 *
 * Note: to use the settings and documentation pages, you will first need to enable
 * the plugin!
 *
 * @package Plugins
 * @subpackage skeleton
 *
 * @author Martijn van der Kleijn <*****@*****.**>
 * @copyright Martijn van der Kleijn, 2008
 * @license http://www.gnu.org/licenses/gpl.html GPLv3 license
 */
Plugin::setInfos(array('id' => 'skeleton', 'title' => __('Skeleton'), 'description' => __('Provides a basic plugin implementation. (try enabling it!)'), 'version' => '1.1.0', 'license' => 'GPL', 'author' => 'Martijn van der Kleijn', 'website' => 'http://www.wolfcms.org/', 'update_url' => 'http://www.wolfcms.org/plugin-versions.xml', 'require_wolf_version' => '0.5.5'));
Plugin::addController('skeleton', __('Skeleton'), 'admin_view', false);
Beispiel #28
0
 * Gallery is free for non-profit usage. For commercial usage, please contact one of the authors.
 * @package wolf
 * @subpackage plugin.fancy_image_gallery
 *
 * @author Sanja Andjelkovic <*****@*****.**>
 * @author Dejan Andjelkovic <*****@*****.**>
 * @version 0.8.4
 * @for Wolf version 0.6.0 and above
 * @license http://www.gnu.org/licenses/gpl.html GPL License
 * @copyright medio.com.hr, 2009-2010
 */
//security measure
if (!defined('IN_CMS')) {
    exit;
}
Plugin::setInfos(array('id' => 'fancy_image_gallery', 'title' => 'Fancy Image Gallery', 'description' => __('Provides easy to use image gallery with fancybox effect.'), 'version' => '0.8.4', 'license' => 'GPL', 'author' => 'Sanja Andjelkovic', 'website' => 'http://medio.com.hr/', 'update_url' => 'http://www.project79.net/plugin-versions.xml', 'require_wolf_version' => '0.6.0'));
Plugin::addController('fancy_image_gallery', 'Fancy Image Gallery');
// funkcija poziva css i fancybox iz foldera /js i /resources
function fancy_resources()
{
    //putanje
    $jspath = str_replace('?', '', BASE_URL) . 'wolf/plugins/fancy_image_gallery/js/';
    $csspath = str_replace('?', '', BASE_URL) . 'wolf/plugins/fancy_image_gallery/resources/';
    // loadaj fancybox i pripadajuce css fajlove
    echo '<script type="text/javascript" src="', $jspath, 'jquery.fancybox-1.3.0.pack.js"></script>', "\n";
    echo '<link href="', $csspath, 'jquery.fancybox-1.3.0.css" rel="stylesheet" type="text/css">', "\n";
}
// funkcija koja izbacuje samo jednu sliku iz direktorija i pravi link na odabranu galeriju
function fancy_parent($path, $child)
{
    $fullpath = str_replace('?', '', BASE_URL) . 'public/images/' . $path;
Beispiel #29
0
 */
/**
 * Provides Page not found page types.
 *
 * @package Plugins
 * @subpackage page-not-found
 *
 * @author Philippe Archambault <*****@*****.**>
 * @copyright Philippe Archambault, 2008
 * @license http://www.gnu.org/licenses/gpl.html GPLv3 license
 */
/* Security measure */
if (!defined('IN_CMS')) {
    exit;
}
Plugin::setInfos(array('id' => 'page_not_found', 'title' => __('Page not found'), 'description' => __('Provides Page not found page types.'), 'version' => '1.0.0', 'website' => 'http://www.wolfcms.org/', 'update_url' => 'http://www.wolfcms.org/plugin-versions.xml'));
Behavior::add('page_not_found', '');
Observer::observe('page_not_found', 'behavior_page_not_found');
/**
 * Presents browser with a custom 404 page.
 */
function behavior_page_not_found($url)
{
    $page = Page::findByBehaviour('page_not_found');
    if (is_a($page, 'Page')) {
        header("HTTP/1.0 404 Not Found");
        header("Status: 404 Not Found");
        $page->_executeLayout();
        exit;
        // need to exit otherwise true error page will be sent
    }
Beispiel #30
0
<?php

require_once "ImageResize.php";
Plugin::setInfos(array('id' => 'image_resize', 'title' => 'Image Resize', 'description' => 'Allows for dynamic resizing of images.', 'version' => '1.3.1', 'license' => 'GPL 3.0', 'author' => 'Peter Gassner', 'website' => 'http://www.naehrstoff.ch/code/image-resize-for-frog', 'update_url' => 'http://frog.naehrstoff.ch/plugin-versions.xml', 'require_frog_version' => '0.9.4'));
// Listen for page_not_found messages
Observer::observe('page_not_found', 'image_resize_try_resizing');
// Add the controller without showing a tab (fourth option)
Plugin::addController('image_resize', 'Image Resize', '', FALSE);
/**
 * Execute this function on page_not_found.
 * If the request is for an image file,
 * resize the image.
 */
function image_resize_try_resizing()
{
    // Require that visitor be logged in and has
    // permission to create files
    if (!AuthUser::isLoggedIn()) {
        AuthUser::load();
    }
    if (!AuthUser::hasPermission('administrator,developer,editor')) {
        return false;
    }
    // Check that gd library is available
    if (!ImageResize::gd_available()) {
        return false;
    }
    if (preg_match('#\\.(jpe?g|gif|png|wbmp)$#i', CURRENT_URI)) {
        // If requested file appears to be an accepted format, create the new image
        if (image_resize_scale(CURRENT_URI) && !DEBUG) {
            // If Frog isn't debugging, it writes to a file; redirect to it