コード例 #1
0
ファイル: admin-approval.php プロジェクト: rb26/zenphoto
 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;
 }
コード例 #2
0
$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) {
コード例 #3
0
ファイル: search_statistics.php プロジェクト: rb26/zenphoto
 *
 *   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);
コード例 #4
0
ファイル: federated_logon.php プロジェクト: rb26/zenphoto
 * @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);
コード例 #5
0
ファイル: jplayer.php プロジェクト: ariep/ZenPhoto20-DEV
						<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');
}
コード例 #6
0
 * 		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', '');
コード例 #7
0
}
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);
コード例 #8
0
/**
 * 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;
コード例 #9
0
        }
        ?>

		<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)
    {
コード例 #10
0
ファイル: tinymce4.php プロジェクト: rb26/zenphoto
 * 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');
        }
    }
コード例 #11
0
$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);
コード例 #12
0
<?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);
    }
コード例 #13
0
 *
 * @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]);
        }
    }
コード例 #14
0
ファイル: tag_suggest.php プロジェクト: ariep/ZenPhoto20-DEV
 * 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()
    {
コード例 #15
0
ファイル: slideshow2.php プロジェクト: rb26/zenphoto
 * </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');
コード例 #16
0
ファイル: mobileTheme.php プロジェクト: Simounet/zenphoto
    {
        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');
}
コード例 #17
0
ファイル: html_meta_tags.php プロジェクト: rb26/zenphoto
    /**
     * 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');
                }
                if (array_key_exists($custompage, $standard)) {
                    $pagetitle = $standard[$custompage] . " - ";
                } else {
                    $pagetitle = $custompage . " - ";
                }
                $desc = '';
                $canonicalurl = $host . getCustomPageURL($custompage);
                if ($_zp_page != 1) {
                    $canonicalurl .= '/' . $_zp_page;
                }
                break;
        }
        // shorten desc to the allowed 200 characters if necesssary.
        $desc = html_encode(trim(substr(getBare($desc), 0, 160)));
        $pagetitle = $pagetitle . getBareGalleryTitle();
        // get master admin
        $admin = $_zp_authority->getMasterUser();
        $author = $admin->getName();
        $meta = '';
        if (getOption('htmlmeta_http-equiv-cache-control')) {
            $meta .= '<meta http-equiv="Cache-control" content="' . getOption("htmlmeta_cache_control") . '">' . "\n";
        }
        if (getOption('htmlmeta_http-equiv-pragma')) {
            $meta .= '<meta http-equiv="pragma" content="' . getOption("htmlmeta_pragma") . '">' . "\n";
        }
        if (getOption('htmlmeta_name-keywords')) {
            $meta .= '<meta name="keywords" content="' . htmlmetatags::getMetaKeywords() . '">' . "\n";
        }
        if (getOption('htmlmeta_name-description')) {
            $meta .= '<meta name="description" content="' . $desc . '">' . "\n";
        }
        if (getOption('htmlmeta_name-page-topic')) {
            $meta .= '<meta name="page-topic" content="' . $desc . '">' . "\n";
        }
        if (getOption('htmlmeta_name-robots')) {
            $meta .= '<meta name="robots" content="' . getOption("htmlmeta_robots") . '">' . "\n";
        }
        if (getOption('htmlmeta_name-publisher')) {
            $meta .= '<meta name="publisher" content="' . FULLWEBPATH . '">' . "\n";
        }
        if (getOption('htmlmeta_name-creator')) {
            $meta .= '<meta name="creator" content="' . FULLWEBPATH . '">' . "\n";
        }
        if (getOption('htmlmeta_name-author')) {
            $meta .= '<meta name="author" content="' . $author . '">' . "\n";
        }
        if (getOption('htmlmeta_name-copyright')) {
            $meta .= '<meta name="copyright" content=" (c) ' . FULLWEBPATH . ' - ' . $author . '">' . "\n";
        }
        if (getOption('htmlmeta_name-rights')) {
            $meta .= '<meta name="rights" content="' . $author . '">' . "\n";
        }
        if (getOption('htmlmeta_name-generator')) {
            $meta .= '<meta name="generator" content="Zenphoto ' . ZENPHOTO_VERSION . '">' . "\n";
        }
        if (getOption('htmlmeta_name-revisit-after')) {
            $meta .= '<meta name="revisit-after" content="' . getOption("htmlmeta_revisit_after") . '">' . "\n";
        }
        if (getOption('htmlmeta_name-expires')) {
            $expires = getOption("htmlmeta_expires");
            if ($expires == (int) $expires) {
                $expires = preg_replace('|\\s\\-\\d+|', '', date('r', time() + $expires)) . ' GMT';
            }
            $meta .= '<meta name="expires" content="' . $expires . '">' . "\n";
        }
        // OpenGraph meta
        if (getOption('htmlmeta_og-title')) {
            $meta .= '<meta property="og:title" content="' . $pagetitle . '">' . "\n";
        }
        if (getOption('htmlmeta_og-image') && !empty($thumb)) {
            $meta .= '<meta property="og:image" content="' . $thumb . '">' . "\n";
        }
        if (getOption('htmlmeta_og-description')) {
            $meta .= '<meta property="og:description" content="' . $desc . '">' . "\n";
        }
        if (getOption('htmlmeta_og-url')) {
            $meta .= '<meta property="og:url" content="' . html_encode($url) . '">' . "\n";
        }
        if (getOption('htmlmeta_og-type')) {
            $meta .= '<meta property="og:type" content="' . $type . '">' . "\n";
        }
        // Social network extras
        if (getOption('htmlmeta_name-pinterest')) {
            $meta .= '<meta name="pinterest" content="nopin">' . "\n";
        }
        // dissalow users to pin images on Pinterest
        // Twitter card
        $twittername = getOption('htmlmeta_twittername');
        if (getOption('htmlmeta_twittercard') || !empty($twittername)) {
            $meta .= '<meta property="twitter:creator" content="' . $twittername . '">' . "\n";
            $meta .= '<meta property="twitter:site" content="' . $twittername . '">' . "\n";
            $meta .= '<meta property="twitter:card" content="summary">' . "\n";
            $meta .= '<meta property="twitter:title" content="' . $pagetitle . '">' . "\n";
            $meta .= '<meta property="twitter:description" content="' . $desc . '">' . "\n";
            if (!empty($thumb)) {
                $meta .= '<meta property="twitter:image" content="' . $thumb . '">' . "\n";
            }
        }
        // Canonical url
        if (getOption('htmlmeta_canonical-url')) {
            $meta .= '<link rel="canonical" href="' . $canonicalurl . '">' . "\n";
            if (METATAG_LOCALE_TYPE) {
                $langs = generateLanguageList();
                if (count($langs) != 1) {
                    foreach ($langs as $text => $lang) {
                        $langcheck = zpFunctions::getLanguageText($lang, '-');
                        //	for hreflang we need en-US
                        if ($langcheck != $locale) {
                            switch (METATAG_LOCALE_TYPE) {
                                case 1:
                                    $altlink = seo_locale::localePath(true, $lang);
                                    break;
                                case 2:
                                    $altlink = dynamic_locale::fullHostPath($lang);
                                    break;
                            }
                            switch ($_zp_gallery_page) {
                                case 'index.php':
                                    $altlink .= '/';
                                    break;
                                case 'gallery.php':
                                    $altlink .= '/' . _PAGE_ . '/gallery';
                                    break;
                                case 'album.php':
                                    $altlink .= '/' . html_encode($_zp_current_album->name) . '/';
                                    break;
                                case 'image.php':
                                    $altlink .= '/' . html_encode($_zp_current_album->name) . '/' . html_encode($_zp_current_image->filename) . IM_SUFFIX;
                                    break;
                                case 'news.php':
                                    if (function_exists("is_NewsArticle")) {
                                        if (is_NewsArticle()) {
                                            $altlink .= '/' . _NEWS_ . '/' . html_encode($_zp_current_zenpage_news->getTitlelink());
                                        } else {
                                            if (is_NewsCategory()) {
                                                $altlink .= '/' . _NEWS_ . '/' . html_encode($_zp_current_category->getTitlelink());
                                            } else {
                                                $altlink .= '/' . _NEWS_;
                                            }
                                        }
                                    }
                                    break;
                                case 'pages.php':
                                    $altlink .= '/' . _PAGES_ . '/' . html_encode($_zp_current_zenpage_page->getTitlelink());
                                    break;
                                case 'archive.php':
                                    $altlink .= '/' . _ARCHIVE_;
                                    break;
                                case 'search.php':
                                    $altlink .= '/' . _SEARCH_ . '/';
                                    break;
                                case 'contact.php':
                                    $altlink .= '/' . _CONTACT_ . '/';
                                    break;
                                default:
                                    // for all other possible none standard custom pages
                                    $altlink .= '/' . _PAGE_ . '/' . html_encode($pagetitle);
                                    break;
                            }
                            // switch
                            //append page number if needed
                            switch ($_zp_gallery_page) {
                                case 'index.php':
                                case 'album.php':
                                    if ($_zp_page != 1) {
                                        $altlink .= _PAGE_ . '/' . $_zp_page . '/';
                                    }
                                    break;
                                case 'gallery.php':
                                case 'news.php':
                                    if ($_zp_page != 1) {
                                        $altlink .= '/' . $_zp_page;
                                    }
                                    break;
                            }
                            $meta .= '<link rel="alternate" hreflang="' . $langcheck . '" href="' . $altlink . '">' . "\n";
                        }
                        // if lang
                    }
                    // foreach
                }
                // if count
            }
            // if option
        }
        // if canonical
        if (!empty($htmlmetatags_need_cache)) {
            $meta .= '<script type="text/javascript">' . "\n";
            $meta .= 'var caches = ["' . implode('","', $htmlmetatags_need_cache) . '"];' . "\n";
            $meta .= '
					window.onload = function() {
						var index,value;
						for (index in caches) {
								value = caches[index];
								$.ajax({
									cache: false,
									type: "GET",
									url: value
								});
						}
					}
					';
            $meta .= '</script>' . "\n";
        }
        zp_remove_filter('image_processor_uri', 'htmlmetatags::ipURI');
        echo $meta;
    }
コード例 #18
0
/**
 *
 * 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');
    }
コード例 #19
0
ファイル: user-expiry.php プロジェクト: Simounet/zenphoto
 * @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);
コード例 #20
0
ファイル: reconfigure.php プロジェクト: ariep/ZenPhoto20-DEV
/**
 *
 * 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');
            }
        }
    }
}
コード例 #21
0
ファイル: slideshow.php プロジェクト: rb26/zenphoto
 * </ul>
 *
 * @author Malte Müller (acrylian), Stephen Billard (sbillard), Don Peterson (dpeterson)
 * @package plugins
 * @subpackage media
 */
$plugin_is_filter = 9 | THEME_PLUGIN | ADMIN_PLUGIN;
$plugin_description = gettext("Adds a theme function to call a slideshow either based on jQuery (default) or Colorbox.");
$plugin_author = "Malte Müller (acrylian), Stephen Billard (sbillard), Don Peterson (dpeterson)";
$plugin_disable = extensionEnabled('slideshow2') ? sprintf(gettext('Only one slideshow plugin may be enabled. <a href="#%1$s"><code>%1$s</code></a> is already enabled.'), 'slideshow2') : '';
$option_interface = 'slideshow';
global $_zp_gallery, $_zp_gallery_page;
if ($_zp_gallery_page == 'slideshow.php' || getOption('slideshow_' . $_zp_gallery->getCurrentTheme() . '_' . stripSuffix($_zp_gallery_page))) {
    zp_register_filter('theme_head', 'slideshow::header_js');
}
zp_register_filter('content_macro', 'slideshow::macro');
//if (!OFFSET_PATH) {
//}
/**
 * slideshow
 *
 */
class slideshow
{
    function slideshow()
    {
        global $_zp_gallery;
        if (OFFSET_PATH == 2) {
            //setOptionDefault('slideshow_size', '595');
            setOptionDefault('slideshow_width', '595');
            setOptionDefault('slideshow_height', '595');
コード例 #22
0
ファイル: functions.php プロジェクト: rb26/zenphoto
<?php

// force UTF-8 Ø
zp_register_filter('themeSwitcher_head', 'switcher_head');
zp_register_filter('themeSwitcher_Controllink', 'switcher_controllink');
zp_register_filter('theme_head', 'EF_head', 0);
zp_register_filter('load_theme_script', 'fourOhFour');
define('ALBUM_THMB_WIDTH', 170);
define('ALBUM_THUMB_HEIGHT', 80);
$cwd = getcwd();
chdir(dirname(__FILE__));
$persona = safe_glob('*', GLOB_ONLYDIR);
chdir($cwd);
$personalities = array();
foreach ($persona as $personality) {
    if (file_exists(SERVERPATH . '/' . THEMEFOLDER . '/effervescence_plus/' . $personality . '/functions.php')) {
        $personalities[ucfirst(str_replace('_', ' ', $personality))] = $personality;
    }
}
$personality = strtolower(getOption('effervescence_personality'));
if (!in_array($personality, $personalities)) {
    $persona = $personalities;
    $personality = array_shift($persona);
}
chdir(SERVERPATH . "/themes/" . basename(dirname(__FILE__)) . "/styles");
$filelist = safe_glob('*.txt');
$themecolors = array();
foreach ($filelist as $file) {
    $themecolors[basename($file)] = stripSuffix(filesystemToInternal($file));
}
chdir($cwd);
コード例 #23
0
ファイル: rating.php プロジェクト: ariep/ZenPhoto20-DEV
    }
}
$plugin_is_filter = 5 | ADMIN_PLUGIN | THEME_PLUGIN;
$plugin_description = gettext("Adds several theme functions to enable images, album, news, or pages to be rated by users. ");
$plugin_author = "Stephen Billard (sbillard) and Malte Müller (acrylian)";
$option_interface = 'jquery_rating';
zp_register_filter('edit_album_utilities', 'jquery_rating::optionVoteStatus');
zp_register_filter('save_album_utilities_data', 'jquery_rating::optionVoteStatusSave');
zp_register_filter('admin_utilities_buttons', 'jquery_rating::rating_purgebutton');
if (getOption('rating_image_individual_control')) {
    zp_register_filter('edit_image_utilities', 'jquery_rating::optionVoteStatus');
    zp_register_filter('save_image_utilities_data', 'jquery_rating::optionVoteStatusSave');
}
// register the scripts needed
if (in_context(ZP_INDEX)) {
    zp_register_filter('theme_head', 'jquery_rating::ratingJS');
}
/**
 * Option handler class
 *
 */
class jquery_rating
{
    var $ratingstate;
    /**
     * class instantiation function
     *
     * @return jquery_rating
     */
    function __construct()
    {
コード例 #24
0
ファイル: googleMap.php プロジェクト: ariep/ZenPhoto20-DEV
 * @author Stephen Billard (sbillard) & Vincent Bourganel (vincent3569)
 *
 * @package plugins
 * @subpackage theme
 *
 */
$plugin_is_filter = 5 | THEME_PLUGIN;
$plugin_description = gettext('Display Google Maps based on <em>latitude</em> and <em>longitude</em> metadata in the images.');
$plugin_notice = sprintf(gettext('<strong>Note</strong>: Google does place limits on the use of its <a href="%s"><em>Maps API</em></a>. Please review these to be sure your site is in compliance.'), 'http://googlegeodevelopers.blogspot.com/2011/10/introduction-of-usage-limits-to-maps.html');
$plugin_author = 'Stephen Billard (sbillard) & Vincent Bourganel (vincent3569)';
$option_interface = 'GoogleMap';
if (isset($_zp_gallery_page) && $_zp_gallery_page != 'index.php') {
    if (getOption('gmap_sessions')) {
        zp_session_start();
    }
    zp_register_filter('theme_head', 'GoogleMap::js');
}
/**
 * googleMap
 *
 */
class GoogleMap
{
    function __construct()
    {
        if (OFFSET_PATH == 2) {
            setOptionDefault('gmap_width', 595);
            setOptionDefault('gmap_height', 300);
            setOptionDefault('gmap_map_roadmap', 1);
            setOptionDefault('gmap_map_hybrid', 1);
            setOptionDefault('gmap_map_satellite', 1);
コード例 #25
0
ファイル: piwik.php プロジェクト: Imagenomad/Unsupported
 *  Piwik is a downloadable, open source (GPL licensed) real time web analytics software program.
 *  It provides you with detailed reports on your website visitors:
 *  the search engines and keywords they used, the language they speak, your popular pages... and so much more.
 *
 *  Piwik aims to be an open source alternative to Google Analytics.
 *
 * @package plugins
 * @subpackage seo
 */
$plugin_is_filter = 9 | THEME_PLUGIN;
$plugin_description = gettext('A plugin to insert your Piwik JavaScript tag into your theme pages.');
$plugin_author = "Stephen Billard (sbillard)";
$plugin_version = '1.4.3';
$option_interface = 'piwik_tag';
if (!getOption('piwik_admintracking') || !zp_loggedin(ADMIN_RIGHTS)) {
    zp_register_filter('theme_body_close', 'piwik_tag::placeTag');
}
class piwik_tag
{
    function __construct()
    {
    }
    function getOptionsSupported()
    {
        return array(gettext('piwik url') => array('key' => 'piwik_url', 'type' => OPTION_TYPE_TEXTBOX, 'order' => 0, 'desc' => gettext('Enter your Piwik installation URL.')), gettext('site id') => array('key' => 'piwik_id', 'type' => OPTION_TYPE_TEXTBOX, 'order' => 1, 'desc' => gettext('Enter the site id assigned by Piwik.')), gettext('Enable Admin tracking') => array('key' => 'piwik_admintracking', 'type' => OPTION_TYPE_CHECKBOX, 'order' => 2, 'desc' => gettext('Controls if you want Piwik to track users with <code>Admin</code> rights.')));
    }
    static function placeTag($exclude = NULL)
    {
        if (empty($exclude) || !in_array('piwik_tag', $exclude)) {
            $piwik_url = getOption('piwik_url');
            $piwik_id = getOption('piwik_id');
コード例 #26
0
 *
 * The icon with which the thumbnail is flagged is selectable by option. The above standard icons are provided as defaults.
 * Additional icons can be used by placing them in the <var>%USER_PLUGIN_FOLDER%/flag_thumbnail</var> folder.
 *
 * @author Stephen Billard (sbillard) and Malte Müller (acrylian)
 *
 * @package plugins
 * @subpackage media
 */
$plugin_description = gettext('Overlay icons over thumbnails to indicate image status.');
$plugin_author = "Stephen Billard (sbillard)";
$option_interface = 'flag_thumbnail';
zp_register_filter('standard_image_thumb_html', 'flag_thumbnail::std_image_thumbs');
zp_register_filter('standard_album_thumb_html', 'flag_thumbnail::std_album_thumbs', 99);
zp_register_filter('custom_album_thumb_html', 'flag_thumbnail::custom_album_thumbs', 99);
zp_register_filter('custom_image_html', 'flag_thumbnail::custom_images', 99);
/**
 * Plugin option handling class
 *
 */
class flag_thumbnail
{
    function __construct()
    {
        if (OFFSET_PATH == 2) {
            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');
コード例 #27
0
<?php

/**
 *
 * A tool to send e-mails to all registered users who have provided an e-mail address.
 *
 * @author Malte Müller (acrylian)
 * @package plugins
 * @subpackage users
 */
if (defined('OFFSET_PATH')) {
    $plugin_is_filter = 5 | ADMIN_PLUGIN;
    $plugin_description = gettext("Provides a utility function to send e-mails to all users who have provided an e-mail address.");
    $plugin_author = "Malte Müller (acrylian)";
    zp_register_filter('admin_utilities_buttons', 'user_mailing_list_button');
    function user_mailing_list_button($buttons)
    {
        global $_zp_authority, $_zp_current_admin_obj;
        $button = array('category' => gettext('Admin'), 'enable' => false, 'button_text' => gettext('User mailing list'), 'formname' => 'user_mailing_list.php', 'action' => FULLWEBPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/user_mailing_list.php', 'icon' => 'images/icon_mail.png', 'title' => gettext('There are no other registered users who have provided an e-mail address.'), 'alt' => '', 'hidden' => '', 'rights' => ADMIN_RIGHTS);
        $currentadminuser = $_zp_current_admin_obj->getUser();
        $admins = $_zp_authority->getAdministrators();
        foreach ($admins as $admin) {
            if (!empty($admin['email']) && $currentadminuser != $admin['user']) {
                $button['enable'] = true;
                $button['title'] = gettext('A tool to send e-mails to all registered users who have provided an e-mail address.');
                break;
            }
        }
        $buttons[] = $button;
        return $buttons;
    }
コード例 #28
0
ファイル: comment_form.php プロジェクト: ariep/ZenPhoto20-DEV
$option_interface = 'comment_form';
zp_register_filter('admin_toolbox_global', 'comment_form::toolbox');
require_once SERVERPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/comment_form/class-comment.php';
require_once SERVERPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/comment_form/functions.php';
if (OFFSET_PATH) {
    zp_register_filter('admin_overview', 'comment_form_print10Most');
    zp_register_filter('admin_tabs', 'comment_form::admin_tabs');
} else {
    zp_register_filter('handle_comment', 'comment_form_postcomment');
    zp_register_filter('object_addComment', 'comment_form_addComment');
    if (getOption('comment_form_pagination')) {
        zp_register_filter('theme_head', 'comment_form_PaginationJS');
    }
    if (getOption('tinymce_comments')) {
        require_once SERVERPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/tinymce.php';
        zp_register_filter('theme_head', 'comment_form_visualEditor');
    }
}
class comment_form
{
    /**
     * class instantiation function
     *
     */
    function __construct()
    {
        if (OFFSET_PATH == 2) {
            $old = getOption('tinymce_comments');
            setOptionDefault('email_new_comments', 1);
            setOptionDefault('comment_name_required', 'required');
            setOptionDefault('comment_email_required', 'required');
コード例 #29
0
ファイル: seo_locale.php プロジェクト: JoniWeiss/JoniWebGirl
 * If your site will support it, we suggest you use the dynamic_locales plugin <i>subdomain locales</i> option
 * instead for better performance.
 *
 * @author Stephen Billard (sbillard)
 * @package plugins
 * @subpackage seo
 */
$plugin_is_filter = 5 | CLASS_PLUGIN;
$plugin_description = gettext("Allows setting language locale through the URI.");
$plugin_notice = gettext('<strong>Note:</strong> This plugin is not activated for <em>back&#8209;end</em> (administrative) URLs. However, once activated, the language is remembered, even for the <em>back&#8209;end</em>.');
$plugin_author = "Stephen Billard (sbillard)";
$plugin_disable = !MOD_REWRITE ? gettext('<em>mod_rewrite</em> must be enabled for this plugin to function.') : getOption('dynamic_locale_subdomain') && extensionEnabled('dynamic-locale') ? gettext('This plugin is not compatible with the <code>dynamic locale</code> <em>Use subdomains</em> option') : false;
if ($plugin_disable) {
    enableExtension('seo_locale', 0);
} else {
    zp_register_filter('load_request', 'seo_locale::load_request');
    if (!defined('SEO_WEBPATH')) {
        define('SEO_WEBPATH', seo_locale::localePath());
        define('SEO_FULLWEBPATH', seo_locale::localePath(true));
    }
}
class seo_locale
{
    static function load_request($allow)
    {
        $uri = getRequestURI();
        $parts = explode('?', $uri);
        $uri = $parts[0];
        $path = ltrim(substr($uri, strlen(WEBPATH) + 1), '/');
        if (empty($path)) {
            return $allow;
コード例 #30
0
ファイル: gslideshow.php プロジェクト: kokyandrei/Unsupported
            cacheManager::addThemeCacheSize('gslideshow', getOption('gslideshow_bigsize'), null, null, null, null, null, null, null, null, null, true);
        }
    }
    function getOptionsSupported()
    {
        $options = array(gettext('Slideshow Transition') => array('key' => 'gslideshow_transition', 'type' => OPTION_TYPE_SELECTOR, 'order' => 0, 'selections' => array(gettext("Fade") => "fade", gettext("Flash") => "flash", gettext("Slide") => "slide", gettext("Fadeslide") => "fadeslide", gettext("Pulse") => "pulse"), 'desc' => gettext('The transition that is used when displaying the images. <em>fade</em> crossfades betweens images, <em>flash</em> fades into background color between images, <em>pulse</em> quickly removes the image into background color then fades the next image, <em>slide</em> slides the images depending on image position, <em>fadeslide</em> fade between images and slide slightly at the same time.')), gettext('Slideshow Speed') => array('key' => 'gslideshow_playspeed', 'type' => OPTION_TYPE_TEXTBOX, 'order' => 1, 'desc' => gettext('Speed of the slideshow in milliseconds.')), gettext('Click Next') => array('key' => 'gslideshow_clicknext', 'type' => OPTION_TYPE_CHECKBOX, 'order' => 2, 'desc' => gettext('This options adds a click event over the stage that navigates to the next image in the gallery. Useful for mobile browsers and other simpler applications.')), gettext('Allow Upscale') => array('key' => 'gslideshow_upscale', 'type' => OPTION_TYPE_CHECKBOX, 'order' => 3, 'desc' => gettext('Check this box to allow upscaling of images to fit the slideshow stage.')), gettext('Scripts Always Available?') => array('key' => 'gslideshow_always', 'type' => OPTION_TYPE_CHECKBOX, 'order' => 4, 'desc' => gettext('Check this box to always load the necessary scripts and css in every page.  Must do this when you are embedding slideshows in other than slideshow.php, such as codeblocks or other themepages.  See docs.')), gettext('Thumbsize') => array('key' => 'gslideshow_thumbsize', 'type' => OPTION_TYPE_TEXTBOX, 'order' => 5, 'desc' => gettext('Thumb image size created by Zenphoto, default 100.  Slideshow css actually scales this image down to fit thumb carousel.')), gettext('Medium Image Size') => array('key' => 'gslideshow_mediumsize', 'type' => OPTION_TYPE_TEXTBOX, 'order' => 6, 'desc' => gettext('Medium image size created by Zenphoto, default 800.  Slideshow css scales this image down in default displays to fit slideshow stage.')), gettext('Big Image Size') => array('key' => 'gslideshow_bigsize', 'type' => OPTION_TYPE_TEXTBOX, 'order' => 7, 'desc' => gettext('Big image size created by Zenphoto, default 1200.  Slideshow css scales this image in fullscreen displays to fit slideshow stage.')), gettext('Style') => array('key' => 'gslideshow_style', 'type' => OPTION_TYPE_RADIO, 'order' => 8, 'buttons' => array(gettext('Dark') => 'dark', gettext('Light') => 'light'), 'desc' => gettext('Choose the style to best match your theme.')));
        return $options;
    }
    function handleOption($option, $currentValue)
    {
    }
}
global $_zp_gallery_page;
$slideshow_instance = 0;
if ($_zp_gallery_page == 'slideshow.php' || getOption('gslideshow_always')) {
    zp_register_filter('theme_head', 'printGslideshowJS');
}
if (!getOption('zp_plugin_slideshow')) {
    setOption('zp_plugin_slideshow', 1);
}
setOption('slideshow_mode', 'jQuery');
/**
 * Prints the Galleria slideshow for albums or search results.
 *
 * Two ways to use (see readme/documentation):
 * a) Used on the included theme slideshow.php page and called via printSlideShowLink() from the core slideshow plugin:
 * b) Calling directly via printGslideshow() function in a template file or codeblock.
 *
 * @param obj $albumobj The object of the album to show the slideshow of. Not needed if calling slideshow from album, image, or search.
 * @param obj $imageobj The object of the image to start the slideshow with. If not set the slideshow starts with the first image of the album, or current image if called from image.php. Not needed if calling slideshow from album, image, or search.
 * @param bool $linkslides Set to true if you want the slides to be linked to their image pages