/**
  * 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');
 }
/*
|	pawFramework
|	@file		./index.php
|	@author		svanlaere
|	@version	1.0.0 [1.0.0] - Stable
|
|	@license	X11 / MIT License
|	@copyright	Copyright © 2015 pytesNET
*/
if (!defined("IN_CMS")) {
    exit;
}
// SET PLUGIN INFOS
Plugin::setInfos(array("id" => "themer", "title" => "Themer", "description" => __("A WordPress AdminTheme configuration plugin."), "version" => "1.0.0", "license" => "GPL", "author" => "svanlaere", "website" => "http://www.wolfcms.org/forum/", "require_wolf_version" => "0.7.5", "type" => "backend"));
Plugin::addController("themer", __("Wordpress admin theme"), "admin_view", false);
if (Plugin::isEnabled("themer")) {
    if (!defined("THEMER")) {
        define("THEMER", PLUGINS_ROOT . "/themer");
    }
    if (!defined("THEMER_VIEW")) {
        define("THEMER_VIEW", "themer/views/");
    }
    function themer_customize_admin_theme($path)
    {
        $admin_theme = Setting::get("theme");
        $settings = Plugin::getAllSettings("themer");
        if ($admin_theme == "wordpress-3.8") {
            echo new View(THEMER . DS . "views" . DS . "head", array("color" => $settings["color"], "sidebar_width" => $settings["sidebar_width"]));
        }
        return $path;
Beispiel #3
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 #4
0
 * 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 #5
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
Beispiel #6
0
 * 
 * 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');
    Observer::observe('snippet_after_edit', 'funky_cache_delete_all');
    /* TODO Fix this to work with configurable cache folder. */
    function funky_cache_delete_one($page)
    {
Beispiel #7
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 #8
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 #9
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 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
 */
/* Security measure */
if (!defined('IN_CMS')) {
    exit;
}
Plugin::setInfos(array('id' => 'markdown', 'title' => __('Markdown filter'), 'description' => __('Allows you to use the Markdown text filter (with MarkdownExtra and Smartypants).'), 'version' => '2.0.2', 'website' => 'http://www.wolfcms.org/', 'update_url' => 'http://www.wolfcms.org/plugin-versions.xml'));
Filter::add('markdown', 'markdown/filter_markdown.php');
Plugin::addController('markdown', null, 'admin_view', false);
Plugin::addJavascript('markdown', 'markdown.php');
Beispiel #10
0
<?php

// place where we will upload project files (absolute path)
define('FILES_DIR', FROG_ROOT . '/public');
// place where we will upload project files (html url)
define('BASE_FILES_DIR', URL_PUBLIC . 'public');
// DO NOT EDIT AFTER THIS LINE -----------------------------------------------
Plugin::setInfos(array('id' => 'file_manager', 'title' => 'Files Manager', 'description' => 'Provides interface to manage file from the administration.', 'version' => '1.0', 'website' => 'http://www.madebyfrog.com/'));
Plugin::addController('file_manager', 'Files');
Beispiel #11
0
 * - URI based language hint (for example: http://www.example.com/en/page.html
 * - Preferred language setting of logged in users
 *
 * @package plugins
 * @subpackage multi_lang
 *
 * @author Jules Piccotti <*****@*****.**>
 * @author Martijn van der Kleijn <*****@*****.**>
 * @version 1.0.0
 * @since Fresh CMS version 0.7.0
 * @license http://www.gnu.org/licenses/gpl.html GPL License
 * @copyright Martijn van der Kleijn, 2010
 */
$urilang = false;
Plugin::setInfos(array('id' => 'multi_lang', 'title' => __('Multiple Languages'), 'description' => __('Provides language specific content when available based on user preferences.'), 'version' => '1.0.0', 'license' => 'GPL', 'author' => 'Martijn van der Kleijn', 'website' => 'http://freshcms.jules.it/', 'update_url' => 'http://freshcms.jules.it/plugin-versions.xml', 'require_cms_version' => '0.6.0'));
Plugin::addController('multi_lang', __('Multiple Languages'), 'administrator', false);
// Observe the necessary events.
$style = Plugin::getSetting('style', 'multi_lang');
$source = Plugin::getSetting('langsource', 'multi_lang');
if (false !== $style && $style == 'tab') {
    if ($source == 'uri') {
        Observer::observe('page_requested', 'replaceUri');
        Observer::observe('page_found', 'replaceContentByUri');
    } else {
        Observer::observe('page_found', 'replaceContent');
    }
} else {
    if (false !== $style && $style == 'page') {
        if ($source == 'header' || $source == 'preferences') {
            Observer::observe('page_found', 'replaceContent');
        }
Beispiel #12
0
 * any later version.
 *
 * FrogTags Plugin 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
 * FrogTags Plugin.  If not, see <http://www.gnu.org/licenses/>.
 *
 * FrogTags Plugin was designed for Frog CMS at version 0.9.5.
 */
if (!defined('FrogTagsPluginIncluded')) {
    define('FrogTagsPluginIncluded', true);
    Plugin::setInfos(array('id' => 'frog_tags', 'title' => 'Frog Tags', 'description' => 'Allows defining and using of HTML-like tags - called Frog tags.', 'version' => '0.0.1', 'author' => 'Bastian Harendt', 'website' => 'http://github.com/harendt/frog_tags/', 'update_url' => 'http://github.com/harendt/frog_tags/raw/master/version.xml'));
    Plugin::addController('frog_tags', 'Frog Tags', '', false);
    // default setting (could be changed in FROG_ROOT/config.php)
    if (!defined('ALLOW_PHP')) {
        define('ALLOW_PHP', false);
    }
    include_once 'app/FrogTagsParser.php';
    include_once 'app/StandardTags.php';
    include_once 'app/FrogTagsHacks.php';
    function frog_tags_main($page)
    {
        $content = FrogTagsHacks::get_page_layout($page);
        $parser = new FrogTagsParser($page);
        $content = $parser->parse($content);
        echo $content;
    }
}
Beispiel #13
0
<?php

/*
 * Wolf CMS - Content Management Simplified. <http://www.wolfcms.org>
 * Copyright (C) 2009-2010 Martijn van der Kleijn <*****@*****.**>
 * Copyright (C) 2008 Philippe Archambault <*****@*****.**>
 *
 * 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 Archive plugin provides an Archive pagetype behaving similar to a blog or news archive.
 *
 * @package Plugins
 * @subpackage archive
 *
 * @author Philippe Archambault <*****@*****.**>
 * @copyright Philippe Archambault, 2008
 * @license http://www.gnu.org/licenses/gpl.html GPLv3 license
 */
Plugin::setInfos(array('id' => 'archive', 'title' => __('Archive'), 'description' => __('Provides an Archive pagetype behaving similar to a blog or news archive.'), 'version' => '1.1.0', 'website' => 'http://www.wolfcms.org/', 'update_url' => 'http://www.wolfcms.org/plugin-versions.xml'));
// Add the plugin's tab and controller
Plugin::addController('archive', '', 'admin_view', false);
Behavior::add('archive', 'archive/archive.php');
Behavior::add('archive_day_index', 'archive/archive.php');
Behavior::add('archive_month_index', 'archive/archive.php');
Behavior::add('archive_year_index', 'archive/archive.php');
Beispiel #14
0
<?php

//	Written by Andrew Waters - andrew@band-x.org
//	Please leave credit
/*
 *	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' => '0.9.8', 'require_cms_version' => '0.9.5'));
Plugin::addController('registered_users', 'Registered Users', 'administrator');
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/RegisteredUsers.php';
include 'classes/RUCommon.php';
include 'observers/RUObservers.php';
function ru_login_page()
{
    $registered_users_class = new RegisteredUsers();
    $loginpage = $registered_users_class->login_page();
    echo $loginpage;
}
Beispiel #15
0
<?php

Plugin::setInfos(array('id' => 'comment', 'title' => 'Comments', 'description' => 'Provides interface to add page comments.', 'version' => '1.0', 'license' => 'MIT', 'author' => 'Philippe Archambault', 'website' => 'http://www.madebyfrog.com/', 'require_frog_version' => '0.9.3'));
// AutoLoader class only exists in backend
if (class_exists('AutoLoader')) {
    // adding the new model Comment to the AutoLoader
    AutoLoader::addFile('Comment', CORE_ROOT . '/plugins/comment/Comment.php');
    Plugin::addController('comment', 'Comments');
    Observer::observe('view_page_edit_plugins', 'comment_display_dropdown');
    function comment_display_dropdown(&$page)
    {
        echo '
		<p><label for="page_comment_status">' . __('Comments') . '</label>
		   <select id="page_comment_status" name="page[comment_status]">
		     <option value="' . Comment::NONE . '"' . ($page->comment_status == Comment::NONE ? ' selected="selected"' : '') . '>&#8212; ' . __('none') . ' &#8212;</option>
		     <option value="' . Comment::OPEN . '"' . ($page->comment_status == Comment::OPEN ? ' selected="selected"' : '') . '>' . __('Open') . '</option>
		     <option value="' . Comment::CLOSED . '"' . ($page->comment_status == Comment::CLOSED ? ' selected="selected"' : '') . '>' . __('Closed') . '</option>
		   </select>
		</p>';
    }
} else {
    Observer::observe('page_found', 'comment_save');
    function comments(&$page)
    {
        global $__FROG_CONN__;
        $comments = array();
        $sql = 'SELECT * FROM ' . TABLE_PREFIX . 'comment WHERE is_approved=1 AND page_id=?';
        $stmt = $__FROG_CONN__->prepare($sql);
        $stmt->execute(array($page->id));
        while ($comment = $stmt->fetchObject('Comment')) {
            $comments[] = $comment;
 private static function registerAdminController()
 {
     Plugin::addController('calendar', __('Calendar'), 'admin_view', true);
 }
Beispiel #17
0
 *
 * @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');
}
/**
 * Allows for a dropdown box with comment status on the edit page view in the backend.
 *
 * @param Page $page The object instance for the page that is being edited.
 */
function comment_display_dropdown(&$page)
{
    echo '<p><label for="page_comment_status">' . __('Comments') . '</label><select id="page_comment_status" name="page[comment_status]">';
Beispiel #18
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 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 #19
0
 * 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'), 'backup_restore_view', true);
Beispiel #20
0
 * Tagger Plugin for Wolf CMS <http://thehub.silentworks.co.uk/plugins/frog-cms/tagger.html>
 * Alternate Mirror site <http://www.tbeckett.net/articles/plugins/tagger.xhtml>
 * Copyright (C) 2008 - 2011 Andrew Smith <*****@*****.**>
 * Copyright (C) 2008 - 2011 Tyler Beckett <*****@*****.**>
 * 
 * Dual licensed under the MIT (license/mit-license.txt)
 * and GPL (license/gpl-license.txt) licenses.
 */
// Root location where Tagger plugin lives.
define('TAGGER_URL', URI_PUBLIC . 'wolf/plugins/tagger');
define('TAGGER_ROOT', dirname(__FILE__) . '/');
// Tagger Version
define('TAGGER_VERSION', '1.4.4');
define('TAGGER_NAME', __('Tagger'));
Plugin::setInfos(array('id' => 'tagger', 'title' => TAGGER_NAME, 'description' => __('Add tags to any page and organize your website.'), 'version' => TAGGER_VERSION, 'license' => 'MIT', 'author' => 'Andrew Smith ' . __('and') . ' Tyler Beckett', 'website' => 'http://www.tbeckett.net/articles/plugins/tagger.xhtml', 'update_url' => 'http://www.tbeckett.net/wpv.xhtml', 'require_wolf_version' => '0.7.3'));
Plugin::addController('tagger', TAGGER_NAME);
Behavior::add('tagger', 'tagger/tagger.php');
// Setting error display depending on debug mode or not
error_reporting(DEBUG ? E_ALL | E_STRICT : 0);
/**
 * Tagger Tag Cloud, Count and List new Object
 *
 * @since 1.4.0
*/
class Tags
{
    public function __construct($option = array())
    {
        return self::render($option);
    }
    /**
 * @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 #22
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 #23
0
 * @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;
    $image_dir = CMS_ROOT . '/public/images/' . $path;
Beispiel #24
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 #25
0
	'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');


// Add the plugin's tab and controller
Plugin::addController('banner', __('Banners'),'banner_view,banner_new,banner_edit,banner_delete,banner_settings');

// Load the Comment class into the system.
AutoLoader::addFile('Banner', CORE_ROOT.'/plugins/banner/Banner.php');

//Plugin::addJavascript('banner', 'banner/js/jquery.maskedinput-1.2.2.min.js');

function bannerBySize($div,$width,$height) {

	$imguri = Plugin::getSetting('imguri','banner');
	$cssclass = Plugin::getSetting('cssclass','banner');
	

	if (!$banner = Banner::findBySize($width,$height)) return "<!-- could not load banner -->";
	$banner->dcount++;
	$banner->updated = date('Y-m-d H:i:s');
Beispiel #26
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 #27
0
 *
 */
/*
 * 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()
    {
        $registered_users_class = new RegisteredUser();
        $loginpage = $registered_users_class->login_page();
        echo $loginpage;
Beispiel #28
0
        $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;
    $entry = new DashboardLogEntry($data);
    $entry->save();
}
/* Stuff for backend. */
if (defined('CMS_BACKEND')) {
    AutoLoader::addFolder(dirname(__FILE__) . '/lib');
    Plugin::addController('dashboard', __('Dashboard'), "admin_view", true);
    Observer::observe('page_edit_after_save', 'dashboard_log_page_edit');
    Observer::observe('page_add_after_save', 'dashboard_log_page_add');
    Observer::observe('page_delete', 'dashboard_log_page_delete');
    Observer::observe('layout_after_delete', 'dashboard_log_layout_delete');
    Observer::observe('layout_after_add', 'dashboard_log_layout_add');
    Observer::observe('layout_after_edit', 'dashboard_log_layout_edit');
    Observer::observe('snippet_after_delete', 'dashboard_log_snippet_delete');
    Observer::observe('snippet_after_add', 'dashboard_log_snippet_add');
    Observer::observe('snippet_after_edit', 'dashboard_log_snippet_edit');
    Observer::observe('comment_after_delete', 'dashboard_log_comment_delete');
    Observer::observe('comment_after_add', 'dashboard_log_comment_add');
    Observer::observe('comment_after_edit', 'dashboard_log_comment_edit');
    Observer::observe('comment_after_approve', 'dashboard_log_comment_approve');
    Observer::observe('comment_after_unapprove', 'dashboard_log_comment_unapprove');
    Observer::observe('plugin_after_enable', 'dashboard_log_plugin_enable');
Beispiel #29
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'));
Beispiel #30
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');
}