本文整理汇总了PHP中Plugin::setInfos方法的典型用法代码示例。如果您正苦于以下问题:PHP Plugin::setInfos方法的具体用法?PHP Plugin::setInfos怎么用?PHP Plugin::setInfos使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Plugin
的用法示例。
在下文中一共展示了Plugin::setInfos方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Init
/**
* Registers the plugin and controller in the system as well as the observers.
*/
public static function Init()
{
// Register plugin
Plugin::setInfos(array('id' => self::PLUGIN_ID, 'title' => __('Page Part Forms'), 'description' => __('Allows to create custom page part forms'), 'version' => self::PLUGIN_VERSION, 'license' => 'AGPL', 'author' => 'THE M', 'website' => 'http://github.com/them/frog_page_part_forms/', 'update_url' => 'http://github.com/them/frog_page_part_forms/raw/master/frog-plugins.xml', 'require_frog_version' => '0.9.5'));
// Register controller
Plugin::addController(self::PLUGIN_ID, __('Page Part Forms'), 'administrator, developer', true);
// Add extra scripting for JSON
Plugin::addJavascript(self::PLUGIN_ID, "labs_json.js");
// The callbacks for the backend
Observer::observe('view_page_page_metadata', __CLASS__ . '::callback_view_page_page_metadata');
Observer::observe('view_page_edit_popup', __CLASS__ . '::callback_view_page');
}
示例2: __
*/
/* 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 <julpi@jules.it>
* @author Martijn van der Kleijn <martijn.niji@gmail.com>
* @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);
示例3: __
<?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'));
示例4:
<?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');
示例5: Scholtus
*
* 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";
示例6:
*
* 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 <philippe.archambault@gmail.com>
* @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');
示例7:
/*
* Banner Plugin for WolfCMS <http://www.wolfcms.org>
* Copyright (C) 2011 Shannon Brooks <shannon@brooksworks.com>
*
* 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');
示例8: prettify
<?php
/**
* Prettify - Google Code Syntax Highlighter
* Prettify is free for non-profit usage.
* @package freshcms
* @subpackage plugin.prettify
*
* @author Sanja Andjelkovic <sanja@medio.com.hr>
* @author Dejan Andjelkovic <dejan@medio.com.hr>
* @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";
}
示例9: error_reporting
<?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;
}
示例10: registerInfos
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'));
}
示例11: define
}
/**
* The FileManager allows users to upload and manipulate files.
*
* @package Plugins
* @subpackage file_manager
*
* @author Philippe Archambault <philippe.archambault@gmail.com>
* @author Martijn van der Kleijn <martijn.niji@gmail.com>
* @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');
}
示例12: define
* Copyright (c) 2011 Martijn van der Kleijn <martijn.niji@gmail.com>
* 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;
示例13: __
<?php
/*
* Wolf CMS - Content Management Simplified. <http://www.wolfcms.org>
* Copyright (C) 2009-2010 Martijn van der Kleijn <martijn.niji@gmail.com>
*
* This file is part of Wolf CMS. Wolf CMS is licensed under the GNU GPLv3 license.
* Please see license.txt for the full license text.
*/
/* Security measure */
if (!defined('IN_CMS')) {
exit;
}
/**
* The Markdown plugin allows users edit pages using the markdown syntax.
*
* @package Plugins
* @subpackage markdown
*
* @author Martijn van der Kleijn <martijn.niji@gmail.com>
* @copyright Martijn van der Kleijn, 2010
* @author Philippe Archambault <philippe.archambault@gmail.com>
* @copyright Philippe Archambault, 2008
* @license http://www.gnu.org/licenses/gpl.html GPLv3 License
*/
Plugin::setInfos(array('id' => 'markdown', 'title' => __('Markdown filter'), 'description' => __('Allows you to use the Markdown text filter.'), 'version' => '2.0.1', 'website' => 'http://www.wolfcms.org/', 'update_url' => 'http://www.wolfcms.org/plugin-versions.xml'));
Filter::add('markdown', 'markdown/filter_markdown.php');
Plugin::addController('markdown', __('Markdown'), 'administrator', false);
Plugin::addJavascript('markdown', 'markdown.php');
示例14: Crookston
* Please see the GNU General Public License for more details.
*
* @package frog
* @subpackage plugin.fsearch
*
* @author Andrew Crookston <andrew@casystems.se>
* @version 0.1.0
* @since Frog version 0.9.5
* @license http://www.gnu.org/licenses/gpl.html GPL License
* @copyright Andrew Crookston, 2009
*
* @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;
示例15: hello
<?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');