• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP zp_register_filter函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: isTablet

    {
        if (getOption('mobileTheme_test')) {
            return true;
        }
        return parent::isMobile();
    }
    /**
     * (non-PHPdoc)
     * @see Mobile_Detect::isTablet()
     */
    function isTablet($userAgent = NULL, $httpHeaders = NULL)
    {
        if (getOption('mobileTheme_test') == 'tablet') {
            return true;
        }
        return parent::isTablet();
    }
}
if (isset($_GET['mobileTheme'])) {
    switch ($_GET['mobileTheme']) {
        case 'on':
            zp_setCookie('mobileTheme_disable', 0);
            break;
        case 'off':
            zp_setCookie('mobileTheme_disable', 1);
            break;
    }
}
if (!zp_getCookie('mobileTheme_disable')) {
    zp_register_filter('setupTheme', 'mobileTheme::theme');
}
开发者ID:Simounet,项目名称:zenphoto,代码行数:31,代码来源:mobileTheme.php


示例17: getHTMLMetaData

    /**
     * Prints html meta data to be used in the <head> section of a page
     *
     */
    static function getHTMLMetaData()
    {
        global $_zp_gallery, $_zp_galley_page, $_zp_current_album, $_zp_current_image, $_zp_current_zenpage_news, $_zp_current_zenpage_page, $_zp_gallery_page, $_zp_current_category, $_zp_authority, $_zp_conf_vars, $_myFavorites, $htmlmetatags_need_cache, $_zp_page;
        zp_register_filter('image_processor_uri', 'htmlmetatags::ipURI');
        $host = sanitize("http://" . $_SERVER['HTTP_HOST']);
        $url = $host . getRequestURI();
        // Convert locale shorttag to allowed html meta format
        $locale = str_replace("_", "-", getUserLocale());
        $canonicalurl = '';
        // generate page title, get date
        $pagetitle = "";
        // for gallery index setup below switch
        $date = strftime(DATE_FORMAT);
        // if we don't have a item date use current date
        $desc = getBareGalleryDesc();
        $thumb = '';
        if (getOption('htmlmeta_sitelogo')) {
            $thumb = getOption('htmlmeta_sitelogo');
        }
        if (getOption('htmlmeta_og-image') || getOption('htmlmeta_twittercard')) {
            $ogimage_width = getOption('htmlmeta_ogimage_width');
            $ogimage_height = getOption('htmlmeta_ogimage_height');
            if (empty($ogimage_width)) {
                $ogimage_width = 1280;
            }
            if (empty($ogimage_height)) {
                $ogimage_height = 900;
            }
        }
        $type = 'article';
        switch ($_zp_gallery_page) {
            case 'index.php':
                $desc = getBareGalleryDesc();
                //$canonicalurl = $host . getGalleryIndexURL();
                $canonicalurl = $host . getPageNumURL($_zp_page);
                $type = 'website';
                break;
            case 'album.php':
                $pagetitle = getBareAlbumTitle() . " - ";
                $date = getAlbumDate();
                $desc = getBareAlbumDesc();
                $canonicalurl = $host . getPageNumURL($_zp_page);
                if (getOption('htmlmeta_og-image') || getOption('htmlmeta_twittercard')) {
                    $thumbimg = $_zp_current_album->getAlbumThumbImage();
                    getMaxSpaceContainer($ogimage_width, $ogimage_height, $thumbimg, false);
                    $thumb = $host . html_encode(pathurlencode($thumbimg->getCustomImage(NULL, $ogimage_width, $ogimage_height, NULL, NULL, NULL, NULL, false, NULL)));
                }
                break;
            case 'image.php':
                $pagetitle = getBareImageTitle() . " (" . getBareAlbumTitle() . ") - ";
                $date = getImageDate();
                $desc = getBareImageDesc();
                $canonicalurl = $host . getImageURL();
                if (getOption('htmlmeta_og-image') || getOption('htmlmeta_twittercard')) {
                    $thumb = $host . html_encode(pathurlencode(getCustomSizedImageMaxSpace($ogimage_width, $ogimage_height)));
                }
                break;
            case 'news.php':
                if (function_exists("is_NewsArticle")) {
                    if (is_NewsArticle()) {
                        $pagetitle = getBareNewsTitle() . " - ";
                        $date = getNewsDate();
                        $desc = trim(getBare(getNewsContent()));
                        $canonicalurl = $host . $_zp_current_zenpage_news->getLink();
                    } else {
                        if (is_NewsCategory()) {
                            $pagetitle = $_zp_current_category->getTitlelink() . " - ";
                            $date = strftime(DATE_FORMAT);
                            $desc = trim(getBare($_zp_current_category->getDesc()));
                            $canonicalurl = $host . $_zp_current_category->getLink();
                            $type = 'category';
                        } else {
                            $pagetitle = gettext('News') . " - ";
                            $desc = '';
                            $canonicalurl = $host . getNewsIndexURL();
                            $type = 'website';
                        }
                    }
                    if ($_zp_page != 1) {
                        $canonicalurl .= '/' . $_zp_page;
                    }
                }
                break;
            case 'pages.php':
                $pagetitle = getBarePageTitle() . " - ";
                $date = getPageDate();
                $desc = trim(getBare(getPageContent()));
                $canonicalurl = $host . $_zp_current_zenpage_page->getLink();
                break;
            default:
                // for all other possible static custom pages
                $custompage = stripSuffix($_zp_gallery_page);
                $standard = array('contact' => gettext('Contact'), 'register' => gettext('Register'), 'search' => gettext('Search'), 'archive' => gettext('Archive view'), 'password' => gettext('Password required'));
                if (is_object($_myFavorites)) {
                    $standard['favorites'] = gettext('My favorites');
                }
//.........这里部分代码省略.........
开发者ID:rb26,项目名称:zenphoto,代码行数:101,代码来源:html_meta_tags.php


示例18: gettext

/**
 *
 * This imports Wordpress pages, posts, categories and comments to Zenpage
 *
 * NOTE: Requires MySQLi enabled as the database handler.
 *
 * @author Malte Müller (acrylian)
 * @package plugins
 * @subpackage admin
 */
if (defined('OFFSET_PATH')) {
    $plugin_is_filter = 5 | ADMIN_PLUGIN;
    $plugin_description = gettext("Import Wordpress pages, posts, categories, and comments to Zenpage.");
    $plugin_author = "Malte Müller (acrylian)";
    zp_register_filter('admin_utilities_buttons', 'wordpress_import_button');
    function wordpress_import_button($buttons)
    {
        $buttons[] = array('category' => gettext('Admin'), 'enable' => true, 'button_text' => gettext('Wordpress Importer'), 'formname' => 'wordpress_import.php', 'action' => FULLWEBPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/wordpress_import.php', 'icon' => WEBPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/wordpress_import/wpmini-blue.png', 'title' => gettext('An importer for Wordpress posts and pages to Zenpage.'), 'alt' => '', 'hidden' => '', 'rights' => ADMIN_RIGHTS);
        return $buttons;
    }
} else {
    define('OFFSET_PATH', 3);
    require_once dirname(dirname(__FILE__)) . '/admin-globals.php';
    if (extensionEnabled('zenpage')) {
        require_once dirname(dirname(__FILE__)) . '/' . PLUGIN_FOLDER . '/zenpage/admin-functions.php';
    }
    admin_securityChecks(NULL, currentRelativeURL());
    if (isset($_REQUEST['dbname']) || isset($_REQUEST['dbuser']) || isset($_REQUEST['dbpass']) || isset($_REQUEST['dbhost'])) {
        XSRFdefender('wordpress');
    }
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:30,代码来源:wordpress_import.php


示例19: gettext

 * @subpackage users
 */
// force UTF-8 Ø
$plugin_is_filter = 5 | CLASS_PLUGIN;
$plugin_description = gettext("Provides management of users based on when they were created.");
$plugin_author = "Stephen Billard (sbillard)";
$option_interface = 'user_expiry';
zp_register_filter('admin_tabs', 'user_expiry::admin_tabs', 0);
zp_register_filter('authorization_cookie', 'user_expiry::checkcookie');
zp_register_filter('admin_login_attempt', 'user_expiry::checklogon');
zp_register_filter('federated_login_attempt', 'user_expiry::checklogon');
zp_register_filter('edit_admin_custom_data', 'user_expiry::edit_admin', 999);
zp_register_filter('load_theme_script', 'user_expiry::reverify', 999);
zp_register_filter('admin_note', 'user_expiry::notify', 999);
zp_register_filter('can_set_user_password', 'user_expiry::passwordAllowed');
zp_register_filter('remove_user', 'user_expiry::cleanup');
/**
 * Option handler class
 *
 */
class user_expiry
{
    /**
     * class instantiation function
     *
     */
    function __construct()
    {
        setOptionDefault('user_expiry_interval', 365);
        setOptionDefault('user_expiry_warn_interval', 7);
        setOptionDefault('user_expiry_auto_renew', 0);
开发者ID:Simounet,项目名称:zenphoto,代码行数:31,代码来源:user-expiry.php


示例20: reconfigureAction

/**
 *
 * Executes the configuration change code
 */
function reconfigureAction($mandatory)
{
    list($diff, $needs) = checkSignature($mandatory);
    $diffkeys = array_keys($diff);
    if ($mandatory) {
        if (isset($_GET['rss']) || isset($_GET['external'])) {
            if (isset($_GET['rss']) && file_exists(SERVERPATH . '/' . DATA_FOLDER . '/rss-closed.xml')) {
                $xml = file_get_contents(SERVERPATH . '/' . DATA_FOLDER . '/rss-closed.xml');
                $xml = preg_replace('~<pubDate>(.*)</pubDate>~', '<pubDate>' . date("r", time()) . '</pubDate>', $xml);
                echo $xml;
            }
            exit;
            //	can't really run setup from an RSS feed.
        }
        if (empty($needs)) {
            $dir = str_replace('\\', '/', dirname($_SERVER['SCRIPT_NAME']));
            $p = strpos($dir, ZENFOLDER);
            if ($p !== false) {
                $dir = substr($dir, 0, $p);
            }
            if (OFFSET_PATH) {
                $where = 'admin';
            } else {
                $where = 'gallery';
            }
            $dir = rtrim($dir, '/');
            $location = "http://" . $_SERVER['HTTP_HOST'] . $dir . "/" . ZENFOLDER . "/setup/index.php?autorun={$where}";
            header("Location: {$location}");
            exitZP();
        } else {
            global $subtabs, $zenphoto_tabs, $main_tab_space, $_zp_admin_tab, $_zp_invisible_execute, $_zp_gallery;
            $_zp_invisible_execute = 1;
            require_once SERVERPATH . '/' . ZENFOLDER . '/admin-globals.php';
            header('Last-Modified: ' . ZP_LAST_MODIFIED);
            header('Content-Type: text/html; charset=UTF-8');
            ?>
			<!DOCTYPE html>
			<html xmlns="http://www.w3.org/1999/xhtml">
				<head>
					<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
					<link rel="stylesheet" href="<?php 
            echo WEBPATH . '/' . ZENFOLDER;
            ?>
/admin.css" type="text/css" />
					<?php 
            reconfigureCS();
            ?>
				</head>
				<body>
					<?php 
            if ($_zp_gallery) {
                printLogoAndLinks();
            }
            ?>
					<div id="main">
						<?php 
            if ($_zp_gallery) {
                printTabs();
            }
            ?>
						<div id="content">
							<h1><?php 
            echo gettext('Setup request');
            ?>
</h1>
							<div class="tabbox">
								<?php 
            reconfigurePage($diff, $needs, $mandatory);
            ?>
							</div>
						</div>
					</div>
				</body>
			</html>
			<?php 
            exitZP();
        }
    } else {
        if (!empty($diff)) {
            if (function_exists('zp_register_filter') && zp_loggedin(ADMIN_RIGHTS)) {
                //	no point in telling someone who can't do anything about it
                zp_register_filter('admin_note', 'signatureChange');
                zp_register_filter('admin_head', 'reconfigureCS');
                zp_register_filter('theme_head', 'reconfigureCS');
                zp_register_filter('theme_body_open', 'signatureChange');
            }
        }
    }
}
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:93,代码来源:reconfigure.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP zp_setCookie函数代码示例发布时间:2022-05-23
下一篇:
PHP zp_mail函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap