<?php /** * 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";
<?php /** * Changes <i>white space</i> characters to hyphens. * * @author Stephen Billard (sbillard) * * @package plugins * @subpackage seo */ $plugin_is_filter = 5 | ADMIN_PLUGIN; $plugin_description = gettext('SEO <em>Null</em> filter.'); $plugin_notice = gettext('The only translation performed is one or more <em>white space</em> characters are converted to a <em>hyphen</em>.'); $plugin_author = "Stephen Billard (sbillard)"; $plugin_disable = zp_has_filter('seoFriendly') && !extensionEnabled('seo_null') ? sprintf(gettext('Only one SEO filter plugin may be enabled. <a href="#%1$s"><code>%1$s</code></a> is already enabled.'), stripSuffix(get_filterScript('seoFriendly'))) : ''; zp_register_filter('seoFriendly', 'null_seo::filter'); zp_register_filter('seoFriendly_js', 'null_seo::js'); /** * Option handler class * */ class null_seo { /** * class instantiation function * * @return zenphoto_seo */ function __construct() { }
<?php /** * Provides the means to set an limit of the number of images that can be uploaded to an album in total. * Of course this is bypassed if using FTP upload or ZIP files! * If you want to limit the latter you need to use the quota_managment plugin additionally. * NOTE: The http browser single file upload is disabled if using this plugin! * * @author Malte Müller (acrylian) * @package plugins * @subpackage users */ $plugin_is_filter = 5 | ADMIN_PLUGIN; $plugin_description = gettext("Limits the number of images that can be uploaded to an album via the Zenphoto upload."); $plugin_author = "Malte Müller (acrylian)"; $plugin_disable = zp_has_filter('get_upload_header_text') && !getoption('zp_plugin_image_upload_limiter') ? sprintf(gettext('<a href="#%1$s"><code>%1$s</code></a> is already enabled.'), stripSuffix(get_filterScript('get_upload_header_text'))) : ''; $option_interface = 'uploadlimit'; if ($plugin_disable) { setOption('zp_plugin_image_upload_limiter', 0); } else { zp_register_filter('upload_helper_js', 'uploadLimiterJS'); zp_register_filter('get_upload_header_text', 'uploadLimiterHeaderMessage'); zp_register_filter('upload_filetypes', 'limitUploadFiletypes'); zp_register_filter('upload_handlers', 'limitUploadHandlers', 0); } /** * Option handler class * */ class uploadlimit {
* Because of the difficulty of policing quotas when ZIP files are uploaded this plugin * has an option to diable ZIP file upload. * * Since uploads via the <var>files</var> tab are like FTP uploads and are not assigned to the user, you should not assign <var>files</var> rights * to users with upload limits. * * @author Stephen Billard (sbillard) * * @package plugins * @subpackage users */ $plugin_is_filter = 5 | ADMIN_PLUGIN; $plugin_description = gettext("Provides a quota management system to limit the sum of sizes of images a user uploads."); $plugin_notice = gettext("<strong>Note:</strong> if FTP is used to upload images, manual user assignment is necessary. ZIP file upload is disabled by default as quotas are not applied to the files contained therein."); $plugin_author = "Stephen Billard (sbillard)"; $plugin_disable = zp_has_filter('get_upload_header_text') && !extensionEnabled('quota_manager') ? sprintf(gettext('<a href="#%1$s"><code>%1$s</code></a> is already enabled.'), stripSuffix(get_filterScript('get_upload_header_text'))) : ''; $option_interface = 'quota_manager'; if ($plugin_disable) { enableExtension('quota_manager', 0); } else { zp_register_filter('save_admin_custom_data', 'quota_manager::save_admin'); zp_register_filter('edit_admin_custom_data', 'quota_manager::edit_admin'); zp_register_filter('new_image', 'quota_manager::new_image'); zp_register_filter('image_refresh', 'quota_manager::image_refresh'); zp_register_filter('check_upload_quota', 'quota_manager::checkQuota'); zp_register_filter('get_upload_limit', 'quota_manager::getUploadLimit'); zp_register_filter('get_upload_header_text', 'quota_manager::get_header'); zp_register_filter('upload_filetypes', 'quota_manager::upload_filetypes'); zp_register_filter('upload_helper_js', 'quota_manager::upload_helper_js'); } /**