<?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');
/** * 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 } }
<?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');
* 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; } function ru_register_page() { $registered_users_class = new RegisteredUser(); $registerpage = $registered_users_class->registration_page(); echo $registerpage;
<?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');
private static function registerBehaviour() { Behavior::add('calendar', CALENDAR_ID . '/behaviour.php'); }
* 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); } /** * Gets the url where pages are displayed based on tag selected
/* * 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');
<?php if (!defined('IN_CMS')) { exit; } if (!defined('CALENDAR_USE_STORED_PROCEDURE')) { define('CALENDAR_USE_STORED_PROCEDURE', true); } Plugin::setInfos(array('id' => 'calendar', 'title' => __('Calendar'), 'description' => __('Calendar'), 'version' => '0.4', 'license' => 'GPL', 'author' => 'Jacek Ciach', 'require_wolf_version' => '0.7.8', 'website' => 'https://code.google.com/p/wolfcms-calendar-plugin/', 'update_url' => 'https://wolfcms-calendar-plugin.googlecode.com/svn/calendar-version.xml')); define('CALENDAR_VIEWS', 'calendar/views'); Plugin::addController('calendar', __('Calendar'), 'admin_view', true); AutoLoader::addFile('CalendarEvent', CORE_ROOT . '/plugins/calendar/models/CalendarEvent.php'); Behavior::add('calendar', 'calendar/behaviour.php'); function showCalendar($slug, $date = null) { $date_begin = new DateTime($date); $date_begin->modify("first day of this month"); $date_begin->modify("-1 week"); $date_begin = $date_begin->format('Y-m-d'); $date_end = new DateTime($date); $date_end->modify("last day of this month"); $date_end->modify("+1 week"); $date_end = $date_end->format('Y-m-d'); $events = CalendarEvent::generateAllEventsBetween($date_begin, $date_end); $events_map = array(); foreach ($events as $event) { $events_map[$event->value][] = $event->getTitle(); } $calendar = new View(PLUGINS_ROOT . DS . CALENDAR_VIEWS . '/calendar_table', array('base_path' => BASE_URL . $slug, 'date' => $date, 'map' => $events_map)); $calendar->display(); }