当前位置: 首页>>代码示例>>PHP>>正文


PHP zp_register_filter函数代码示例

本文整理汇总了PHP中zp_register_filter函数的典型用法代码示例。如果您正苦于以下问题:PHP zp_register_filter函数的具体用法?PHP zp_register_filter怎么用?PHP zp_register_filter使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了zp_register_filter函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: publishZenphoto

 static function publishZenphoto($object, $i)
 {
     global $_admin_approval_error;
     $msg = admin_approval::publish_object($object);
     if ($msg) {
         $_admin_approval_error = $msg;
         zp_register_filter('edit_error', 'admin_approval::post_error');
     }
     return $object;
 }
开发者ID:rb26,项目名称:zenphoto,代码行数:10,代码来源:admin-approval.php

示例2: zp_register_filter

$option_interface = 'security_logger';
if (getOption('logger_log_admin')) {
    zp_register_filter('admin_login_attempt', 'security_logger::adminLoginLogger');
    zp_register_filter('federated_login_attempt', 'security_logger::federatedLoginLogger');
}
if (getOption('logger_log_guests')) {
    zp_register_filter('guest_login_attempt', 'security_logger::guestLoginLogger');
}
zp_register_filter('admin_allow_access', 'security_logger::adminGate');
zp_register_filter('authorization_cookie', 'security_logger::adminCookie', 0);
zp_register_filter('admin_managed_albums_access', 'security_logger::adminAlbumGate');
zp_register_filter('save_user', 'security_logger::UserSave');
zp_register_filter('admin_XSRF_access', 'security_logger::admin_XSRF_access');
zp_register_filter('admin_log_actions', 'security_logger::log_action');
zp_register_filter('log_setup', 'security_logger::log_setup');
zp_register_filter('security_misc', 'security_logger::security_misc');
/**
 * Option handler class
 *
 */
class security_logger
{
    /**
     * class instantiation function
     *
     * @return security_logger
     */
    function __construct()
    {
        global $plugin_is_filter;
        if (OFFSET_PATH == 2) {
开发者ID:rauldobrota,项目名称:zenphoto,代码行数:31,代码来源:security-logger.php

示例3: gettext

 *
 *   So, if for instance, you sometimes enable Zenpage results, sometimes there will be results
 *   for images, albums, pages, and news; and other times there will just be results for
 *   images and albums. In this case the reports will under value the searches done when
 *   Zenpage results were not enabled.
 *
 * @author Stephen Billard (sbillard)
 * @package plugins
 * @subpackage admin
 */
$plugin_is_filter = 2 | CLASS_PLUGIN;
$plugin_description = gettext("Collects and displays search criteria.");
$plugin_author = "Stephen Billard (sbillard)";
$option_interface = 'search_statistics';
zp_register_filter('search_statistics', 'search_statistics::handler');
zp_register_filter('admin_utilities_buttons', 'search_statistics::button');
/**
 * Option handler class
 *
 */
class search_statistics
{
    var $ratingstate;
    /**
     * class instantiation function
     *
     * @return jquery_rating
     */
    function search_statistics()
    {
        setOptionDefault('search_statistics_threshold', 25);
开发者ID:rb26,项目名称:zenphoto,代码行数:31,代码来源:search_statistics.php

示例4: gettext

 * @subpackage users
 */
$plugin_is_filter = 900 | CLASS_PLUGIN;
$plugin_description = gettext('Handles logon from <em>OpenID</em> credential providers.');
$plugin_notice = sprintf(gettext('Run the <a href="%s">OpenID detect</a> script to check compatibility of your server configuration.'), FULLWEBPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/federated_logon/Auth/OpenID_detect.php?test_query=a%26b');
$plugin_author = "Stephen Billard (sbillard)";
$plugin_disable = getOption('federated_logon_detect') ? false : sprintf(gettext('The <a href="%s">OpenID detect</a> script has not been run.'), FULLWEBPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/federated_logon/Auth/OpenID_detect.php?test_query=a%26b');
if ($plugin_disable) {
    enableExtension('federated_logon', 0);
} else {
    $option_interface = 'federated_logon';
    zp_register_filter('theme_head', 'federated_logon::css');
    zp_register_filter('alt_login_handler', 'federated_logon::alt_login_handler');
    zp_register_filter('save_admin_custom_data', 'federated_logon::save_custom');
    zp_register_filter('edit_admin_custom_data', 'federated_logon::edit_admin');
    zp_register_filter('load_theme_script', 'federated_logon::verify');
}
/**
 * Option class
 *
 */
class federated_logon
{
    /**
     * Option instantiation
     */
    function __construct()
    {
        global $_zp_authority;
        setOptionDefault('federated_login_group', 'viewers');
        $mailinglist = $_zp_authority->getAdminEmail(ADMIN_RIGHTS);
开发者ID:rb26,项目名称:zenphoto,代码行数:31,代码来源:federated_logon.php

示例5: printjPlayerPlaylist

						<div class="jp-playlist">
							<ul>
								<li>&nbsp;</li>
							</ul>
						</div>
						<?php 
                echo $this->getPlayerHTMLparts('audio', 'no-solution');
                ?>
					</div>
				</div>

				<?php 
            }
            // if else playlist
        }
        // if no images at all end
    }
}
// jplayer class
// theme function wrapper for user convenience
function printjPlayerPlaylist($option = "playlist", $albumfolder = "")
{
    global $_zp_multimedia_extension;
    $_zp_multimedia_extension->printjPlayerPlaylist($option, $albumfolder);
}
$_zp_multimedia_extension = new jPlayer();
// claim to be the flash player.
zp_register_filter('theme_head', 'jplayer::headJS');
if (getOption('jplayer_playlist')) {
    zp_register_filter('theme_head', 'jplayer::playlistJS');
}
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:31,代码来源:jplayer.php

示例6: sprintf

 * 		Geodata tagged--images which have latitude/longitude information in their EXIF metadata.
 *
 * @author Stephen Billard (sbillard) and Malte Müller (acrylian)
 * @package plugins
 */
$plugin_description = sprintf(gettext('Apply <img src="%1$s/lock.png" alt=""/> over thumbnails of <em>password protected</em> images and albums,
																						 <img src="%1$s/action.png" alt=""/> over thumbnails of <em>un-published</em> albums  images,
																						 <img src="%1$s/new.png" alt=""/> over thumbnails of <em>"new"</em> images and albums,
																						 and <img src="%1$s/GPS.png" alt=""/> over thumbnails of <em>geocoded</em> images'), WEBPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/flag_thumbnail');
$plugin_author = "Stephen Billard (sbillard)";
$plugin_version = '1.4.1';
$option_interface = 'flag_thumbnailOptions';
zp_register_filter('standard_image_thumb_html', 'flag_thumbnail_std_image_thumbs');
zp_register_filter('standard_album_thumb_html', 'flag_thumbnail_std_album_thumbs', 1);
zp_register_filter('custom_album_thumb_html', 'flag_thumbnail_custom_album_thumbs', 1);
zp_register_filter('custom_image_html', 'flag_thumbnail_custom_images', 1);
/**
 * Plugin option handling class
 *
 */
class flag_thumbnailOptions
{
    function flag_thumbnailOptions()
    {
        setOptionDefault('flag_thumbnail_date', 'date');
        setOptionDefault('flag_thumbnail_range', '3');
        setOptionDefault('flag_thumbnail_new_text', 'NEW');
        setOptionDefault('flag_thumbnail_unpublished_text', 'unpub');
        setOptionDefault('flag_thumbnail_locked_text', 'locked');
        setOptionDefault('flag_thumbnail_geodata_text', 'GPS');
        setOptionDefault('flag_thumbnail_use_text', '');
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:31,代码来源:flag_thumbnail.php

示例7: zp_register_filter

}
if (extensionEnabled('zenpage')) {
    if (getOption('multiple_layouts_pages')) {
        zp_register_filter('publish_page_utilities', 'layoutSelector');
        zp_register_filter('new_page', 'saveLayoutSelection');
        zp_register_filter('update_page', 'saveLayoutSelection');
    }
    if (getOption('multiple_layouts_news')) {
        zp_register_filter('publish_article_utilities', 'layoutSelector');
        zp_register_filter('new_article', 'saveLayoutSelection');
        zp_register_filter('update_article', 'saveLayoutSelection');
    }
    if (getOption('multiple_layouts_news_categories')) {
        zp_register_filter('publish_category_utilities', 'layoutSelector');
        zp_register_filter('new_category', 'saveLayoutSelection');
        zp_register_filter('update_category', 'saveLayoutSelection');
    }
}
/**
 * Plugin option handling class
 *
 */
class multipleLayoutOptions
{
    function __construct()
    {
        setOptionDefault('multiple_layouts_images', 0);
        setOptionDefault('multiple_layouts_albums', 0);
        setOptionDefault('multiple_layouts_pages', 1);
        setOptionDefault('multiple_layouts_news', 1);
        setOptionDefault('multiple_layouts_news_categories', 1);
开发者ID:Simounet,项目名称:zenphoto,代码行数:31,代码来源:multiple_layouts.php

示例8: defaultExtension

/**
 * PHP sendmail mailing handler
 *
 * @author Stephen Billard (sbillard)
 *
 * @package plugins
 * @subpackage mail
 */
$plugin_is_filter = defaultExtension(5 | CLASS_PLUGIN);
$plugin_description = gettext("Outgoing mail handler based on the PHP <em>mail</em> facility.");
$plugin_author = "Stephen Billard (sbillard)";
$plugin_disable = zp_has_filter('sendmail') && !extensionEnabled('zenphoto_sendmail') ? sprintf(gettext('Only one Email handler plugin may be enabled. <a href="#%1$s"><code>%1$s</code></a> is already enabled.'), stripSuffix(get_filterScript('sendmail'))) : '';
if ($plugin_disable) {
    enableExtension('zenphoto_sendmail', 0);
} else {
    zp_register_filter('sendmail', 'zenphoto_sendmail');
}
function zenphoto_sendmail($msg, $email_list, $subject, $message, $from_mail, $from_name, $cc_addresses, $replyTo, $html = false)
{
    $headers = sprintf('From: %1$s <%2$s>', $from_name, $from_mail) . "\n";
    if (count($cc_addresses) > 0) {
        $cclist = '';
        foreach ($cc_addresses as $cc_name => $cc_mail) {
            $cclist .= ',' . $cc_mail;
        }
        $headers .= 'Cc: ' . substr($cclist, 1) . "\n";
    }
    if ($replyTo) {
        $headers .= 'Reply-To: ' . array_shift($replyTo) . "\n";
    }
    $result = true;
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:31,代码来源:zenphoto_sendmail.php

示例9: html_encode

        }
        ?>

		<script type="text/javascript" src="<?php 
        echo WEBPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER;
        ?>
/bxslider_thumb_nav/jquery.bxslider.min.js"></script>
		<link rel="stylesheet" type="text/css" href="<?php 
        echo html_encode($css);
        ?>
" />
		<?php 
    }
}
if (!$plugin_disable && !OFFSET_PATH && getOption('bxslider_' . $_zp_gallery->getCurrentTheme() . '_' . stripSuffix($_zp_gallery_page))) {
    zp_register_filter('theme_head', 'bxslider::themeJS');
    /** Prints the jQuery bxslider HTML setup to be replaced by JS
     *
     * @param int $minitems The minimum number of thumbs to be visible always if resized regarding responsiveness.
     * @param int $maxitems The maximum number of thumbs to be visible always if resized regarding responsiveness.
     * @param int $width Width Set to NULL if you want to use the backend plugin options.
     * @param int $height Height Set to NULL if you want to use the backend plugin options.
     * @param int $cropw Crop width Set to NULL if you want to use the backend plugin options.
     * @param int $croph Crop heigth Set to NULL if you want to use the backend plugin options.
     * @param bool $crop TRUE for cropped thumbs, FALSE for un-cropped thumbs. $width and $height then will be used as maxspace. Set to NULL if you want to use the backend plugin options.
     * @param bool $fullimagelink Set to TRUE if you want the thumb link to link to the full image instead of the image page. Set to NULL if you want to use the backend plugin options.
     * @param string $mode 'horizontal','vertical', 'fade'
     * @param int $speed The speed in miliseconds the slides advance when clicked
     */
    function printThumbNav($minitems = NULL, $maxitems = NULL, $width = NULL, $height = NULL, $cropw = NULL, $croph = NULL, $fullimagelink = NULL, $mode = NULL, $speed = NULL)
    {
开发者ID:JoniWeiss,项目名称:JoniWebGirl,代码行数:31,代码来源:bxslider_thumb_nav.php

示例10: gettext

 * There is a naming convention since there is a difference between Zenphoto (gallery) and Zenpag (news/pages) editor configurations.
 * <var>zenphoto-<yourcustomname>.js.php</var>
 * <var>zenpage-<yourcustomname>.js.php</var>
 *
 * @author Malte Müller (acrylian)
 * @package plugins
 * @subpackage admin
 */
$plugin_is_filter = 5 | ADMIN_PLUGIN;
$plugin_description = gettext("Text editor TinyMCE 4.x");
$plugin_author = "Malte Müller (acrylian)";
$option_interface = 'tinymce4Options';
if (!defined('EDITOR_SANITIZE_LEVEL')) {
    define('EDITOR_SANITIZE_LEVEL', 4);
}
zp_register_filter('texteditor_config', 'tinymce4ConfigJS');
/**
 * Plugin option handling class
 *
 */
class tinymce4Options
{
    function tinymce4Options()
    {
        setOptionDefault('tinymce4_zenphoto', 'zenphoto-ribbon.js.php');
        setOptionDefault('tinymce4_zenpage', 'zenpage-slim.js.php');
        if (getOption('zp_plugin_tiny_mce')) {
            setOptionDefault('zp_plugin_tinymce4', 5 | ADMIN_PLUGIN);
            purgeOption('zp_plugin_tiny_mce');
        }
    }
开发者ID:rb26,项目名称:zenphoto,代码行数:31,代码来源:tinymce4.php

示例11: Billard

$plugin_author = "Stephen Billard (sbillard)";
$plugin_version = '1.4.1';
$option_interface = 'security_logger';
if (getOption('logger_log_admin')) {
    zp_register_filter('admin_login_attempt', 'security_logger_adminLoginLogger', 1);
    zp_register_filter('federated_login_attempt', 'security_logger_federatedLoginLogger', 1);
}
if (getOption('logger_log_guests')) {
    zp_register_filter('guest_login_attempt', 'security_logger_guestLoginLogger', 1);
}
zp_register_filter('admin_allow_access', 'security_logger_adminGate', 1);
zp_register_filter('admin_managed_albums_access', 'security_logger_adminAlbumGate', 1);
zp_register_filter('save_user', 'security_logger_UserSave', 1);
zp_register_filter('admin_XSRF_access', 'security_logger_admin_XSRF_access', 1);
zp_register_filter('admin_log_actions', 'security_logger_log_action', 1);
zp_register_filter('log_setup', 'security_logger_log_setup', 1);
/**
 * Option handler class
 *
 */
class security_logger
{
    /**
     * class instantiation function
     *
     * @return security_logger
     */
    function security_logger()
    {
        setOptionDefault('logger_log_guests', 1);
        setOptionDefault('logger_log_admin', 1);
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:31,代码来源:security-logger.php

示例12: gettext

<?php

/**
 * Provides automatic hitcounter counting for Zenphoto objects
 * @author Stephen Billard (sbillard)
 * @package plugins
 */
$plugin_description = gettext('Automatically increments hitcounters on Zenphoto objects viewed by a "visitor".');
$plugin_author = "Stephen Billard (sbillard)";
$plugin_version = '1.4.1';
$option_interface = 'hitcounter_options';
zp_register_filter('load_theme_script', 'hitcounter_load_script');
/**
 * Plugin option handling class
 *
 */
class hitcounter_options
{
    var $defaultbots = 'Teoma,alexa, froogle, Gigabot,inktomi, looksmart, URL_Spider_SQL,Firefly, NationalDirectory,
											Ask Jeeves,TECNOSEEK, InfoSeek, WebFindBot, girafabot, crawler,www.galaxy.com, Googlebot,
											Scooter, Slurp, msnbot, appie, FAST, WebBug, Spade, ZyBorg, rabaz ,Baiduspider, Feedfetcher-Google,
											TechnoratiSnoop, Rankivabot, Mediapartners-Google, Sogou web spider, WebAlta Crawler';
    function hitcounter_options()
    {
        $this->defaultbots = str_replace("\n", " ", $this->defaultbots);
        $this->defaultbots = str_replace("\t", '', $this->defaultbots);
        setOptionDefault('hitcounter_ignoreIPList_enable', 0);
        setOptionDefault('hitcounter_ignoreSearchCrawlers_enable', 0);
        setOptionDefault('hitcounter_ignoreIPList', '');
        setOptionDefault('hitcounter_searchCrawlerList', $this->defaultbots);
    }
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:31,代码来源:hitcounter.php

示例13: gettext

 *
 * @author Stephen Billard (sbillard)
 * 
 * @package plugins
 * @subpackage example
 * @category package
 *
 */
$plugin_is_filter = 9 | THEME_PLUGIN;
$plugin_description = gettext('A plugin to collect and consolidate theme_head scripts and css.');
$plugin_author = "Stephen Billard (sbillard)";
$plugin_version = '1.4.3';
// Note: these are not exact. If some other plugin decides to insert before or after, it's output
// will not get processed.
zp_register_filter('theme_head', 'headConolidator_start', 99999);
zp_register_filter('theme_head', 'headConolidator_end', -99999);
function headConolidator_start()
{
    ob_start();
}
function headConolidator_end()
{
    $data = ob_get_contents();
    ob_end_clean();
    echo '<!-- ' . gettext('beginning of theme_head items') . " -->\n";
    $matches = headConolidator_extract($data, '~<script(?:|\\s*type="text/javascript"|)\\s*src="(.*)"(?:|\\s*type="text/javascript"|)\\s*></script>~msU');
    foreach ($matches[0] as $key => $str) {
        if (strpos($str, 'text/javascript') === false) {
            unset($matches[1][$key]);
        }
    }
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:31,代码来源:headConsolidator.php

示例14: defaultExtension

 * This plugin provides suggestions for tag fields such as the search form. It is
 * automatically enabled for administration fields. The plugin must be enabled for
 * the suggestions to appear on theme pages.
 *
 * Copyright 2015 by Stephen L Billard for use in {@link https://github.com/ZenPhoto20/ZenPhoto20 ZenPhoto20}
 *
 * @author Stephen Billard (sbillard)
 * @package plugins
 * @subpackage theme
 */
$plugin_is_filter = defaultExtension(9 | THEME_PLUGIN);
$plugin_description = gettext("Enables jQuery tag suggestions on the search field.");
$plugin_author = "Stephen Billard";
$option_interface = 'tag_suggest';
zp_register_filter('theme_head', 'tag_suggest::JS');
zp_register_filter('admin_head', 'tag_suggest::JS');
class tag_suggest
{
    function __construct()
    {
        if (OFFSET_PATH == 2) {
            setOptionDefault('tag_suggest_threshold', 1);
        }
    }
    function getOptionsSupported()
    {
        $options = array(gettext('threshold') => array('key' => 'tag_suggest_threshold', 'type' => OPTION_TYPE_NUMBER, 'order' => 1, 'limits' => array('min' => 1), 'desc' => gettext('Only tags with at least this number of uses will be suggested.')));
        return $options;
    }
    static function JS()
    {
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:31,代码来源:tag_suggest.php

示例15: gettext

 * </ul>
 *
 * @author Malte Müller (acrylian)
 * @package plugins
 * @subpackage media
 */
$plugin_is_filter = 9 | THEME_PLUGIN | ADMIN_PLUGIN;
$plugin_description = gettext("Slideshow plugin based on the Cycle2 jQuery plugin.");
$plugin_author = "Malte Müller (acrylian)";
$plugin_disable = extensionEnabled('slideshow') ? sprintf(gettext('Only one slideshow plugin may be enabled. <a href="#%1$s"><code>%1$s</code></a> is already enabled.'), 'slideshow') : '';
$option_interface = 'cycle';
global $_zp_gallery, $_zp_gallery_page;
if ($_zp_gallery_page == 'slideshow.php' && getOption('cycle-slideshow_mode') == 'cycle' || getOption('cycle_' . $_zp_gallery->getCurrentTheme() . '_' . stripSuffix($_zp_gallery_page))) {
    zp_register_filter('theme_head', 'cycle::cycleJS');
}
zp_register_filter('content_macro', 'cycle::macro');
/**
 * Plugin option handling class
 *
 */
class cycle
{
    function __construct()
    {
        global $_zp_gallery;
        if (OFFSET_PATH == 2) {
            //normal slideshow
            setOptionDefault('cycle-slideshow_width', '595');
            setOptionDefault('cycle-slideshow_height', '595');
            setOptionDefault('cycle-slideshow_mode', 'cycle');
            setOptionDefault('cycle-slideshow_effect', 'fade');
开发者ID:rb26,项目名称:zenphoto,代码行数:31,代码来源:slideshow2.php


注:本文中的zp_register_filter函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。