readme update

This commit is contained in:
Kenneth Reitz
2010-04-04 11:20:42 -04:00
parent 5ddec8669d
commit 557bb4fec1
310 changed files with 948 additions and 61245 deletions
+57 -1
View File
@@ -1 +1,57 @@
# Rinse and Repeat.
# WordPress Skeleton
**Wordpress Version**: 2.9.3 (WordPress 3.0 Beta version available in [`3.0`]() branch)
## Installation
> git clone
> git submodule init
> git submodule update
This will pull the latest of all git-powered plugins/themes
## Enhanced Configurations
* WordPress installed in `/blog/`, but will serve site from `/`
* Robust `wp-config.php`
- built to support dev + production environments w/ debugging
- Default FTP connection info for installing/updating/deleting components
-
* Ready to go `.htaccess`
* Ready to go `robots.txt`
## Available Themes
* [KennethReitz's Wordpress Theme Skeleton](http://github.com/kennethreitz/wordpress-theme-skeleton)
* [Jumpchart's Content Wireframing Theme](http://www.jumpchart.com/tour/wordpress/)
## Available Plugins
* After the Deadline (Spelling and grammar checking)
* Akismet (Comment spam destroyer)
* Collabpress (Project tracking within backend)
* CoreyLib (Universal API parser + cache)
* Disable Updates (I got sick of client sites breaking on updates)
* Disqus Commenting System (Socialize your site)
* Front End Editor (Beautiful plugin for editing a page/post's content on the spot)
* Google Sitemap Generator (Google wants the latest)
* Markdown 1.3 (I don't like typing HTML all the time)
* More Fields (No more ugly custom fields + custom post/page types)
* PageMash (Content-heavy sites can be cumbersome)
* PushPress (Support for PubSubHubbub)
* Redirection (They are called permalinks for a reason)
* Role Manager (Turns WordPress into a real CMS)
* Shopp (The total ecommerce package)
* Tantan S3 (Amazon S3 for WordPress uploads)
* Twitter Tools (AutoPost to Twitter when a post goes live. Soon to be replaced with Salsa )
* Clippy Syntax Highlighter (GeSHi + Clippy from GitHub for one-click copying of code)
* WP-Dummy Content (Fills your WordPress installation w/ dummy content)
* WP-Minify (Fantastic Auto minification plugin w/ cacheing)
* WP-Super Cache (Very robust plugin for cacheing Posts and/or Pages)
* WP-Touch (One click iPhone support)
# Rinse and Repeat :)
@@ -1,17 +0,0 @@
# Asynchronous Google Analytics Plugin for WordPress
## What is this?
As you know, Google Analytics is the web's premier analytics tracking and analysis tool.
Until recently, it has been a (very small) bear to load to page, since it would block content downloads until it was finished loading. To fix this, Google recently announced it's new Asynchronous JavaScript loading capabilities. This will heavily increase your site's loading speed.
## When happend?
As soon as they did this, the world freaked out, and everyone started talking about it. However, no one decided to make a WordPress plugin to do all the 'hard work' for you.
## I wanna' play!
So, Kenneth Reitz (http://kennethreitz.com) decided to capitalize on this by, naturally, building a plugin for the masses to utilize this amazing new offering and giving it away for free.
**Enjoy.**
Oh, To install, copy *this folder* to:
wp-content/plugins/ .
@@ -1,78 +0,0 @@
<?php
/*
Plugin Name: Asynchronous Google Analytics
Plugin URI: http://github.com/kennethreitz/async-google-analytics-wordpress-plugin
Description: Adds Asynchronous Google Analytics support to WordPress, thanks to <a href="http://kennethreitz.com">Kenneth Reitz</a>.
Author: Kenneth Reitz
Author URI: http://kennethreitz.com
Version: 0.3
*/
add_action('admin_menu', 'asyncga_admin_menu');
function asyncga_snippet() { ?>
<script type="text/javascript" charset="utf-8">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', '<?php echo get_option('gaaccount') ?>']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script');
ga.src = ('https:' == document.location.protocol ?
'https://ssl' : 'http://www') +
'.google-analytics.com/ga.js';
ga.setAttribute('async', 'true');
document.documentElement.firstChild.appendChild(ga);
})();
</script> <?php
}
function asyncga_menu() {
add_options_page('Google Analytics Settings', 'Google Analytics', 'edit_plugins', 'async-google-analytics', 'asyncga_options');
}
function asyncga_options() {
if( $_POST[ 'updated' ] == 'True' ) {
update_option( 'gaaccount', $_POST['gaaccount'] );
echo '<div class="updated"><p><strong>';
_e('Options saved.', 'google_analytics_id' );
echo '</strong></p></div>';
}
echo '<div class="wrap">';
echo "<h2>" . __( 'Asynchronous Google Analytics Settings', 'google_analytics_id' ) . "</h2>";
?>
<h3>Given the opportunity, this will&hellip; surprise you.</h3>
<style type="text/css" media="screen">
p.setting {
padding: 6px 5px 9px 9px;
margin: 12px 0 8px 15px;
}
</style>
<form name="form1" method="post" action="">
<input type="hidden" name="<?php echo 'updated'; ?>" value="True">
<p style="color:#A2A2A2;">It's time, my son.</p>
<p style="max-width: 660px;">To take advantage of Google Analytics' ultra-fast Asynchronous JavaScript Loader, <br/> enter your Tracking ID below, and everything will suddenly fit together. </p>
<p class="setting"><strong><?php _e("Google Analytics ID:", 'google_analytics_id' ); ?></strong>
<input type="text" name="<?php echo 'gaaccount'; ?>" value="<?php echo get_option('gaaccount'); ?>" size="15">
</p>
<p style="color:#A2A2A2;"> <strong>Note</strong>: If you don't know what your Tracking ID is, then you don't deserve to benefit from this.</p>
<p class="submit">
<input type="submit" name="Submit" value="<?php _e('Update Options', 'google_analytics_id' ) ?>" />
</p>
</form>
</div>
<?php }
add_option('gaaccount', 'UA-XXXX-X');
add_action( 'wp_head', 'asyncga_snippet' );
add_action('admin_menu', 'asyncga_menu');
@@ -1,8 +0,0 @@
# Clippy for Wordress
Once this plugin is installed, you can add a pretty Clippy clip.
##Example
<?php clippy("I'm text in your clipboard. tee-hee.") ?>
@@ -1,35 +0,0 @@
<?php
/*
Plugin Name: Clippy Plugin for Wordpress
Plugin URI: http://github.com/kennethreitz/clippy-wordpress-plugin
Description: Adds Clippy to WordPress, thanks to <a href="http://kennethreitz.com">Kenneth Reitz</a>.
Author: Kenneth Reitz
Author URI: http://kennethreitz.com
Version: 0.3
*/
function clippy($text='copy-me') { ?>
<?php $dir = WP_PLUGIN_URL.'/'.str_replace(basename( __FILE__),"",plugin_basename(__FILE__)); ?>
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="110" height="14" id="clippy" >
<param name="movie" value="<?php echo $dir ?>lib/clippy.swf"/>
<param name="allowScriptAccess" value="always" />
<param name="quality" value="high" />
<param name="scale" value="noscale" />
<param NAME="FlashVars" value="text=<?php echo $text ?>">
<param name="bgcolor" value="#FFFFFF">
<embed src="<?php echo $dir ?>lib/clippy.swf"
width="110"
height="14"
name="clippy"
quality="high"
allowScriptAccess="always"
type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/go/getflashplayer"
FlashVars="text=<?php echo $text ?>"
bgcolor="#FFFFFF"
/>
</object>
<?php } ?>
Submodule blog/wp-content/plugins/coreylib-wordpress-plugin added at 3a486c738a
@@ -1,89 +0,0 @@
<?php
/*
Plugin Name: Custom Class Selector
Plugin URI: http://wordpress.org/extend/plugins/custom-class-selector/
Description: Allows users to style their post content using custom classes made available by the active theme.
Version: 0.1
Author: Aaron Forgue & Tammy Hart
License: GPLv3 (http://www.fsf.org/licensing/licenses/gpl.html)
Copyright 2009 Aaron Forgue (http://www.aaronforgue.com), Tammy Hart (http://www.tammyhartdesigns.com)
*/
// Add all appropriate filters
add_filter('tiny_mce_before_init', 'ccs_styleselect_init');
add_filter('mce_css', 'ccs_custom_style');
add_filter('mce_buttons', 'ccs_styleselect_button');
/**
* Establishes the 'ccs_styleselect_init' filter hook that developers can use
* to define the array of custom style classes that should be included in the
* styleselect menu.
*
* @param array $initArray
* @return array
*/
function ccs_styleselect_init($initArray = array()) {
// If there are already values defined for theme_advanced_styles, go ahead
// and add them into our array. Developer can decide the fate of these styles.
$configuration['custom_styles'] = array();
if (!empty($initArray['theme_advanced_styles'])) {
$initStyles = explode(';', $initArray['theme_advanced_styles']);
foreach ($initStyles as $style) {
list($displayName, $className) = explode('=', $style);
$configuration['custom_styles'][$displayName] = $className;
}
}
// Hook!
$configuration = apply_filters('customclassselector_configuration', $configuration);
// There may be several types of values that we get back, handle each
if (empty($configuration['custom_styles'])) {
$themeAdvancedStylesString = '';
} else if (is_string($configuration['custom_styles'])) {
$themeAdvancedStylesString = $configuration['custom_styles'];
} else if (is_array($configuration['custom_styles'])) {
$themeAdvancedStylesString = array();
foreach ($configuration['custom_styles'] as $displayName => $className) {
$themeAdvancedStylesString[] = $displayName.'='.$className;
}
$themeAdvancedStylesString = implode(';', $themeAdvancedStylesString);
}
// Update the editor init configuration with our custom styles
$initArray['theme_advanced_styles'] = $themeAdvancedStylesString;
return $initArray;
}
/**
* Imports any custom stylesheets into the editor
*
* @param string $css
* @return string
*/
function ccs_custom_style($css) {
// Hook!
$configuration = apply_filters('customclassselector_configuration', array('stylesheet_url' => $css));
return $configuration['stylesheet_url'];
}
/**
* Adds the 'styleselect' control to the top row of editor buttons.
*
* @param array $buttons
* @return array
*/
function ccs_styleselect_button($buttons){
array_push($buttons, 'separator', 'styleselect');
return $buttons;
}
?>
@@ -1,19 +0,0 @@
<?php
function CCSConfiguration($configuration) {
// Define the URL of the stylesheet that holds the CSS definitions for your custom styles
$configuration['stylesheet_url'] = get_bloginfo('template_url').'/ccs-sample.css';
// Define which custom styles are included in the style menu and how each is labeled
// Format: 'Display Name' => 'classname'
$configuration['custom_styles'] = array(
'Bold and Blue' => 'boldblue',
'Italic and Red' => 'italicred'
);
return $configuration;
}
add_filter('customclassselector_configuration', 'CCSConfiguration');
?>
@@ -1,52 +0,0 @@
=== Custom Class Selector ===
Contributors: forgueam, tammyhart
Tags: css, custom, editor, formatting, html, style, theme, tinymce
Requires at least: 2.8
Tested up to: 2.8.5
Stable tag: 0.1
Allows users to style their post content using custom classes made available by the active theme.
== Description ==
The Custom Class Selector plugin allows users to style their post content using
custom classes made available by the active theme. Theme developers can make
custom style classes available within the visual editor by adding a simple
function to the functions.php file included with their theme.
== Installation ==
This plugin follows the [standard WordPress installation method][]:
1. Upload the `custom-class-selector` folder to the `/wp-content/plugins/` directory
1. Activate the plugin through the 'Plugins' menu in WordPress
1. Custom style classes can be selected from the 'Styles' menu in the visual editor
[standard WordPress installation method]: http://codex.wordpress.org/Managing_Plugins#Installing_Plugins
== Frequently Asked Questions ==
= How can I use the custom classes? =
When editing a post or page using the visual editor, you may select custom classes
from within the "Styles" menu on the editor toolbar.
= Theme Developers: How do I define custom classes for my theme? =
Please reference the functions-sample.php file included with this plugin. This
file contains an example of the code that needs to be added to the functions.php
file within your theme directory. Copy the code and make sure to change the
configuration values accordingly.
= How do I get help if I have a problem? =
Please direct support questions to the "Plugins and Hacks" section of the
[WordPress.org Support Forum][]. Just make sure and include the tag
'custom-class-selector'.
[WordPress.org Support Forum]: http://wordpress.org/support/
== Changelog ==
= version 0.1 (Nov 05, 2009) =
- In the beginning ...
Submodule blog/wp-content/plugins/disable-updates-wordpress-plugin added at fb56931720
@@ -1,17 +0,0 @@
<?php
/*
Plugin Name: Trigger Google Chrome Frame
Plugin URI: http://github.com/kennethreitz/google-chrome-frame-wordpress-plugin
Description: Triggers your site to be rendered with <a href="http://code.google.com/chrome/chromeframe/" target="_none">Google Chrome Frame</a> if available. And it's all thanks to <a href="http://kennethreitz.com">Kenneth Reitz</a>!
Author: Kenneth Reitz
Author URI: http://kennethreitz.com
Version: 1.0
*/
add_action('admin_menu', 'gopenid_admin_menu');
function chromeframe_snippet() { ?>
<meta http-equiv="X-UA-Compatible" content="chrome=1"/>
<?php }
add_action('wp_head', 'chromeframe_snippet');
@@ -1,67 +0,0 @@
<?php
/*
Plugin Name: My Google OpenID
Plugin URI: http://github.com/kennethreitz/google-openid-wordpress-plugin
Description: Adds your Google OpenID to a WordPress Wordpress site, allowing you to use that site as an OpenID provider. And it's all thanks to <a href="http://kennethreitz.com">Kenneth Reitz</a>!
Author: Kenneth Reitz
Author URI: http://kennethreitz.com
Version: 0.3
*/
add_action('admin_menu', 'gopenid_admin_menu');
function gopenid_snippet() { ?>
<link rel="openid2.provider" href="https://www.google.com/accounts/o8/ud" />
<link rel="openid2.local_id" href="https://www.google.com/profiles/<?php echo get_option('googleid') ?>" />
    <meta http-equiv="X-XRDS-Location" content="https://www.google.com/profiles/<?php echo get_option('googleid') ?>" /> <?php
}
function gopenid_menu() {
add_options_page('Google OpenID Settings', 'Google OpenID', 'edit_plugins', 'google-openid-settings', 'gopenid_options');
}
function gopenid_options() {
if( $_POST[ 'updated' ] == 'True' ) {
update_option( 'googleid', $_POST['googleid'] );
echo '<div class="updated"><p><strong>';
_e('Options saved.', 'google_id' );
echo '</strong></p></div>';
}
echo '<div class="wrap">';
echo "<h2>" . __( 'My Google OpenID Settings', 'google_id' ) . "</h2>";
?>
<h3>Given the opportunity, this will&hellip; surprise you.</h3>
<style type="text/css" media="screen">
p.setting {
padding: 6px 5px 9px 9px;
margin: 12px 0 8px 15px;
}
</style>
<form name="form1" method="post" action="">
<input type="hidden" name="<?php echo 'updated'; ?>" value="True">
<p style="color:#A2A2A2;">It's time, my son.</p>
<p style="max-width: 660px;">To take advantage of Google Profile's fantastic OpenID on your blog, <br/> enter your <a href="http://www.google.com/profiles/me" target="_none">Google Profile ID</a> (last part of the URL) below, and everything will feel just right. </p>
<p class="setting"><strong><?php _e("Google Profile ID:", 'google_id' ); ?></strong>
<input type="text" name="<?php echo 'googleid'; ?>" value="<?php echo get_option('googleid'); ?>" size="15">
</p>
<p style="color:#A2A2A2;"> <strong>Note</strong>: If you don't know what your Google Profile ID is, then you don't need this anyway.</p>
<p class="submit">
<input type="submit" name="Submit" value="<?php _e('Update Options', 'google_id' ) ?>" />
</p>
</form>
</div>
<?php }
add_option('googleid', 'defaultusername');
add_action('wp_head', 'gopenid_snippet');
add_action('admin_menu', 'gopenid_menu');
@@ -1 +0,0 @@
var AudioPlayer=function(){var F=[];var C;var E="";var A={};var D=-1;function B(G){return document.all?window[G]:document[G]}return{setup:function(H,G){E=H;A=G},getPlayer:function(G){return B(G)},embed:function(K,O){var I={};var M;var G;var P;var H;var N={};var J={};var L={};for(M in A){I[M]=A[M]}for(M in O){I[M]=O[M]}if(I.transparentpagebg=="yes"){N.bgcolor="#FFFFFF";N.wmode="transparent"}else{if(I.pagebg){N.bgcolor="#"+I.pagebg}N.wmode="opaque"}N.menu="false";for(M in I){if(M=="pagebg"||M=="width"||M=="transparentpagebg"){continue}J[M]=I[M]}L.name=K;L.style="outline: none";J.playerID=K;swfobject.embedSWF(E,K,I.width.toString(),"24","9.0.0",false,J,N,L);F.push(K)},syncVolumes:function(G,I){D=I;for(var H=0;H<F.length;H++){if(F[H]!=G){B(F[H]).setVolume(D)}}},activate:function(G){if(C&&C!=G){B(C).close()}C=G},load:function(I,G,J,H){B(I).load(G,J,H)},close:function(G){B(G).close();if(G==C){C=null}},open:function(G){B(G).open()},getVolume:function(G){return D}}}()
Binary file not shown.
File diff suppressed because one or more lines are too long
@@ -1,95 +0,0 @@
table.pod_enclosure, table.pod_format {
border: 1px solid #ccc;
margin: 0 0 10px 0;
width: 100%;
}
table.pod_format {
width: 95%;
margin: 0 auto 20px auto;
}
#podcasting table.pod_enclosure td, table.pod_format td {
padding-right: 12px;
background: #f1f1f1;
}
#podcasting table.pod_enclosure td.pod-title, table.pod_format td.pod-title {
font-weight: bold;
background: #dfdfdf;
padding-left: 3px;
padding-right: 2px;
}
#podcasting table.pod_enclosure td.pod-player input {
text-align: center;
}
#podcasting table.pod_enclosure input, #podcasting table.pod_enclosure select,
table.pod_format input, table.pod_format select {
width: 100%;
}
#podcasting table.pod_enclosure .pod-length {
width: 60px;
}
#podcasting table.pod_enclosure .pod-explicit, #podcasting table.pod_format .pod-format-explicit {
width: 68px;
}
#podcasting table.pod_enclosure .pod-update, table.pod_format .pod-update {
width: 128px;
}
table.pod_format .pod-update input {
width: 35px !important;
}
#podcasting h3 {
margin-bottom: 5px;
}
#podcasting abbr {
border-bottom: 1px dotted #c3c3c3;
}
#podcasting table.pod_enclosure a {
position: relative;
color: #000;
text-decoration: none;
border-bottom: 1px dotted #aaa;
}
table.pod_new_enclosure {
width: 97%;
}
#podcasting table.pod_new_enclosure input, #podcasting table.pod_new_enclosure select {
width: 100%;
}
#podcasting table.pod_new_enclosure td {
padding-right: 12px;
}
#podcasting table.pod_new_enclosure td.pod-title {
width: 55px;
padding-left: 3px;
padding-right: 2px;
}
#podcasting table.pod_new_enclosure td.pod-new-format {
width: 25%;
padding-left: 3px;
padding-right: 2px;
}
#podcasting table.pod_new_enclosure td.submit {
float: none;
width: 45px;
padding-right: 0;
margin-top: 0;
padding-top: 0;
border-top: 0;
}
@@ -1,331 +0,0 @@
<?php
/**
* Handles the Podcasting feed
* @author Spiral Web Consulting
*/
class PodcastingFeed {
/**
* Starts the Podcasting feed
*/
function PodcastingFeed()
{
add_action('init', array($this, 'init'));
}
/**
* Actions and filters to hook in after init
**/
function init()
{
# Add the podcasting feed type
add_feed('podcast', array($this, 'do_feed_podcast'));
# Add the podcast feed
add_filter('query_vars', array($this, 'queryVars'));
add_filter('posts_join', array($this, 'feedJoin'));
add_filter('posts_where', array($this, 'feedWhere'));
add_filter('posts_groupby', array($this, 'feedGroupby'));
add_action('wp_head', array($this, 'addFeedDiscovery'));
add_action('template_redirect', array($this, 'preventFeedburner'), -10);
# Add podcasting information to feeds
add_action('rss2_ns', array($this, 'addItunesXML'));
add_filter('option_blogname', array($this, 'blognameFilter'));
add_filter('option_blogdescription', array($this, 'blogdescriptionFilter'));
add_action('rss2_head', array($this, 'addItunesFeed'));
add_filter('rss_enclosure', array($this, 'removeEnclosures'));
add_action('rss2_item', array($this, 'addItunesItem'));
}
/**
* Create the podcast feed type
*/
function do_feed_podcast($withcomments) {
global $wp_query;
$wp_query->get_posts();
do_feed_rss2($withcomments);
}
/**
* Adds the format option to the query vars
*/
function queryVars($vars) {
$vars[] = 'format';
return $vars;
}
/**
* The SQL join information for the feed
*/
function feedJoin($join) {
global $wpdb;
if ( 'podcast' == get_query_var('feed') ) {
$join .= " INNER JOIN {$wpdb->postmeta} pod_meta ON {$wpdb->posts}.ID = pod_meta.post_id";
$join .= " INNER JOIN {$wpdb->term_relationships} pod_rel ON (pod_meta.meta_id = pod_rel.object_id)";
$join .= " INNER JOIN {$wpdb->term_taxonomy} pod_tax ON (pod_rel.term_taxonomy_id = pod_tax.term_taxonomy_id)";
$join .= " INNER JOIN {$wpdb->terms} pod_terms ON (pod_tax.term_id = pod_terms.term_id)";
}
return $join;
}
/**
* The SQL where information needed for the feed
*/
function feedWhere($where) {
global $wpdb;
if ( 'podcast' == get_query_var('feed') ) {
$podcast_format = ( '' == get_query_var('format') ) ? 'default-format' : get_query_var('format');
$where .= " AND pod_meta.meta_key = 'enclosure'";
$where .= " AND pod_terms.slug = '{$podcast_format}'";
}
return $where;
}
/**
* The SQL groupby information needed for the feed
*/
function feedGroupby($groupby) {
global $wpdb;
if ( 'podcast' == get_query_var('feed') )
$groupby = "{$wpdb->posts}.ID";
return $groupby;
}
/**
* Adds auto-discovery functionality to the Podcasting feed
*/
function addFeedDiscovery() {
global $wp_rewrite;
$podcast_url = ($wp_rewrite->using_permalinks()) ? '/feed/podcast/' : '/?feed=podcast';
$podcast_url = get_option('home') . $podcast_url;
echo ' <link rel="alternate" type="application/rss+xml" title="Podcast: ' . htmlentities(stripslashes(get_option('pod_title')), ENT_COMPAT, "UTF-8") . '" href="' . $podcast_url . '" />' . "\n";
// Formats
$pod_formats = get_terms('podcast_format', 'get=all');
if ( is_array($pod_formats) && count($pod_formats) > 0 ) {
foreach ($pod_formats as $pod_format) {
if ( 'default-format' != $pod_format->slug ) {
$podcast_format_url = ($wp_rewrite->using_permalinks()) ? $podcast_url . "?format=$pod_format->slug" : $podcast_url . "&format=$pod_format->slug";
echo ' <link rel="alternate" type="application/rss+xml" title="Podcast: ' . htmlentities(stripslashes(get_option('pod_title'))) . " ($pod_format->name)" . '" href="' . $podcast_format_url . '" />' . "\n";
}
}
}
}
/**
* Prevents the podcasting feed from being redirected by Feedburner
*/
function preventFeedburner() {
if ( 'podcast' == get_query_var('feed') )
remove_action('template_redirect', 'ol_feed_redirect');
}
/**
* Add iTunes' XML information to the feed
*/
function addItunesXML() {
if ( 'podcast' == get_query_var('feed') ) {
echo 'xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"';
}
}
/**
* Change the feed title for podcasting feeds
*/
function blognameFilter($title) {
if ( 'podcast' == get_query_var('feed') ) {
$podcast_format = get_term_by('slug', get_query_var('format'), 'podcast_format');
$title = $this->getOption('pod_title');
if ( 'default-format' != get_query_var('format') && '' != get_query_var('format') && !empty($podcast_format) )
$title .= " ($podcast_format->name)";
}
return $title;
}
/**
* Change the feed tagline
*/
function blogdescriptionFilter($tagline) {
if ( 'podcast' == get_query_var('feed') )
$tagline = $this->getOption('pod_tagline');
return $tagline;
}
/**
* Adds the main iTunes feed information
*/
function addItunesFeed() {
if ( 'podcast' == get_query_var('feed') ) {
// iTunes summary
if ( '' != get_option('pod_itunes_summary') )
echo '<itunes:summary>' . $this->flatTextEncode(get_option('pod_itunes_summary')) . '</itunes:summary>' . "\n ";
// iTunes subtitle
if ( '' != get_option('pod_tagline') )
echo '<itunes:subtitle>' . $this->flatTextEncode(get_option('pod_tagline')) . '</itunes:subtitle>' . "\n ";
// iTunes author
if ( '' != get_option('pod_itunes_author') )
echo '<itunes:author>' . $this->getOption('pod_itunes_author') . '</itunes:author>' . "\n ";
// iTunes image
if ( '' != get_option('pod_itunes_image') ) {
echo '<itunes:image href="' . stripslashes(get_option('pod_itunes_image')) . '" />' . "\n ";
echo '<image><url>' . stripslashes(get_option('pod_itunes_image')) . '</url><title>' . $this->getOption('pod_title') . '</title><link>' . get_option('home') . '</link></image>' . "\n ";
}
// iTunes categories
for ($i = 1; $i <= 3; $i++) {
$pod_cat_option = 'pod_itunes_cat' . $i;
if ( '' != get_option($pod_cat_option) ) {
$pod_category = explode('||', htmlspecialchars(stripslashes(get_option($pod_cat_option))));
if ( $pod_category[1] ) {
echo '<itunes:category text="' . $pod_category[0] . '">' . "\n ";
echo '<itunes:category text="' . $pod_category[1] . '" />' . "\n ";
echo '</itunes:category>' . "\n ";
} else
echo '<itunes:category text="' . $pod_category[0] . '" />' . "\n ";
}
}
// iTunes keywords
if ( '' != get_option('pod_itunes_keywords') )
echo '<itunes:keywords>' . $this->getOption('pod_itunes_keywords') . '</itunes:keywords>' . "\n ";
// iTunes keywords
if ( '' != get_option('pod_itunes_explicit') )
echo '<itunes:explicit>' . get_option('pod_itunes_explicit') . '</itunes:explicit>' . "\n ";
else
echo '<itunes:explicit>no</itunes:explicit>' . "\n ";
// iTunes owner information
if ( ( '' != get_option('pod_itunes_ownername') ) || ( '' != get_option('pod_itunes_owneremail') ) ) {
echo '<itunes:owner>' . "\n ";
if ( '' != get_option('pod_itunes_ownername') )
echo ' <itunes:name>' . $this->getOption('pod_itunes_ownername') . '</itunes:name>' . "\n ";
if ( '' != get_option('pod_itunes_owneremail') )
echo ' <itunes:email>' . $this->getOption('pod_itunes_owneremail') . '</itunes:email>' . "\n ";
echo '</itunes:owner>' . "\n ";
}
}
} // podcasting_add_itunes_feed()
/**
* Remove enclosures from other podcasting formats
*/
function removeEnclosures($enclosure) {
if ( 'podcast' == get_query_var('feed') ) {
$podcast_format = ( '' == get_query_var('format') ) ? 'default-format' : get_query_var('format');
$enclosures = get_post_custom_values('enclosure');
$podcast_urlformats = array();
// Check if the enclosure should be displayed
foreach ($enclosures as $enclose) {
$enclose = explode("\n", $enclose);
$enclosure_itunes = unserialize($enclose[3]);
$enclosure_url = explode('"', $enclosure);
if ( ( $enclosure_url[1] == trim(htmlspecialchars($enclose[0])) ) && ( $enclosure_itunes['format'] == $podcast_format ) )
return $enclosure;
}
} else
return $enclosure;
}
/**
* Add the iTunes information to feed items
*/
function addItunesItem() {
if ( 'podcast' == get_query_var('feed') ) {
$podcast_format = ( '' == get_query_var('format') ) ? 'default-format' : get_query_var('format');
$enclosures = get_post_custom_values('enclosure');
foreach ($enclosures as $enclosure) {
$enclosure_itunes = explode("\n", $enclosure);
$enclosure_itunes = unserialize($enclosure_itunes[3]);
if ($enclosure_itunes['format'] == $podcast_format) break;
}
// iTunes summary
ob_start(); the_content(); $itunes_summary = ob_get_contents(); ob_end_clean();
$itunes_summary = $this->limitStringLength($this->flatTextEncode($itunes_summary), 4000);
echo '<itunes:summary>' . $itunes_summary . '</itunes:summary>' . "\n";
// iTunes subtitle
ob_start(); the_excerpt_rss(); $itunes_subtitle = ob_get_contents(); ob_end_clean();
$itunes_subtitle = $this->limitStringLength($this->flatTextEncode($itunes_subtitle), 255);
echo '<itunes:subtitle>' . $itunes_subtitle . '</itunes:subtitle>' . "\n";
// iTunes author
if ( '' != $enclosure_itunes['author'] )
echo '<itunes:author>' . $this->utf8Encode($enclosure_itunes['author']) . '</itunes:author>' . "\n";
// iTunes duration
if ( '' != $enclosure_itunes['length'] )
echo '<itunes:duration>' . $this->utf8Encode($enclosure_itunes['length']) . '</itunes:duration>' . "\n";
// iTunes keywords
if ( '' != $enclosure_itunes['keywords'] )
echo '<itunes:keywords>' . $this->utf8Encode($enclosure_itunes['keywords']) . '</itunes:keywords>' . "\n";
// iTunes explicit
if ( '' != $enclosure_itunes['explicit'] )
echo '<itunes:explicit>' . $enclosure_itunes['explicit'] . '</itunes:explicit>' . "\n";
}
} // podcasting_add_itunes_item()
/**
* Limit the length of a string
* @param string - the string to limit
* @param limit - the number of characters to limit by
* @return the limited string
*/
function limitStringLength($string, $limit) {
if ( strlen($string) > $limit )
$string = substr($string, 0, strrpos(substr($string, 0, $limit-6), ' ')) . ' [...]';
return $string;
}
/**
* Retrieves an iTunes feed value and formats it for the feed
*
* @param value - the WordPress option to retrieve
* @return formatted data for itunes (UTF8)
* @author Ronald Heft
**/
function getOption($value)
{
return $this->utf8Encode(get_option($value));
}
/**
* Encode data in UTF8
*
* @param value - the data to format
* @return utf8 formatted data
* @author Ronald Heft
**/
function utf8Encode($value)
{
return utf8_encode(remove_accents(htmlspecialchars(stripslashes($value))));
}
/**
* Encode specific iTunes fields to flat text
*
*
**/
function flatTextEncode($value)
{
if( DB_CHARSET != 'utf8' ) // Check if the string is UTF-8
$value = utf8_encode($value); // If it is not, convert to UTF-8 then decode it...
// Code added to solve issue with KimiliFlashEmbed plugin and also remove the shortcode for the WP Audio Player
// 99.9% of the time this code will not be necessary
$value = preg_replace("/\[(kml_(flash|swf)embed|audio\:)\b(.*?)(?:(\/))?(\]|$)/isu", '', $value);
if(version_compare("5", phpversion(), ">"))
$value = preg_replace( '/&nbsp;/ui' , ' ', $value); // Best we can do for PHP4
else
$value = @html_entity_decode($value, ENT_COMPAT, 'UTF-8'); // Remove any additional entities such as &nbsp;
$value = preg_replace( '/&amp;/ui' , '&', $value); // Best we can do for PHP4. precaution in case it didn't get removed from function above.
return wp_specialchars( $value );
}
}
# Start the feed
$podcasting_feed = new PodcastingFeed();
?>
@@ -1,728 +0,0 @@
<?php
/**
* Handle outputting Podcasting's metabox
* @author Spiral Web Consulting
*/
class PodcastingMetabox {
/**
* Setup the metabox for use
*/
function PodcastingMetabox() {
add_action('wp_ajax_pod404', array($this, 'check404'));
add_action('wp_ajax_podenclose', array($this, 'newEnclosureBox'));
add_action('admin_init', array($this, 'adminInit'));
add_action('admin_head', array($this, 'addJavascript'));
# Run our custom ping method that can disable auto enclosures and fixes the disappearing enclosure bug
remove_action('do_pings', 'do_all_pings');
add_action('do_pings', array($this, 'do_all_pings'));
}
/**
* Hooks to run after the admin is initialized
*/
function adminInit()
{
# Enclosure creation methods needed by WordPress
add_action('save_post', array($this, 'saveForm'));
add_action('delete_post', array($this, 'deleteForm'));
# Add the metabox to the interface
add_meta_box('podcasting', 'Podcasting', array($this, 'editForm'), 'post', 'normal');
}
/**
* The ping method modified to use our enclosure method over WordPress'
*/
function do_all_pings() {
global $wpdb;
// Do pingbacks
while ($ping = $wpdb->get_row("SELECT * FROM {$wpdb->posts}, {$wpdb->postmeta} WHERE {$wpdb->posts}.ID = {$wpdb->postmeta}.post_id AND {$wpdb->postmeta}.meta_key = '_pingme' LIMIT 1")) {
$wpdb->query("DELETE FROM {$wpdb->postmeta} WHERE post_id = {$ping->ID} AND meta_key = '_pingme';");
pingback($ping->post_content, $ping->ID);
}
# Do enclosures if enabled, and if doing enclosures, use our custom method
if ( get_option('pod_disable_enclose') != 'yes' ) {
// Do Enclosures
while ($enclosure = $wpdb->get_row("SELECT * FROM {$wpdb->posts}, {$wpdb->postmeta} WHERE {$wpdb->posts}.ID = {$wpdb->postmeta}.post_id AND {$wpdb->postmeta}.meta_key = '_encloseme' LIMIT 1")) {
$wpdb->query( $wpdb->prepare("DELETE FROM {$wpdb->postmeta} WHERE post_id = %d AND meta_key = '_encloseme';", $enclosure->ID) );
$this->do_enclose($enclosure->post_content, $enclosure->ID);
}
}
// Do Trackbacks
$trackbacks = $wpdb->get_col("SELECT ID FROM $wpdb->posts WHERE to_ping <> '' AND post_status = 'publish'");
if ( is_array($trackbacks) )
foreach ( $trackbacks as $trackback )
do_trackbacks($trackback);
//Do Update Services/Generic Pings
generic_ping();
}
/**
* The do_enclose method without the removing of enclosures that was causing issues for many users
* This method has last been updated in WordPress 2.8
*/
function do_enclose( $content, $post_ID ) {
global $wpdb;
include_once( ABSPATH . WPINC . '/class-IXR.php' );
$log = debug_fopen( ABSPATH . 'enclosures.log', 'a' );
$post_links = array();
debug_fwrite( $log, 'BEGIN ' . date( 'YmdHis', time() ) . "\n" );
$pung = get_enclosed( $post_ID );
$ltrs = '\w';
$gunk = '/#~:.?+=&%@!\-';
$punc = '.:?\-';
$any = $ltrs . $gunk . $punc;
preg_match_all( "{\b http : [$any] +? (?= [$punc] * [^$any] | $)}x", $content, $post_links_temp );
debug_fwrite( $log, 'Post contents:' );
debug_fwrite( $log, $content . "\n" );
foreach ( (array) $post_links_temp[0] as $link_test ) {
if ( !in_array( $link_test, $pung ) ) { // If we haven't pung it already
$test = parse_url( $link_test );
if ( isset( $test['query'] ) )
$post_links[] = $link_test;
elseif ( $test['path'] != '/' && $test['path'] != '' )
$post_links[] = $link_test;
}
}
foreach ( (array) $post_links as $url ) {
if ( $url != '' && !$wpdb->get_var( $wpdb->prepare( "SELECT post_id FROM $wpdb->postmeta WHERE post_id = %d AND meta_key = 'enclosure' AND meta_value LIKE (%s)", $post_ID, $url . '%' ) ) ) {
if ( $headers = wp_get_http_headers( $url) ) {
$len = (int) $headers['content-length'];
$type = $headers['content-type'];
$allowed_types = array( 'video', 'audio' );
if ( in_array( substr( $type, 0, strpos( $type, "/" ) ), $allowed_types ) ) {
$meta_value = "$url\n$len\n$type\n";
$wpdb->insert($wpdb->postmeta, array('post_id' => $post_ID, 'meta_key' => 'enclosure', 'meta_value' => $meta_value) );
}
}
}
}
}
/**
* The edit form used by Podcasting
*/
function editForm() {
global $wpdb, $post;
# If this is a valid post, grab a list of the enclosures for this post
if ($post->ID)
$enclosures = $wpdb->get_results("SELECT meta_id, meta_value FROM {$wpdb->postmeta} WHERE post_id = {$post->ID} AND meta_key = 'enclosure' ORDER BY meta_id", ARRAY_A);
# Grab a list of all the podcasting formats
$pod_formats = get_terms('podcast_format', 'get=all'); ?>
<div id="podcasting_enclosures">
<?php
# If the list of enclosures is not empty
if ( !empty($enclosures) ) {
# Loop through each enclosure
foreach ($enclosures as $enclosure) {
# If the enclosure count is greater than none, add to a list of valid enclosures
if ( $enclosure_count > 0 ) $pod_enclosure_ids .= ','; $enclosure_count++;
# Append the current enclosure id to a list of enclosure ids
$pod_enclosure_ids .= $enclosure['meta_id'];
# Grab the contents of the enclosure
$enclosure_value = explode("\n", $enclosure['meta_value']);
# Grab and extract the iTunes specific data from the enclosure
$enclosure_itunes = unserialize($enclosure_value[3]);
# Determine the type of enclosure and mark the enclosure for a player button if necessary
$podcast_player = ( 'mp3' == strtolower(substr(trim($enclosure_value[0]), -3)) ) ? true : false;
$podcast_video_player_formats = array('m4v', 'mp4', 'mov', 'flv', 'm4a');
$podcast_video_player = ( in_array(strtolower(substr(trim($enclosure_value[0]), -3)), $podcast_video_player_formats) ) ? true : false;
### START THE ENCLOSURE HTML ###
?>
<table cellpadding="3" class="pod_enclosure" id="pod_episode_<?php echo $enclosure['meta_id']; ?>">
<tr>
<td class="pod-title">File</td>
<td colspan="<?php echo ( $podcast_player || $podcast_video_player ) ? 5 : 6; ?>"><input type="text" name="pod_file_<?php echo $enclosure['meta_id']; ?>" class="pod_file" value="<?php echo $enclosure_value[0]; ?>" readonly="readonly" /></td>
<?php if ( $podcast_player ) { ?>
<td class="pod-player"><input name="add_editor" type="button" class="button-primary" value="Send to editor &raquo;" style="margin: 0 5px; width: 80%;" onClick="insertPodcastString('<?php echo trim($enclosure_value[0]); ?>');" /></td>
<?php } elseif ( $podcast_video_player ) { ?>
<td class="pod-player"><input name="add_editor" type="button" class="button-primary" style="margin: 0 5px; width: 80%;" value="Send to editor &raquo;" onClick="insertPodcastString('<?php echo trim($enclosure_value[0]); ?>', '1');" /></td>
<?php } ?>
</tr>
<tr>
<td class="pod-title">Format</td>
<td><select name="pod_format_<?php echo $enclosure['meta_id']; ?>" class="pod_format">
<?php
# Get the enclosure format
$enclosure_format = wp_get_object_terms($enclosure['meta_id'], 'podcast_format');
# Loop through each of the available podcasting formats
foreach ($pod_formats as $pod_format) {
# Determine the selected podcasting format
if ( '' != $enclosure_itunes['format'] )
$selected = ($pod_format->slug == $enclosure_itunes['format']) ? ' selected="selected"' : '';
elseif ( 0 < count($enclosure_format) )
$selected = ($pod_format->slug == $enclosure_format[0]->slug) ? ' selected="selected"' : '';
else
$selected = ($pod_format->slug == 'default-format') ? ' selected="selected"' : '';
# Output the option value
echo '<option value="' . $pod_format->slug . '"' . $selected . '>' . $pod_format->name . '</option>';
} ?>
</select></td>
<td class="pod-title"><a href="#" class="pod-tip" title="Up to 12 comma-separated words which iTunes uses for search placement.">Keywords</a></td>
<td colspan="4"><input type="text" name="pod_keywords_<?php echo $enclosure['meta_id']; ?>" class="pod_keywords" value="<?php echo stripslashes($enclosure_itunes['keywords']); ?>" /></td>
</tr>
<tr>
<td class="pod-title"><a href="#" class="pod-tip" title="Author name if different than default.">Author</a></td>
<td><input type="text" name="pod_author_<?php echo $enclosure['meta_id']; ?>" class="pod_author" value="<?php echo stripslashes($enclosure_itunes['author']); ?>" /></td>
<td class="pod-title"><a href="#" class="pod-tip" title="Length of the podcast in HH:MM:SS format.">Length</a></td>
<td class="pod-length"><input type="text" name="pod_length_<?php echo $enclosure['meta_id']; ?>" class="pod_length" value="<?php echo stripslashes($enclosure_itunes['length']); ?>" /></td>
<td class="pod-title"><a href="#" class="pod-tip" title="Explicit setting if different than default.">Explicit</a></td>
<td class="pod-explicit"><select name="pod_explicit_<?php echo $enclosure['meta_id']; ?>" class="pod_format">
<?php
# Loop through the explicits and select the chosen one
$explicits = array('', 'no', 'yes', 'clean');
foreach ($explicits as $explicit) {
$selected = ($explicit == $enclosure_itunes['explicit']) ? ' selected="selected"' : '';
echo '<option value="' . $explicit . '"' . $selected . '>' . ucfirst($explicit) . '</option>';
} ?>
</select></td>
<td class="pod-update"><input name="delete_pod_<?php echo $enclosure['meta_id']; ?>" type="button" class="button" style="margin: 0 5px; width: 80%;" value="Delete Enclosure" onclick="delete_podcast_episode(<?php echo $enclosure['meta_id']; ?>);" /></td>
</tr>
</table>
<?php } ?>
<?php } ?>
<input name="pod_enclosure_ids" type="hidden" value="<?php echo $pod_enclosure_ids; ?>" />
<input name="pod_new_enclosure_ids" id="pod_new_enclosure_ids" type="hidden" value="" />
<input name="pod_delete_enclosure_ids" id="pod_delete_enclosure_ids" type="hidden" value="" />
<input name="pod_ignore_enclosure_ids" id="pod_ignore_enclosure_ids" type="hidden" value="" />
</div>
<table cellpadding="3" class="pod_new_enclosure">
<tr>
<td class="pod-title">File URL</td>
<td><input type="text" name="pod_new_file" class="pod_new_file" value="" /></td>
<td class="pod-new-format"><select name="pod_new_format" class="pod_new_format">
<?php foreach ($pod_formats as $pod_format) {
$selected = ( 'default-format' == $pod_format->slug ) ? ' selected="selected"' : '';
echo '<option value="' . $pod_format->slug . '"' . $selected . '>' . $pod_format->name . '</option>';
} ?>
</select></td>
<td class="submit"><input name="add_episode" id="add_podcast_button" type="button" class="" value="Add" onclick="add_podcast_episode();" /></td>
</tr>
</table>
<?php } // podcasting_edit_form()
/**
* Saves information about enclosures
*/
function saveForm($postID) {
global $wpdb;
// Security prevention
if ( !current_user_can('edit_post', $postID) )
return $postID;
// Extra security prevention
if (isset($_POST['comment_post_ID'])) return $postID;
if (isset($_POST['not_spam'])) return $postID; // akismet fix
if (isset($_POST['comment'])) return $postID; // moderation.php fix
// Ignore save_post action for revisions and autosave
if (wp_is_post_revision($postID) || wp_is_post_autosave($postID)) return $postID;
// Add new enclosures
if ( $_POST['pod_new_enclosure_ids'] != '' ) {
$pod_new_enclosure_ids = explode(',', substr($_POST['pod_new_enclosure_ids'], 0, -1));
$pod_ignore_enclosure_ids = explode(',', substr($_POST['pod_ignore_enclosure_ids'], 0, -1));
$added_enclosure_ids = array();
foreach ( $pod_new_enclosure_ids AS $pod_enclosure_id ) {
$pod_enclosure_id = (int) $pod_enclosure_id;
// Check if the enclosure is on the ignore list
if ( !in_array($pod_enclosure_id, $pod_ignore_enclosure_ids) ) {
$pod_content = $this->prepareEnclosure($_POST['pod_new_file_' . $pod_enclosure_id]);
$pod_format = $_POST['pod_new_format_' . $pod_enclosure_id];
$enclosed = get_enclosed($postID);
// Enclose the file using a custom method
$headers = $this->getHttpHeaders($pod_content);
# Check if the headers processed the file correctly, if they didn't try to clean up the file
if ( $headers['response'] != '200' ) {
$pod_content = podcasting_urlencode($pod_content);
$headers = $this->getHttpHeaders($pod_content);
}
$length = (int) $headers['content-length'];
$type = addslashes( $headers['content-type'] );
if ( $headers['response'] != '404' && is_array($headers) ) {
add_post_meta($postID, 'enclosure', "$pod_content\n$length\n$type\n");
// Add relationship if new enclosure
if ( !in_array($pod_content, $enclosed) ) {
$pod_enclosure_id2 = $wpdb->get_var("SELECT meta_id FROM {$wpdb->postmeta} WHERE post_id = {$postID} AND meta_key = 'enclosure' ORDER BY meta_id DESC"); // Find the enclosure we just added
wp_set_object_terms($pod_enclosure_id2, $pod_format, 'podcast_format', false);
}
$added_enclosure_ids[] = $pod_enclosure_id;
}
}
}
}
// Update enclosures
if ( isset($_POST['pod_enclosure_ids']) ) {
$pod_enclosure_ids = explode(',', $_POST['pod_enclosure_ids']);
$pod_new_enclosure_ids = explode(',', substr($_POST['pod_new_enclosure_ids'], 0, -1));
$pod_ignore_enclosure_ids = explode(',', substr($_POST['pod_ignore_enclosure_ids'], 0, -1));
$pod_delete_enclosure_ids = explode(',', substr($_POST['pod_delete_enclosure_ids'], 0, -1));
$enclosures = $wpdb->get_results("SELECT meta_id, meta_value FROM {$wpdb->postmeta} WHERE post_id = {$postID} AND meta_key = 'enclosure' ORDER BY meta_id", ARRAY_A); $i = 0;
if ( $_POST['pod_enclosure_ids'] != '' ) {
foreach ($pod_enclosure_ids as $pod_enclosure_id) {
// Ensure we're dealing with an ID
$pod_enclosure_id = (int) $pod_enclosure_id;
$itunes = serialize(array(
'format' => $_POST['pod_format_' . $pod_enclosure_id],
'keywords' => $_POST['pod_keywords_' . $pod_enclosure_id],
'author' => $_POST['pod_author_' . $pod_enclosure_id],
'length' => $_POST['pod_length_' . $pod_enclosure_id],
'explicit' => $_POST['pod_explicit_' . $pod_enclosure_id]
));
// Update format
wp_set_object_terms($pod_enclosure_id, $_POST['pod_format_' . $pod_enclosure_id], 'podcast_format', false);
// Update enclsoure
$enclosure = explode("\n", $enclosures[$i]['meta_value']);
$enclosure[3] = $itunes;
// Check that we have the full enclosure before updating it
if ( is_array($enclosures) ) {
update_post_meta($postID, 'enclosure', implode("\n", $enclosure), $enclosures[$i]['meta_value']);
}
$i++;
// Delete enclosure
if ( in_array($pod_enclosure_id, $pod_delete_enclosure_ids) ) {
// Remove format
wp_delete_object_term_relationships($pod_enclosure_id, 'podcast_format');
// Remove enclosure
delete_meta($pod_enclosure_id);
}
}
}
if ( count($added_enclosure_ids) > 0 ) {
foreach ($added_enclosure_ids as $pod_enclosure_id) {
// Ensure we're dealing with an ID
$pod_enclosure_id = (int) $pod_enclosure_id;
// Check if the enclosure is on the ignore list
if ( !in_array($pod_enclosure_id, $pod_ignore_enclosure_ids) ) {
$itunes = serialize(array(
'format' => $_POST['pod_new_format_' . $pod_enclosure_id],
'keywords' => $_POST['pod_new_keywords_' . $pod_enclosure_id],
'author' => $_POST['pod_new_author_' . $pod_enclosure_id],
'length' => $_POST['pod_new_length_' . $pod_enclosure_id],
'explicit' => $_POST['pod_new_explicit_' . $pod_enclosure_id]
));
// Update format
$meta_id = $enclosures[$i]['meta_id'];
wp_set_object_terms($meta_id, $_POST['pod_new_format_' . $pod_enclosure_id], 'podcast_format', false);
// Update enclsoure
$enclosure = explode("\n", $enclosures[$i]['meta_value']);
$enclosure[3] = $itunes;
$enclosure_insert = implode("\n", $enclosure);
$wpdb->query("UPDATE {$wpdb->postmeta} SET meta_value = '$enclosure_insert' WHERE meta_id = '$meta_id'");
$i++;
}
}
}
}
return $postID;
} // podcasting_save_form()
/**
* Create a box for enclosure editing use
*/
function newEnclosureBox() {
# Check AJAX referer
check_ajax_referer('podcasting');
# Get the required variables
$id = $_POST['pod_id'];
$url = $_POST['pod_url'];
$format = $_POST['pod_format'];
# Grab a list of all the podcasting formats
$pod_formats = get_terms('podcast_format', 'get=all');
# Determine the type of enclosure and mark the enclosure for a player button if necessary
$podcast_player = ( 'mp3' == strtolower(substr(trim($url), -3)) ) ? true : false;
$podcast_video_player_formats = array('m4v', 'mp4', 'mov', 'flv', 'm4a');
$podcast_video_player = ( in_array(strtolower(substr(trim($url), -3)), $podcast_video_player_formats) ) ? true : false;
?>
<table cellpadding="3" class="pod_enclosure" id="new_enclosure_<?php echo $id; ?>">
<tr>
<td class="pod-title">File</td>
<td colspan="<?php echo ( $podcast_player || $podcast_video_player ) ? 5 : 6; ?>"><input type="text" name="pod_new_file_<?php echo $id; ?>" class="pod_file" value="<?php echo $url; ?>" readonly="readonly" /></td>
<?php if ( $podcast_player ) { ?>
<td class="pod-player"><input name="add_editor" type="button" class="button-primary" value="Send to editor &raquo;" style="margin: 0 5px; width: 80%;" onClick="insertPodcastString('<?php echo trim($url); ?>');" /></td>
<?php } elseif ( $podcast_video_player ) { ?>
<td class="pod-player"><input name="add_editor" type="button" class="button-primary" style="margin: 0 5px; width: 80%;" value="Send to editor &raquo;" onClick="insertPodcastString('<?php echo trim($url); ?>', '1');" /></td>
<?php } ?>
</tr>
<tr>
<td class="pod-title">Format</td>
<td><select name="pod_new_format_<?php echo $id; ?>" class="pod_format">
<?php
# Loop through each of the available podcasting formats
foreach ($pod_formats as $pod_format) {
# Determine the selected podcasting format
$selected = ($pod_format->slug == $format) ? ' selected="selected"' : '';
# Output the option value
echo '<option value="' . $pod_format->slug . '"' . $selected . '>' . $pod_format->name . '</option>';
} ?>
</select></td>
<td class="pod-title"><a href="#" class="pod-tip" title="Up to 12 comma-separated words which iTunes uses for search placement.">Keywords</a></td>
<td colspan="4"><input type="text" name="pod_new_keywords_<?php echo $id; ?>" class="pod_keywords" value="" /></td>
</tr>
<tr>
<td class="pod-title"><a href="#" class="pod-tip" title="Author name if different than default.">Author</a></td>
<td><input type="text" name="pod_new_author_<?php echo $id; ?>" class="pod_author" value="" /></td>
<td class="pod-title"><a href="#" class="pod-tip" title="Length of the podcast in HH:MM:SS format.">Length</a></td>
<td class="pod-length"><input type="text" name="pod_new_length_<?php echo $id; ?>" class="pod_length" value="" /></td>
<td class="pod-title"><a href="#" class="pod-tip" title="Explicit setting if different than default.">Explicit</a></td>
<td class="pod-explicit"><select name="pod_new_explicit_<?php echo $id; ?>" class="pod_format">
<?php
$explicits = array('', 'no', 'yes', 'clean');
foreach ($explicits as $explicit) {
$selected = '';
echo '<option value="' . $explicit . '"' . $selected . '>' . ucfirst($explicit) . '</option>';
} ?>
</select></td>
<td class="pod-update"><input name="delete_pod_<?php echo $id; ?>" type="button" class="button" style="margin: 0 5px; width: 80%;" value="Delete Enclosure" onclick="delete_new_podcast_episode(<?php echo $id; ?>);" /></td>
</tr>
</table>
<?php
}
/**
* Check for a 404 using AJAX
*/
function check404() {
check_ajax_referer('podcasting');
$pod_content = $this->prepareEnclosure($_POST['file']);
$headers = $this->getHttpHeaders($pod_content);
# Check if the headers processed the file correctly, if they didn't try to clean up the file
if ( $headers['response'] != '200' ) {
$pod_content = podcasting_urlencode($pod_content);
$headers = $this->getHttpHeaders($pod_content);
}
if ( $headers['response'] == '404' )
echo 'File not found on server (404). Verify the file exists and try again.';
elseif ( is_numeric($headers['response']) && $headers['response'] != '200' )
echo 'Server responded with http error code ' . $headers['response'] . '.';
elseif ( $headers['response'] != '200' )
echo 'Server failed to respond to remote request and did not provided error information.';
exit;
}
/**
* Retrieves information about a given podcast through several different methods
* @param - the URL of the file
* @return an array containing file information
*/
function getHttpHeaders($url) {
# Don't attempt to get enclosure information since we're accepting failure
if ( get_option('pod_accept_fail') == 'yes' ) {
$headers = array(
'response' => 200,
'content-length' => '1048576',
'content-type' => $this->getMimeType($url)
);
return $headers;
}
# Try using wp_remote_head
if ( function_exists('wp_remote_head') ) {
$wp_head = wp_remote_head($url);
# Check if the returned type is a WP_Error, if so, return nothing
if ( is_wp_error($wp_head) )
return array('response' => '404');
$headers = array(
'response' => $wp_head['response']['code'],
'content-length' => $wp_head['headers']['content-length'],
'content-type' => $this->getMimeType($url)
);
} else { # Try using wp_get_http_headers
$wp_head = wp_get_http_headers($url);
$headers = array(
'response' => '200',
'content-length' => $wp_head['content-length'],
'content-type' => $this->getMimeType($url)
);
}
# Try to get the headers locally if external URLs fail
if ( $headers['response'] == '' || $headers['response'] == '404' ) {
$local_host = $_SERVER['SERVER_NAME'];
$file_parse_url = parse_url($url);
$file_host = $file_parse_url['host'];
$file_path = $_SERVER['DOCUMENT_ROOT'] . $file_parse_url['path'];
# Double check we have a local file
if ( $local_host == $file_host ) {
if ( file_exists($file_path) ) {
$headers['response'] = '200';
$headers['content-type'] = mime_content_type($file_path);
$headers['content-length'] = filesize($file_path);
} else {
$headers['response'] = '404';
}
}
}
return $headers;
}
/**
* Retrieve the mime type of a file
*
* @param file - the file URL
* @return the mime type
**/
function getMimeType($file)
{
$parts = pathinfo($file);
switch( strtolower($parts['extension']) )
{
// Audio formats
case 'mp3': // most common
case 'mpga':
case 'mp2':
case 'mp2a':
case 'm2a':
case 'm3a':
return 'audio/mpeg';
case 'm4a':
return 'audio/x-m4a';
case 'ogg':
return 'audio/ogg';
case 'wma':
return 'audio/x-ms-wma';
case 'wax':
return 'audio/x-ms-wax';
case 'ra':
case 'ram':
return 'audio/x-pn-realaudio';
case 'mp4a':
return 'audio/mp4';
// Video formats
case 'm4v':
return 'video/x-m4v';
case 'mpeg':
case 'mpg':
case 'mpe':
case 'm1v':
case 'm2v':
return 'video/mpeg';
case 'mp4':
case 'mp4v':
case 'mpg4':
return 'video/mp4';
case 'asf':
case 'asx':
return 'video/x-ms-asf';
case 'wmx':
return 'video/x-ms-wmx';
case 'avi':
return 'video/x-msvideo';
case 'wmv':
return 'video/x-ms-wmv'; // Check this
case 'flv':
return 'video/x-flv';
case 'swf':
return 'application/x-shockwave-flash';
case 'mov':
case 'qt':
return 'video/quicktime';
case 'divx':
return 'video/divx';
case '3gp':
return 'video/3gpp';
// rarely used
case 'mid':
case 'midi':
return'audio/midi';
case 'wav':
return 'audio/wav';
case 'aa':
return 'audio/audible';
case 'pdf':
return 'application/pdf';
case 'torrent':
return 'application/x-bittorrent';
default: // Let it fall through
}
// Last case let wordpress detect it:
return wp_check_filetype($file);
}
/**
* Cleans up after a deleted enclosure
*/
function deleteForm($postID) {
$pod_enclosure_ids = explode(',', $_POST['pod_enclosure_ids']);
foreach ($pod_enclosure_ids as $pod_enclosure_id) {
$pod_enclosure_id = (int) $pod_enclosure_id;
wp_delete_object_term_relationships($pod_enclosure_id, 'podcast_format');
}
return $postID;
}
/**
* Clean up a URL or file for entering into Podcasting
* @param url - the url of the file
* @return the cleaned up information
*/
function prepareEnclosure($url) {
$url = trim($url);
# Add the domain if given a relative URL
if ( substr($url, 0, 4) != 'http' )
if ( substr($url, 0, 1) != '/' )
$url = get_option('home') . '/' . $url;
else
$url = get_option('home') . $url;
return $url;
}
/**
* Add the Javascript needed to edit enclosure information
*/
function addJavascript() {
?><script type='text/javascript'>
jQuery(document).ready(function(){
jQuery('#add_podcast_button').click( function() {
var button = this;
button.disabled = true;
setTimeout( function() { button.disabled = false; }, 3000 );
});
});
var newEnclosureId = 1000;
// This function will add Javascript to make a new episode appear on the post without refreshing the page
function add_podcast_episode() {
// Grab the variables
var existingEnclosureIds = jQuery("#pod_new_enclosure_ids").val();
var newFile = jQuery("table.pod_new_enclosure input.pod_new_file").val();
var newFormat = jQuery("table.pod_new_enclosure select.pod_new_format").html();
var newFormatVal = jQuery("table.pod_new_enclosure select.pod_new_format").val();
// Check for a 404 before continuing
jQuery.ajax({
type: "post",
url: "<?php echo admin_url('admin-ajax.php'); ?>",
data: { action: 'pod404', file: newFile, _ajax_nonce: '<?php echo wp_create_nonce("podcasting"); ?>' },
success: function(html){
if ( html != '' ) {
alert(html);
return 0;
}
// Create the episode box
jQuery.ajax({
type: "post",
url: "<?php echo admin_url('admin-ajax.php'); ?>",
data: { action: 'podenclose', pod_id: newEnclosureId, pod_url: newFile, pod_format: newFormatVal, _ajax_nonce: '<?php echo wp_create_nonce("podcasting"); ?>' },
success: function(newEnclosure){
// Add the episode to the page
jQuery(newEnclosure).appendTo("#podcasting_enclosures");
jQuery("#pod_new_enclosure_ids").val( existingEnclosureIds + newEnclosureId + ',' );
// Reset the add form
jQuery("table.pod_new_enclosure input.pod_new_file").val('');
// Increase the episode counter
newEnclosureId = newEnclosureId + 1;
},
error: function(){
alert('Passed 404 check, but failed to add file.');
}
});
},
error: function(){
alert('Failed checking for file 404.');
}
});
}
// This function will remove the HTML for an episode, marking the episode for deletion on the next save
function delete_podcast_episode(id) {
var existingRemovals = jQuery("#pod_delete_enclosure_ids").val();
confirm_delete = confirm("Are you sure you want to delete this enclosure?");
if ( confirm_delete == true ) {
jQuery("#pod_episode_" + id).hide('slow');
jQuery("#pod_delete_enclosure_ids").val( existingRemovals + id + ',' );
}
}
// This function will remove the episode for episodes that have been added without saving
function delete_new_podcast_episode(id) {
var existingRemovals = jQuery("#pod_ignore_enclosure_ids").val();
confirm_delete = confirm("Are you sure you want to delete this enclosure?");
if ( confirm_delete == true ) {
jQuery("#new_enclosure_" + id).hide('slow');
jQuery("#pod_ignore_enclosure_ids").val( existingRemovals + id + ',' );
}
}
// Insert myValue (podcast special url string) into an editor window
function insertPodcastString(myValue, type) {
// Set the correct podcast tag
if ( type == 1 )
myValue = '[podcast format="video"]' + myValue + '[/podcast]';
else
myValue = '[podcast]' + myValue + '[/podcast]';
send_to_editor(myValue);
}
</script>
<?php
}
}
# Start the metabox
$podcasting_metabox = new PodcastingMetabox();
?>
@@ -1,269 +0,0 @@
<?php
$podcasting_excerpt_check = false;
/**
* Handle's the various format players for Podcasting
* @author Spiral Web Consulting
**/
class PodcastingPlayer
{
var $_id = 0;
var $_playerAdded = array();
/**
* Setup the player for use
*/
function PodcastingPlayer() {
add_shortcode('podcast', array($this, 'shortcode'));
add_action('wp_print_scripts', array($this, 'addPlayerScripts'));
add_action('wp_head', array($this, 'addPlayerJavascript'));
add_filter('the_content', array($this, 'theContent'), 50);
add_filter('get_the_excerpt', array($this, 'checkExcerpt'), 1);
}
/**
* Handle's the podcast shortcode
*/
function shortcode( $atts, $content = null ) {
global $post, $podcasting_excerpt_check;
# Don't process the excerpt
if ( $podcasting_excerpt_check )
return '';
# Mark the player added so it doesn't happen automatically
$this->_playerAdded[$post->ID] = true;
# Extract the information from the shortcode
extract( shortcode_atts( array(
'format' => 'mp3',
'width' => get_option('pod_player_width'),
'height' => get_option('pod_player_height'),
'flashvars' => ''
), $atts ) );
# Increase the id count
$this->_id++;
# Display the correct player
if ( 'mp3' == $format && get_option('pod_player_use_video') == 'no' )
return $this->audioPlayer($content, $width, $height, $flashvars);
elseif ( 'video' == $format || get_option('pod_player_use_video') == 'yes' )
return $this->videoPlayer($content, $width, $height, $flashvars);
}
/**
* The audio player
* @return the HTML for the audio player
**/
function audioPlayer($content, $width, $height, $flashvars)
{
$podcasting_player_url = plugins_url('/podcasting/player/player.swf');
# Grab the player's surrounding text
$podcasting_text_above = stripslashes(get_option('pod_player_text_above'));
$podcasting_text_before = stripslashes(get_option('pod_player_text_before'));
$podcasting_text_below = stripslashes(get_option('pod_player_text_below'));
$podcasting_text_link = get_option('pod_player_text_link');
# Text above the player
if ( $podcasting_text_above != '' ) {
if ( 'above' == $podcasting_text_link )
$podcasting_text_above = "<p><a href='$content'>$podcasting_text_above</a></p>";
else
$podcasting_text_above = "<p>$podcasting_text_above</p>";
}
# Text immeaditely before the player
if ( $podcasting_text_before != '' ) {
if ( 'before' == $podcasting_text_link )
$podcasting_text_before = "<a href='$content'>$podcasting_text_before</a> ";
else
$podcasting_text_before .= ' ';
}
# Text below the player
if ( $podcasting_text_below != '' ) {
if ( 'below' == $podcasting_text_link )
$podcasting_text_below = "<p><a href='$content'>$podcasting_text_below</a></p>";
else
$podcasting_text_below = "<p>$podcasting_text_below</p>";
}
# Add the flashvars if any
if ( $flashvars != '' )
$flashvars = ', ' . $flashvars;
# Check if is a feed
if ( is_feed() ) {
return $podcasting_text_above . $podcasting_text_before . '<a href="' . $content . '">' . $content . '</a>' . $podcasting_text_below;
} else {
return $podcasting_text_above . $podcasting_text_before . '<span id="pod_audio_' . $this->_id . '">&nbsp;</span>
<script type="text/javascript">
AudioPlayer.embed("pod_audio_' . $this->_id . '", {soundFile: "' . rawurlencode($content) . '"' . $flashvars . '});
</script>
' . $podcasting_text_below;
}
}
/**
* The video player
*/
function videoPlayer($content, $width, $height, $flashvars) {
$podcasting_player_url = plugins_url('/podcasting/player/mediaplayer.swf');
# Check to make sure the width and height have values
$width = ( $width == '' ) ? '400' : $width;
$height = ( $height == '' ) ? '300' : $height;
# Add the flashvars, if any
$global_flashvars = stripslashes(get_option('pod_video_flashvars'));
$global_flashvars = ( $global_flashvars != '' ) ? ', ' . $global_flashvars : '';
$flashvars = ( $flashvars != '' ) ? ', ' . $flashvars : '';
# Grab the player's surrounding text
$podcasting_text_above = stripslashes(get_option('pod_player_text_above'));
$podcasting_text_before = stripslashes(get_option('pod_player_text_before'));
$podcasting_text_below = stripslashes(get_option('pod_player_text_below'));
$podcasting_text_link = get_option('pod_player_text_link');
# Above the player
if ( $podcasting_text_above != '' ) {
if ( 'above' == $podcasting_text_link )
$podcasting_text_above = "<p><a href='$content'>$podcasting_text_above</a></p>";
else
$podcasting_text_above = "<p>$podcasting_text_above</p>";
}
# Text right before the player
if ( $podcasting_text_before != '' ) {
if ( 'before' == $podcasting_text_link )
$podcasting_text_before = "<a href='$content'>$podcasting_text_before</a> ";
else
$podcasting_text_before .= ' ';
}
# Text below the player
if ( $podcasting_text_below != '' ) {
if ( 'below' == $podcasting_text_link )
$podcasting_text_below = "<p><a href='$content'>$podcasting_text_below</a></p>";
else
$podcasting_text_below = "<p>$podcasting_text_below</p>";
}
# Check if is a feed
if ( is_feed() ) {
return $podcasting_text_above . '<a href="' . $content . '">' . $content . '</a>' . $podcasting_text_below;
} else {
return $podcasting_text_above . '<span id="pod_video_' . $this->_id . '">&nbsp;</span>' . $podcasting_text_below . '
<script type="text/javascript">
var pod_video_flashvars_' . $this->_id . ' = { file: "' . rawurlencode($content) . '"' . $global_flashvars . $flashvars . ' };
var pod_video_params_' . $this->_id . ' = { allowfullscreen: "true", allowscriptaccess: "always" };
swfobject.embedSWF("' . $podcasting_player_url . '", "pod_video_' . $this->_id . '", "' . $width . '", "' . $height . '", "9.0.0", "", pod_video_flashvars_' . $this->_id . ', pod_video_params_' . $this->_id . ');
</script>';
}
}
/**
* Adds the player's javascript to the page
*/
function addPlayerScripts() {
wp_enqueue_script('swfobject', plugins_url('/podcasting/player/swfobject.js'), false, '2.1');
wp_enqueue_script('audio-player', plugins_url('/podcasting/player/audio-player-noswfobject.js'), false, '2.0');
}
/**
* Add the Javascript needed to control the various players
*/
function addPlayerJavascript() {
# Grab the audio player's global flashvars
$global_flashvars = stripslashes(get_option('pod_player_flashvars'));
# Add the global flashvars, if any
if ( get_option('pod_player_flashvars') != '' )
$global_flashvars = ', ' . $global_flashvars;
# Adjust the audio player's width
$pod_player_width = stripslashes(get_option('pod_audio_width'));
if ( $pod_player_width == '' )
$pod_player_width = 290;
# Initialize the audio player
?>
<!-- Podcasting <?php echo PODCASTING_VERSION; ?>: http://plugins.spiralwebconsulting.com/podcasting.html -->
<script type="text/javascript">
AudioPlayer.setup("<?php echo plugins_url('/podcasting/player/player.swf'); ?>", {
width: <?php echo $pod_player_width . $global_flashvars; ?>
});
</script>
<?php
}
/**
* Add the player automatically to a post
*/
function theContent($content) {
global $wpdb, $post, $podcasting_excerpt_check;
# Don't process the excerpt
if ( $podcasting_excerpt_check )
return $content;
# Don't automatically add the player if the page is a feed, the player has already been added, or the user has the automatic player option disabled
if ( is_feed() || $this->_playerAdded[$post->ID] || get_option('pod_player_location') == '' )
return $content;
# If there is a post id, grab the enclosures
if ($post->ID)
$enclosures = $wpdb->get_results("SELECT meta_id, meta_value FROM {$wpdb->postmeta} WHERE post_id = {$post->ID} AND meta_key = 'enclosure' ORDER BY meta_id", ARRAY_A);
# Stop if no enclosures
if ( $enclosures == '' )
return $content;
# For each enclosure
foreach ($enclosures as $enclosure) {
# Parse out the enclosure information
$enclosure_value = explode("\n", $enclosure['meta_value']);
$enclosure_itunes = unserialize($enclosure_value[3]);
# Check if the enclosure is an audio format
$podcast_player = ( 'mp3' == substr(trim($enclosure_value[0]), -3) ) ? true : false;
# Check if the enclosure is a video format
$podcast_video_player_formats = array('m4v', 'mp4', 'mov', 'flv');
$podcast_video_player = ( in_array(substr(trim($enclosure_value[0]), -3), $podcast_video_player_formats) ) ? true : false;
# Place the player in correct spot on the page
if ( $podcast_player )
if ( get_option('pod_player_location') == 'top' )
$content = $this->shortcode(array('format'=>'mp3'), trim($enclosure_value[0])) . $content;
else
$content .= $this->shortcode(array('format'=>'mp3'), trim($enclosure_value[0]));
elseif ( $podcast_video_player )
if ( get_option('pod_player_location') == 'top' )
$content = $this->shortcode(array('format'=>'video'), trim($enclosure_value[0])) . $content;
else
$content .= $this->shortcode(array('format'=>'video'), trim($enclosure_value[0]));
}
return $content;
}
/**
* Checks for the excerpt
**/
function checkExcerpt($content)
{
global $podcasting_excerpt_check;
$podcasting_excerpt_check = true;
return $content;
}
}
# Start the player
$podcasting_player = new PodcastingPlayer();
?>
@@ -1,604 +0,0 @@
<?php
/**
* Podcasting Settings Interface
* @author Spiral Web Consulting
**/
class PodcastingSettings
{
/**
* Initialize the Podcasting settings interface
**/
function PodcastingSettings()
{
# Add Podcasting's settings
add_action('admin_init', array($this, 'addPodcastingSettings'));
# Add Podcasting's settings page
add_action('admin_menu', array($this, 'addPodcastingSettingsPage'));
}
/**
* Add the settings page to the admin menu
*/
function addPodcastingSettingsPage() {
# Add the options page
add_options_page('Podcasting Settings', 'Podcasting', 8, basename(__FILE__), array($this, 'addSettings'));
}
/**
* Adds the settings page for Podcasting
*/
function addPodcastingSettings() {
# Register Podcasting's settings
if ( function_exists('register_setting') ) {
register_setting('podcasting', 'pod_title', '');
register_setting('podcasting', 'pod_tagline', '');
register_setting('podcasting', 'pod_disable_enclose', '');
register_setting('podcasting', 'pod_itunes_summary', '');
register_setting('podcasting', 'pod_itunes_author', '');
register_setting('podcasting', 'pod_itunes_image', '');
register_setting('podcasting', 'pod_itunes_cat1', '');
register_setting('podcasting', 'pod_itunes_cat2', '');
register_setting('podcasting', 'pod_itunes_cat3', '');
register_setting('podcasting', 'pod_itunes_keywords', '');
register_setting('podcasting', 'pod_itunes_explicit', '');
register_setting('podcasting', 'pod_itunes_ownername', '');
register_setting('podcasting', 'pod_itunes_owneremail', '');
register_setting('podcasting', 'pod_formats', '');
register_setting('podcasting', 'pod_player_flashvars', '');
register_setting('podcasting', 'pod_audio_width', '');
register_setting('podcasting', 'pod_player_use_video', '');
register_setting('podcasting', 'pod_player_location');
register_setting('podcasting', 'pod_player_text_above', '');
register_setting('podcasting', 'pod_player_text_before', '');
register_setting('podcasting', 'pod_player_text_below', '');
register_setting('podcasting', 'pod_player_text_link', '');
register_setting('podcasting', 'pod_player_width', '');
register_setting('podcasting', 'pod_player_height', '');
register_setting('podcasting', 'pod_video_flashvars', '');
register_setting('podcasting', 'pod_accept_fail', '');
}
}
/**
* Displays Podcasting's settings
*/
function addSettings() {
// Check for delete
if ( isset($_POST['term_ids']) ) {
$term_ids = explode(',', $_POST['term_ids']);
foreach ($term_ids as $term_id) {
if ( isset($_POST["delete_pod_format_$term_id"]) ) {
$_POST['Submit'] = 'Update';
}
}
}
// Store options if postback
if ( isset($_POST['Submit']) ) {
// Prevent attacks
if ( wp_verify_nonce($_POST['podcasting-nonce-key'], 'podcasting') ) {
// Update the podcast options
update_option('pod_title', $_POST['pod_title']);
update_option('pod_tagline', $_POST['pod_tagline']);
update_option('pod_disable_enclose', $_POST['pod_disable_enclose']);
// Update the iTunes options
update_option('pod_itunes_summary', $_POST['pod_itunes_summary']);
update_option('pod_itunes_author', $_POST['pod_itunes_author']);
update_option('pod_itunes_image', podcasting_urlencode($_POST['pod_itunes_image']));
update_option('pod_itunes_cat1', $_POST['pod_itunes_cat1']);
update_option('pod_itunes_cat2', $_POST['pod_itunes_cat2']);
update_option('pod_itunes_cat3', $_POST['pod_itunes_cat3']);
update_option('pod_itunes_keywords', $_POST['pod_itunes_keywords']);
update_option('pod_itunes_explicit', $_POST['pod_itunes_explicit']);
update_option('pod_itunes_ownername', $_POST['pod_itunes_ownername']);
update_option('pod_itunes_owneremail', $_POST['pod_itunes_owneremail']);
update_option('rss_language', $_POST['rss_language']);
// Update the general player options
update_option('pod_player_location', $_POST['pod_player_location']);
update_option('pod_player_text_above', $_POST['pod_player_text_above']);
update_option('pod_player_text_before', $_POST['pod_player_text_before']);
update_option('pod_player_text_below', $_POST['pod_player_text_below']);
update_option('pod_player_text_link', $_POST['pod_player_text_link']);
// Update the audio player options
update_option('pod_player_flashvars', $_POST['pod_player_flashvars']);
update_option('pod_audio_width', $_POST['pod_audio_width']);
update_option('pod_player_use_video', $_POST['pod_player_use_video']);
// Update the video player options
update_option('pod_video_flashvars', $_POST['pod_video_flashvars']);
update_option('pod_player_width', $_POST['pod_player_width']);
update_option('pod_player_height', $_POST['pod_player_height']);
// Update the advance options
update_option('pod_accept_fail', $_POST['pod_accept_fail']);
// Add a new format
if ( '' != $_POST['pod_format_new_name'] ) {
$args = ( '' != $_POST['pod_format_new_slug'] ) ? array('slug' => $_POST['pod_format_new_slug']) : '';
$format = wp_insert_term($_POST['pod_format_new_name'], 'podcast_format', $args);
$format = get_term($format['term_id'], 'podcast_format');
$pod_explicits = unserialize(get_option('pod_formats'));
$pod_explicits[$format->slug] = $_POST['pod_format_new_explicit'];
update_option('pod_formats', serialize($pod_explicits));
}
// Update formats
if ( isset($_POST['term_ids']) ) {
foreach ( $term_ids as $term_id ) {
$term_id = (int) $term_id;
$format = get_term($term_id, 'podcast_format');
if ( isset($_POST["delete_pod_format_$term_id"]) )
wp_delete_term($term_id, 'podcast_format');
// Update taxonomy
$args = array( 'name' => $_POST["pod_format_name_$term_id"], 'slug' => $_POST["pod_format_slug_$term_id"] );
wp_update_term($term_id, 'podcast_format', $args);
// Update explicit
$pod_explicits[$_POST["pod_format_slug_$term_id"]] = $_POST["pod_format_explicit_$term_id"];
update_option('pod_formats', serialize($pod_explicits));
}
}
// Give an updated message
echo "<div class='updated fade'><p><strong>Podcasting settings saved.</strong></p></div>";
}
// Clear used variables
unset($term_ids);
}
// iTunes category options
$pod_itunes_cats = array(
'Arts', 'Arts||Design', 'Arts||Fashion &amp; Beauty', 'Arts||Food', 'Arts||Literature', 'Arts||Performing Arts', 'Arts||Visual Arts',
'Business', 'Business||Business News', 'Business||Careers', 'Business||Investing', 'Business||Management &amp; Marketing', 'Business||Shopping',
'Comedy',
'Education', 'Education||Education Technology', 'Education||Higher Education', 'Education||K-12', 'Education||Language Courses', 'Education||Training',
'Games &amp; Hobbies', 'Games &amp; Hobbies||Automotive', 'Games &amp; Hobbies||Aviation', 'Games &amp; Hobbies||Hobbies', 'Games &amp; Hobbies||Other Games', 'Games &amp; Hobbies||Video Games',
'Government &amp; Organizations', 'Government &amp; Organizations||Local', 'Government &amp; Organizations||National', 'Government &amp; Organizations||Non-Profit', 'Government &amp; Organizations||Regional',
'Health', 'Health||Alternative Health', 'Health||Fitness &amp; Nutrition', 'Health||Self-Help', 'Health||Sexuality',
'Kids &amp; Family',
'Music',
'News &amp; Politics',
'Religion &amp; Spirituality', 'Religion &amp; Spirituality||Buddhism', 'Religion &amp; Spirituality||Christianity', 'Religion &amp; Spirituality||Hinduism', 'Religion &amp; Spirituality||Islam', 'Religion &amp; Spirituality||Judaism', 'Religion &amp; Spirituality||Other', 'Religion &amp; Spirituality||Spirituality',
'Science &amp; Medicine', 'Science &amp; Medicine||Medicine', 'Science &amp; Medicine||Natural Sciences', 'Science &amp; Medicine||Social Sciences',
'Society &amp; Culture', 'Society &amp; Culture||History', 'Society &amp; Culture||Personal Journals', 'Society &amp; Culture||Philosophy', 'Society &amp; Culture||Places &amp Travel',
'Sports &amp; Recreation', 'Sports &amp; Recreation||Amateur', 'Sports &amp; Recreation||College &amp; High School', 'Sports &amp; Recreation||Outdoor', 'Sports &amp; Recreation||Professional',
'Technology', 'Technology||Gadgets', 'Technology||Tech News', 'Technology||Podcasting', 'Technology||Software How-To',
'TV &amp; Film'
);
$pod_formats = get_terms('podcast_format', 'get=all');
?>
<div class="wrap">
<h2>Podcasting Settings</h2>
<div style="float:right;"><form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="6311849">
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form></div>
<form method="post" action="options-general.php?page=podcasting-settings.php">
<?php $this->nonceField(); ?>
<p><em>
Podcasting is brought to you for free by <a href="http://spiralwebconsulting.com/">Spiral Web Consulting</a>. Spiral Web Consulting is a small web development firm specializing in PHP development. Visit our website to learn more, and don't hesitate to ask us to develop your next big WordPress plugin idea.
</em></p>
<table class="form-table">
<tr valign="top">
<th scope="row" style="width: 200px;">
<label>Podcast feed address (URL):</label>
</th>
<td>
<p style="margin: 7px 0;"><strong>
<?php global $wp_rewrite;
if ($wp_rewrite->using_permalinks())
echo get_option('home') . '/feed/podcast/';
else
echo get_option('home') . '/?feed=podcast'; ?>
</strong></p>
</td>
</tr>
<tr valign="top">
<th scope="row">
<label for="pod_title">Title:</label>
</th>
<td>
<input type="text" size="40" name="pod_title" id="pod_title" value="<?php echo stripslashes(get_option('pod_title')); ?>" />
<br /><span class="setting-description">If your podcast's title is different than your blog's title, change the title here.</span>
</td>
</tr>
<tr valign="top">
<th scope="row">
<label for="pod_tagline">Podcast tagline:</label>
</th>
<td>
<input type="text" style="width: 95%" name="pod_tagline" id="pod_tagline" value="<?php echo ent2ncr(htmlspecialchars(stripslashes(get_option('pod_tagline')))); ?>" />
<br /><span class="setting-description">If your podcast's tagline is different than your blog's tagline, change the tagline here.</span>
</td>
</tr>
</table>
<h3>iTunes Specifics</h3>
<table class="form-table">
<tr valign="top">
<th scope="row" style="width: 200px;">
<label for="pod_itunes_summary">Summary:</label>
</th>
<td>
<textarea cols="40" rows="4" style="width: 95%" name="pod_itunes_summary" id="pod_itunes_summary"><?php echo stripslashes(get_option('pod_itunes_summary')); ?></textarea>
<br /><span class="setting-description">A detailed description of your podcast. iTunes allows up to 4,000 characters and the tagline will be used if no summary is entered.</span>
</td>
</tr>
<tr valign="top">
<th scope="row">
<label for="pod_itunes_author">Author:</label>
</th>
<td>
<input type="text" size="40" name="pod_itunes_author" id="pod_itunes_author" value="<?php echo stripslashes(get_option('pod_itunes_author')); ?>" />
<br /><span class="setting-description">The default author of your podcast.</span>
</td>
</tr>
<tr valign="top">
<th scope="row">
<label for="pod_itunes_image">Podcast Art (URL):</label>
</th>
<td>
<input type="text" size="40" name="pod_itunes_image" id="pod_itunes_image" value="<?php echo rawurldecode(stripslashes(get_option('pod_itunes_image'))); ?>" />
<br /><span class="setting-description">An image which represents your podcast. iTunes uses this image on your podcast directory page and a smaller version in searches. iTunes prefers square .jpg images that are at least 300 x 300 pixels, but any jpg or png will work.</span>
</td>
</tr>
<?php for ($i = 1; $i <= 3; $i++) {
$pod_cat_option = 'pod_itunes_cat' . $i;
$pod_cat_label = ( 1 == $i ) ? 'Primary Category' : 'Category ' . $i;
$pod_cat_summary = ( 1 == $i ) ? 'The category which most fits your podcast. The primary category is used in Top Podcasts lists and directory pages which include podcast art.' : 'An optional additional category which is only used on directory pages without podcast art.';
?>
<tr valign="top">
<th scope="row">
<label for="<?php echo $pod_cat_option; ?>"><?php echo $pod_cat_label; ?>:</label>
</th>
<td>
<select name="<?php echo $pod_cat_option; ?>" id="<?php echo $pod_cat_option; ?>">
<option value=""></option>
<?php foreach ( $pod_itunes_cats as $pod_itunes_cat ) {
// Deal with subcategories
$pod_category = explode("||", $pod_itunes_cat);
$pod_category_display = ( $pod_category[1] ) ? '&nbsp;&nbsp;&nbsp;' . $pod_category[1] : $pod_category[0];
// If selected category
$pod_selected = ( $pod_itunes_cat == htmlspecialchars(stripslashes(get_option($pod_cat_option))) ) ? ' selected="selected"' : '';
echo '<option value="' . $pod_itunes_cat . '"' . $pod_selected . '>' . $pod_category_display . '</option>';
} ?>
</select>
<br /><span class="setting-description"><?php echo $pod_cat_summary; ?></span>
</td>
</tr>
<?php } ?>
<tr valign="top">
<th scope="row">
<label for="pod_itunes_keywords">Keywords:</label>
</th>
<td>
<input type="text" style="width: 95%" name="pod_itunes_keywords" id="pod_itunes_keywords" value="<?php echo stripslashes(get_option('pod_itunes_keywords')); ?>" />
<br /><span class="setting-description">Up to 12 comma-separated words which iTunes uses for search placement.</span>
</td>
</tr>
<tr valign="top">
<th scope="row">
<label for="pod_itunes_explicit">Explicit:</label>
</th>
<td>
<select name="pod_itunes_explicit" id="pod_itunes_explicit">
<option value="">No</option>
<option value="yes"<?php echo ( 'yes' == get_option('pod_itunes_explicit') ) ? ' selected="selected"' : ''; ?>>Yes</option>
<option value="clean"<?php echo ( 'clean' == get_option('pod_itunes_explicit') ) ? ' selected="selected"' : ''; ?>>Clean</option>
</select>
<br /><span class="setting-description">Notifies readers your podcast contains explicit material. Select clean if your podcast removed any explicit content. Note: iTunes requires all explicit podcast to mark them-self as one. Failure to do so can result in removal from the iTunes podcast directory.</span>
</td>
</tr>
<tr valign="top">
<th scope="row">
<label for="pod_itunes_ownername">Owner Name:</label>
</th>
<td>
<input type="text" size="40" name="pod_itunes_ownername" id="pod_itunes_ownername" value="<?php echo stripslashes(get_option('pod_itunes_ownername')); ?>" />
<br /><span class="setting-description">Your podcast's owner's name. The owner name will not be publicly displayed and is used only by iTunes in the event they need to contact your podcast.</span>
</td>
</tr>
<tr valign="top">
<th scope="row">
<label for="pod_itunes_owneremail">Owner E-mail Address:</label>
</th>
<td>
<input type="text" size="40" name="pod_itunes_owneremail" id="pod_itunes_owneremail" value="<?php echo stripslashes(get_option('pod_itunes_owneremail')); ?>" />
<br /><span class="setting-description">Your podcast's owner's e-mail address. The owner e-mail address will not be publicly displayed and is used only by iTunes in the event they need to contact your podcast.</span>
</td>
</tr>
<tr valign="top">
<th scope="row">
<label for="rss_language">Feed language:</label>
</th>
<td>
<input type="text" size="40" name="rss_language" id="rss_language" value="<?php echo stripslashes(get_option('rss_language')); ?>" />
<br /><span class="setting-description">The language of your feed. This value needs changing for international users looking to set this information in iTunes.</span>
</td>
</tr>
</table>
<h3>General Player Options</h3>
<table class="form-table">
<tr valign="top">
<th scope="row">
<label for="pod_player_location">Player location:</label>
</th>
<td>
<select name="pod_player_location" id="pod_player_location">
<option value="">Manual</option>
<option value="top"<?php echo ( 'top' == get_option('pod_player_location') ) ? ' selected="selected"' : ''; ?>>Before Content</option>
<option value="bottom"<?php echo ( 'bottom' == get_option('pod_player_location') ) ? ' selected="selected"' : ''; ?>>After Content</option>
</select>
<br /><span class="setting-description">Automatically insert the audio player or video player. Any players manually inserted will override this setting, so players can still be manually placed on a per-post basis.</span>
</td>
</tr>
<tr valign="top">
<th scope="row">
<label for="pod_player_text_above">Text Above the Player:</label>
</th>
<td>
<input type="text" size="40" name="pod_player_text_above" id="pod_player_text_above" value="<?php echo htmlentities(stripslashes(get_option('pod_player_text_above'))); ?>" />
<br /><span class="setting-description">Text that will appear above the player.</span>
</td>
</tr>
<tr valign="top">
<th scope="row">
<label for="pod_player_text_before">Text Before the Player</label>
</th>
<td>
<input type="text" size="40" name="pod_player_text_before" id="pod_player_text_before" value="<?php echo htmlentities(stripslashes(get_option('pod_player_text_before'))); ?>" />
<br /><span class="setting-description">That that will appear on the line of the player, immediately before it. This text will not display for video players.</span>
</td>
</tr>
<tr valign="top">
<th scope="row" style="width: 200px;">
<label for="pod_player_text_below">Text Below the Player:</label>
</th>
<td>
<input type="text" size="40" name="pod_player_text_below" id="pod_player_text_below" value="<?php echo htmlentities(stripslashes(get_option('pod_player_text_below'))); ?>" />
<br /><span class="setting-description">Text that will appear below the player.</span>
</td>
</tr>
<tr valign="top">
<th scope="row">
<label for="pod_player_text_link">Download Link Text</label>
</th>
<td>
<select name="pod_player_text_link" id="pod_player_text_link">
<?php $text_links = array('none', 'above', 'before', 'below');
$text_link_option = get_option('pod_player_text_link');
foreach ($text_links as $text_link) {
$selected = ($text_link == $text_link_option) ? ' selected="selected"' : '';
echo '<option value="' . $text_link . '"' . $selected . '>' . ucfirst($text_link) . '</option>';
} ?>
</select>
<br /><span class="setting-description">Select the block of text that will link to the podcast file.</span>
</td>
</tr>
</table>
<h3>Audio Player Options</h3>
<table class="form-table">
<tr valign="top">
<th scope="row">
<label for="pod_audio_width">Player Width:</label>
</th>
<td>
<input type="text" size="40" name="pod_audio_width" id="pod_audio_width" value="<?php echo get_option('pod_audio_width'); ?>" />
<br /><span class="setting-description">The default width in pixels of the audio player.</span>
</td>
</tr>
<tr valign="top">
<th scope="row" style="width: 200px;">
<label for="pod_player_flashvars">Player Flashvars:</label>
</th>
<td>
<input type="text" size="40" name="pod_player_flashvars" id="pod_player_flashvars" value="<?php echo stripslashes(get_option('pod_player_flashvars')); ?>" />
<br /><span class="setting-description">Optional <a href="http://wpaudioplayer.com/standalone">WordPress Audio Player flashvars</a> that will apply on a global basis. Enter the flashvars like so: <code>autostart: 'yes', bg: 'e5e5e5'</code>. Additional flashvars can be appended on a per file basis by adding a flashvars=&quot;x&quot; parameter to the [podcast] tag.</span>
</td>
</tr>
<tr valign="top">
<th scope="row">
<label for="pod_player_use_video">Use Video Player:</label>
</th>
<td>
<select name="pod_player_use_video" id="pod_player_use_video">
<?php $text_links = array('no', 'yes');
$text_link_option = get_option('pod_player_use_video');
foreach ($text_links as $text_link) {
$selected = ($text_link == $text_link_option) ? ' selected="selected"' : '';
echo '<option value="' . $text_link . '"' . $selected . '>' . ucfirst($text_link) . '</option>';
} ?>
</select>
<br /><span class="setting-description">Selecting this option will use the video player instead of the audio player for audio files.</span>
</td>
</tr>
</table>
<h3>Video Player Options</h3>
<table class="form-table">
<tr valign="top">
<th scope="row">
<label for="pod_player_width">Default Player Width:</label>
</th>
<td>
<input type="text" size="40" name="pod_player_width" id="pod_player_width" value="<?php echo get_option('pod_player_width'); ?>" />
<br /><span class="setting-description">The default width in pixels of the video player. This can be changed on a per video basis by adding a width=&quot;x&quot; parameter to the [podcast] tag.</span>
</td>
</tr>
<tr valign="top">
<th scope="row">
<label for="pod_player_height">Default Player Height:</label>
</th>
<td>
<input type="text" size="40" name="pod_player_height" id="pod_player_height" value="<?php echo get_option('pod_player_height'); ?>" />
<br /><span class="setting-description">The default height in pixels of the video player. This can be changed on a per video basis by adding a height=&quot;y&quot; parameter to the [podcast] tag.</span>
</td>
</tr>
<tr valign="top">
<th scope="row" style="width: 200px;">
<label for="pod_video_flashvars">Player Flashvars:</label>
</th>
<td>
<input type="text" size="40" name="pod_video_flashvars" id="pod_video_flashvars" value="<?php echo stripslashes(get_option('pod_video_flashvars')); ?>" />
<br /><span class="setting-description">Optional <a href="http://code.longtailvideo.com/trac/wiki/FlashVars">JW FLV Player flashvars</a> that will apply on a global basis. Enter the flashvars like so: <code>autostart: 'true', bufferlength: 4</code>. Additional flashvars can be appended on a per video basis by adding a flashvars=&quot;x&quot; parameter to the [podcast] tag.</span>
</td>
</tr>
</table>
<h3>Advanced Options</h3>
<table class="form-table">
<tr valign="top">
<th scope="row">
<label for="pod_disable_enclose">Disable auto-enclose:</label>
</th>
<td>
<select name="pod_disable_enclose" id="pod_disable_enclose">
<option value="">No</option>
<option value="yes"<?php echo ( 'yes' == get_option('pod_disable_enclose') ) ? ' selected="selected"' : ''; ?>>Yes</option>
</select>
<br /><span class="setting-description">Enabling this option will prevent WordPress from automatically enclosing file URLs in the content of your posts. This is helpful if you're trying to keep certain files from appearing in your Podcasting feed.</span>
</td>
</tr>
<tr valign="top">
<th scope="row">
<label for="pod_accept_fail">Bypass error check:</label>
</th>
<td>
<select name="pod_accept_fail" id="pod_accept_fail">
<option value="no">No</option>
<option value="yes"<?php echo ( 'yes' == get_option('pod_accept_fail') ) ? ' selected="selected"' : ''; ?>>Yes</option>
</select>
<br /><span class="setting-description"><strong>WARNING:</strong> Enabling this option will disable the 404 check and file size check that occurs when adding a new podcast episode. When enabled, any new file added through Podcasting will report itself as being 1MB in size. This may cause issues with some Podcatchers that rely on accurate enclosure information. Only enable this option if you're experiencing constant HTTP connection errors (resulting in 404s) and are absolutely sure the file exists on the server. <strong>Use this option at your own risk.</strong></span>
</td>
</tr>
</table>
<p class="submit">
<?php if ( function_exists('settings_fields') ) settings_fields('podcasting'); ?>
<input type="submit" name="Submit" value="Save Changes" />
</p>
<?php if ( count($pod_formats) > 1 ) { ?>
<br />
<h3>Formats</h3>
<?php foreach ($pod_formats as $pod_format) {
if ( 'default-format' != $pod_format->slug ) {
if ( $term_count > 0 ) $term_ids .= ','; $term_count++;
$term_ids .= $pod_format->term_id; ?>
<table cellpadding="3" class="pod_format">
<tr>
<td class="pod-title">Format Feed</td>
<td colspan="6">
<input type="text" name="pod_format_feed" class="pod_format_feed" value="<?php
global $wp_rewrite;
if ($wp_rewrite->using_permalinks())
echo get_option('home') . "/feed/podcast/?format=$pod_format->slug";
else
echo get_option('home') . "/?feed=podcast&format=$pod_format->slug"; ?>" readonly="readonly" />
</td>
</tr>
<tr>
<td class="pod-title">Format Name</td>
<td><input type="text" name="pod_format_name_<?php echo $pod_format->term_id; ?>" class="pod_format_name" value="<?php echo $pod_format->name; ?>" />
<td class="pod-title">Format Slug</td>
<td><input type="text" name="pod_format_slug_<?php echo $pod_format->term_id; ?>" class="pod_format_slug" value="<?php echo $pod_format->slug; ?>" /></td>
<td class="pod-title">Explicit</td>
<td><select name="pod_format_explicit_<?php echo $pod_format->term_id; ?>" class="pod_format_explicit">
<?php $explicits = array('', 'no', 'yes', 'clean');
$format_explicit = unserialize(get_option('pod_formats'));
foreach ($explicits as $explicit) {
$selected = ($explicit == $format_explicit[$pod_format->slug]) ? ' selected="selected"' : '';
echo '<option value="' . $explicit . '"' . $selected . '>' . ucfirst($explicit) . '</option>';
} ?>
</select></td>
<td class="pod-update">
<input name="Submit" type="submit" class="button-secondary" value="Update" />
<input name="delete_pod_format_<?php echo $pod_format->term_id; ?>" type="submit" class="button-secondary" value="Delete" onclick="return deleteSomething( 'podcast_format', <?php echo $pod_format->term_id; ?>, 'You are about to delete a podcast format. All episodes currently assigned to this format will become assigned to no format.\n\'OK\' to delete, \'Cancel\' to stop.' );" /></td>
</tr>
</table>
<input name="term_ids" type="hidden" value="<?php echo $term_ids; ?>" />
<?php } } ?>
<?php } ?>
<br />
<h3>Add a New Format</h3>
<table class="form-table">
<tr valign="top">
<th scope="row" style="width: 200px;">
<label for="pod_format_new_name">Format name:</label>
</th>
<td>
<input type="text" size="40" name="pod_format_new_name" id="pod_format_name" value="" />
<br /><span class="setting-description">The display name of your new new format.</span>
</td>
</tr>
<tr valign="top">
<th scope="row">
<label for="pod_format_new_slug">Format slug:</label>
</th>
<td>
<input type="text" size="40" name="pod_format_new_slug" id="pod_format_new_slug" value="" />
<br /><span class="setting-description">If you leave this field blank, a slug will automatically be generated for you.</span>
</td>
</tr>
<tr valign="top">
<th scope="row">
<label for="pod_format_new_explicit">Explicit:</label>
</th>
<td>
<select name="pod_format_new_explicit" id="pod_format_new_explicit">
<option value=""></option>
<option value="no">No</option>
<option value="yes">Yes</option>
<option value="clean">Clean</option>
</select>
<br /><span class="setting-description">The explicit setting for this format. If you leave this field blank, your global podcast explicit setting will be used.</span>
</td>
</tr>
</table>
<p class="submit">
<input type="submit" name="Submit" value="Add Format" />
</p>
</div>
</form>
<?php
}
/**
* The nonce field
*/
function nonceField() {
echo "<input type='hidden' name='podcasting-nonce-key' value='" . wp_create_nonce('podcasting') . "' />";
}
}
# Start the Podcasting settings interface
$podcasting_settings = new PodcastingSettings();
?>
@@ -1,221 +0,0 @@
<?php
/*
Plugin Name: Podcasting
Version: 2.3
Plugin URI: http://plugins.spiralwebconsulting.com/podcasting.html
Description: Podcasting enhances WordPress' existing podcast support by adding multiple iTunes-compatible feeds, media players, and an easy to use interface.
Author: Spiral Web Consulting
Author URI: http://spiralwebconsulting.com/
*/
define('PODCASTING_VERSION', '2.3');
# Register Podcasting's taxonomy
register_taxonomy('podcast_format', 'custom_field');
# Setup the post installation actions
add_action('activate_podcasting/podcasting.php', 'podcasting_install');
# Include the admin CSS
add_action('admin_head', 'podcasting_css');
# Include the settings information
include_once('podcasting-settings.php');
# Include the metabox
include_once('podcasting-metabox.php');
# Include the feed
include_once('podcasting-feed.php');
# Include the player
include_once('podcasting-player.php');
# Include the podPress importer
include_once('podpress-importer.php');
/**
* Post installation procedures
*/
function podcasting_install() {
# Setup the default taxonomy
wp_insert_term('Default Format', 'podcast_format');
# Add Podcasting options to the database
add_option('pod_title', get_option('blogname'), "The podcast's title");
add_option('pod_tagline', get_option('blogdescription'), "The podcast's tagline");
add_option('pod_disabled_enclose', false);
add_option('pod_itunes_summary', '', 'iTunes summary');
add_option('pod_itunes_author', '', 'iTunes author');
add_option('pod_itunes_image', '', 'iTunes image');
add_option('pod_itunes_cat1', '', 'iTunes category 1');
add_option('pod_itunes_cat2', '', 'iTunes category 2');
add_option('pod_itunes_cat3', '', 'iTunes category 3');
add_option('pod_itunes_keywords', '', 'iTunes keywords');
add_option('pod_itunes_explicit', '', 'iTunes explicit');
add_option('pod_itunes_ownername', '', 'iTunes owner name');
add_option('pod_itunes_owneremail', '', 'iTunes owner email');
add_option('pod_formats', '', 'Explict settings for podcast formats');
add_option('pod_player_flashvars', '', 'Podcasting player flashvars');
add_option('pod_audio_width', '290', 'Podcasting player width');
add_option('pod_player_use_video', 'no');
add_option('pod_player_location', '', '');
add_option('pod_player_text_above', '', '');
add_option('pod_player_text_before', '', '');
add_option('pod_player_text_below', '', '');
add_option('pod_player_text_link', '', '');
add_option('pod_player_width', '400', 'Podcast player width');
add_option('pod_player_height', '300', 'Podcast player height');
add_option('pod_video_flashvars', '', 'Podcasting video flashvars');
add_option('pod_accept_fail', 'no', 'Accept enclosure failure');
}
/**
* Adds Podcasting's CSS to the admin section
**/
function podcasting_css()
{
echo '<link rel="stylesheet" href="' . plugins_url("/podcasting/podcasting-admin.css") .'" type="text/css" />';
}
add_action('plugin_action_links_' . plugin_basename(__FILE__), 'pod_filter_plugin_actions');
// Add settings option
function pod_filter_plugin_actions($links) {
$new_links = array();
$new_links[] = '<a href="options-general.php?page=podcasting-settings.php">Settings</a>';
return array_merge($new_links, $links);
}
add_filter('plugin_row_meta', 'pod_filter_plugin_links', 10, 2);
// Add FAQ and support information
function pod_filter_plugin_links($links, $file)
{
if ( $file == plugin_basename(__FILE__) )
{
$links[] = '<a href="http://plugins.spiralwebconsulting.com/forums/viewforum.php?f=8">FAQ</a>';
$links[] = '<a href="http://plugins.spiralwebconsulting.com/forums/viewforum.php?f=10">Support</a>';
$links[] = '<a href="http://plugins.spiralwebconsulting.com/podcasting.html#donate">Donate</a>';
}
return $links;
}
/**
* Take a potentially invalid URL and corrects it
* @param p_url - the url
* @return a valid URL
*/
function podcasting_urlencode($p_url) {
$ta = parse_url($p_url);
if (!empty($ta[scheme])) { $ta[scheme].='://'; }
if (!empty($ta[pass]) and !empty($ta[user])) {
$ta[user].=':';
$ta[pass]=rawurlencode($ta[pass]).'@';
} elseif (!empty($ta[user])) {
$ta[user].='@';
}
if (!empty($ta[port]) and !empty($ta[host])) {
$ta[host]=''.$ta[host].':';
} elseif (!empty($ta[host])) {
$ta[host]=$ta[host];
}
if (!empty($ta[path])) {
$tu='';
$tok=strtok($ta[path], "\\/");
while (strlen($tok)) {
$tu.=rawurlencode($tok).'/';
$tok=strtok("\\/");
}
$ta[path]='/'.trim($tu, '/');
}
if (!empty($ta[query])) { $ta[query]='?'.$ta[query]; }
if (!empty($ta[fragment])) { $ta[fragment]='#'.$ta[fragment]; }
return implode('', array($ta[scheme], $ta[user], $ta[pass], $ta[host], $ta[port], $ta[path], $ta[query], $ta[fragment]));
}
/**
* A mime_content_type function if the default mime_content_type function does not exist
*
* @return The mime content type
* @author php.net username: svogal
**/
if (!function_exists('mime_content_type')) {
function mime_content_type($filename) {
$mime_types = array(
'txt' => 'text/plain',
'htm' => 'text/html',
'html' => 'text/html',
'php' => 'text/html',
'css' => 'text/css',
'js' => 'application/javascript',
'json' => 'application/json',
'xml' => 'application/xml',
'swf' => 'application/x-shockwave-flash',
'flv' => 'video/x-flv',
// images
'png' => 'image/png',
'jpe' => 'image/jpeg',
'jpeg' => 'image/jpeg',
'jpg' => 'image/jpeg',
'gif' => 'image/gif',
'bmp' => 'image/bmp',
'ico' => 'image/vnd.microsoft.icon',
'tiff' => 'image/tiff',
'tif' => 'image/tiff',
'svg' => 'image/svg+xml',
'svgz' => 'image/svg+xml',
// archives
'zip' => 'application/zip',
'rar' => 'application/x-rar-compressed',
'exe' => 'application/x-msdownload',
'msi' => 'application/x-msdownload',
'cab' => 'application/vnd.ms-cab-compressed',
// audio/video
'mp3' => 'audio/mpeg',
'qt' => 'video/quicktime',
'mov' => 'video/quicktime',
// adobe
'pdf' => 'application/pdf',
'psd' => 'image/vnd.adobe.photoshop',
'ai' => 'application/postscript',
'eps' => 'application/postscript',
'ps' => 'application/postscript',
// ms office
'doc' => 'application/msword',
'rtf' => 'application/rtf',
'xls' => 'application/vnd.ms-excel',
'ppt' => 'application/vnd.ms-powerpoint',
// open office
'odt' => 'application/vnd.oasis.opendocument.text',
'ods' => 'application/vnd.oasis.opendocument.spreadsheet',
);
$ext = strtolower(array_pop(explode('.',$filename)));
if (array_key_exists($ext, $mime_types)) {
return $mime_types[$ext];
}
elseif (function_exists('finfo_open')) {
$finfo = finfo_open(FILEINFO_MIME);
$mimetype = finfo_file($finfo, $filename);
finfo_close($finfo);
return $mimetype;
}
else {
return 'application/octet-stream';
}
}
}
?>
@@ -1,171 +0,0 @@
<?php
/**
* podPress importer for Podcasting plugin
* @author Spiral Web Consulting
*/
class podPressImport {
/**
* Display the header for the importer
*/
function header() {
echo '<div class="wrap">';
echo '<h2>'.__('Import podPress to Podcasting').'</h2>';
}
/**
* Display the footer
*/
function footer() {
echo '</div>';
}
/**
* Start the importing process
*/
function greet() {
$this->header();
?>
<div class="narrow">
<p><?php _e('Howdy! We&#8217;re about to begin importing all of your podPress podcasts into Podcasting. To begin, click "Start Importing".'); ?></p>
<form method="post" action="<?php echo add_query_arg('step', 1); ?>" class="import-upload-form">
<?php wp_nonce_field('import-podpress'); ?>
<p class="submit">
<input type="submit" value="<?php echo attribute_escape(__('Start Importing')); ?>" id="podpress-submit" />
</p>
</form>
<p><?php _e('The importer is smart enough not to import duplicates, so you can run this multiple times without worry if&#8212;for whatever reason&#8212;it doesn\'t finish.'); ?> </p>
</div>
<?php
$this->footer();
}
/**
* Step one of the import process (displays importer output)
*/
function import() {
$this->header();
$podcasts = $this->retreive_podPress_podcasts();
$this->import_podcasts($podcasts);
$this->footer();
}
/**
* Grab the podPress podcasts
*/
function retreive_podPress_podcasts() {
global $wpdb;
$podcasts = array();
$podpress_data = $wpdb->get_results("SELECT post_id, meta_value FROM {$wpdb->postmeta} WHERE meta_key = 'podPressMedia'", ARRAY_A);
if ( $podpress_data != '' ) {
foreach ( $podpress_data AS $data ) {
$itunes_info = $wpdb->get_results("SELECT post_id, meta_value FROM {$wpdb->postmeta} WHERE meta_key = 'podPressPostSpecific' AND post_id = $data[post_id]", ARRAY_A);
if ( $data['meta_value'] != '' ) {
$podcast = array();
$podcast = unserialize(trim($data['meta_value']));
$podcast = ( !is_array($podcast) ) ? unserialize($podcast) : $podcast;
$podcast[0]['post_id'] = $data['post_id'];
$podcast[0]['itunes'] = unserialize($itunes_info[0]['meta_value']);
$podcast[0]['itunes'] = ( !is_array($podcast[0]['itunes']) ) ? unserialize($podcast[0]['itunes']) : $podcast;
$podcasts[] = $podcast;
}
}
}
return $podcasts;
}
/**
* Actually import the podPress podcasts into Podcasting
*/
function import_podcasts($podcasts) {
global $wpdb, $podcasting_metabox;
$i = 0;
$podPress_options = get_option('podPress_config');
foreach ( $podcasts AS $podcast ) {
$no_enclose = false;
$enclosed = get_post_meta($podcast[0]['post_id'], 'enclosure');
if ( $enclosed != '' ) {
foreach ( $enclosed AS $enclose ) {
$enclose = explode("\n", $enclose);
if ( ( $enclose[0] == $podcast[0]['URI'] ) && ( $enclose[3] != '' ) )
$no_enclose = true;
}
}
if ( !$no_enclose ) {
// Basic podcasting info
$content = ( substr($podcast[0]['URI'], 0, 4) == 'http' ) ? $podcast[0]['URI'] : $podPress_options['mediaWebPath'] . $podcast[0]['URI'];
$headers = $podcasting_metabox->getHttpHeaders($content);
$length = (int) $headers['content-length'];
$type = addslashes( $headers['content-type'] );
// iTunes
$itunes = serialize(array(
'format' => 'default-format',
'keywords' => ( substr($podcast[0]['itunes']['itunes:keywords'], 0, 1) != '#' ) ? $podcast[0]['itunes']['itunes:keywords'] : '',
'author' => ( substr($podcast[0]['itunes']['itunes:author'], 0, 1) != '#' ) ? $podcast[0]['itunes']['itunes:author'] : '',
'length' => $podcast[0]['duration'],
'explicit' => strtolower($podcast[0]['itunes']['itunes:explicit'])
));
if ( $headers['response'] != '404' && is_array($headers) ) {
add_post_meta($podcast[0]['post_id'], 'enclosure', "$content\n$length\n$type\n$itunes\n");
$pod_enclosure_id2 = $wpdb->get_var("SELECT meta_id FROM {$wpdb->postmeta} WHERE post_id = {$podcast[0][post_id]} AND meta_key = 'enclosure' ORDER BY meta_id DESC"); // Find the enclosure we just added
wp_set_object_terms($pod_enclosure_id2, 'default-format', 'podcast_format', false);
$i++;
}
}
}
echo '<p><strong>Successfully imported ' . $i . ' podcasts.</strong></p>';
}
/**
* The switcher function for WordPress importers
*/
function dispatch() {
if (empty ($_GET['step']))
$step = 0;
else
$step = (int) $_GET['step'];
switch ($step) {
case 0 :
$this->greet();
break;
case 1 :
check_admin_referer('import-podpress');
$this->import();
break;
}
}
function podPressImport() {
// Nothing.
}
}
# Start the podPress importer
$podPress_import = new podPressImport();
# Add the podPress importer to the array of importers
$wp_importers['podpress'] = array('PodPress', 'Import podPress podcasts into Podcasting.', array ($podPress_import, 'dispatch'));
?>
@@ -1,225 +0,0 @@
=== Podcasting ===
Contributors: cavemonkey50, jesse_altman, spiralwebconsulting
Donate link: http://plugins.spiralwebconsulting.com/podcasting.html#donate
Tags: podcast, itunes, podcasting, rss, feed, enclosure
Requires at least: 2.7
Tested up to: 2.8.4
Stable tag: 2.3
*Podcasting is no longer supported. [Read this post](http://ronaldheft.com/2009/12/podcastings-plugin-development-comes-to-a-close/) for more information.*
Podcasting enhances WordPress' existing podcast support by adding multiple iTunes-compatible feeds, media players, and an easy to use interface.
== Description ==
Podcasting brings complete podcasting support to WordPress. Podcasting will take a file from somewhere on the web (either your site or another site) and it will add it to an iTunes-based feed. Podcasting also includes a player allowing visitors to your site to view the file on the web.
*Podcasting is brought to you for free by [Spiral Web Consulting](http://spiralwebconsulting.com/). Spiral Web Consulting is a small web development firm specializing in PHP development. Visit our website to learn more, and don't hesitate to ask us to develop your next big WordPress plugin idea.*
= Features =
- Adds a dedicated Podcasting feed with full iTunes support
- Includes the ability to have multiple podcasting feeds based on file format or other factors
- Includes both an audio and video player for in-post listening/watching
- Fully integrates with any existing enclosures already stored in WordPress
- Offers a migration tool for users of podPress
For more information, visit the [Podcasting plugin page](http://plugins.spiralwebconsulting.com/podcasting.html).
== Installation ==
Please visit [Spiral Web Consulting's forum](http://plugins.spiralwebconsulting.com/forums/viewtopic.php?f=8&t=22) for installation information.
== Frequently Asked Questions ==
Please visit [Spiral Web Consulting's forum](http://plugins.spiralwebconsulting.com/forums/viewforum.php?f=8) for the latest FAQ information.
== Screenshots ==
1. An example of the Podcasting enclosure box before a podcast is added.
2. The Podcasting enclosure box with an example podcast added.
3. The audio player before an episode begins playing.
4. The audio player in the middle of an episode.
5. The video player before an episode is playing.
Please visit the [Podcasting plugin page](http://plugins.spiralwebconsulting.com/podcasting.html#screenshots) for more screenshots.
== Changelog ==
= 2.3 =
* Now displays the surrounding player text in feeds with a download link.
* Adds support for the Send to Editor button to work with text editors other than tinyMCE.
* Removes a foreach warning message that could appear at the top of a blog page if PHP error reporting is enabled and no formats are specified.
= 2.2.5 =
* Corrects incorrectly stripped characters from a feed's itunes:summary and itunes:subtitle tags.
= 2.2.4 =
* Corrects incorrectly stripped characters from a feed's itunes:summary and itunes:subtitle tags.
* Corrects auto detect url for format feeds.
= 2.2.3 =
* Fixes a bug that was breaking the save button on the settings page in IE.
= 2.2.2 =
* Adds missing WordPress menu call that prevented users from loading the settings page under WordPress 2.8.1.
* Adds a new advanced option to disable the 404 check. Only use this option if you know what you're doing.
* Moves the disable auto-enclose option to a new Advanced Options subheading on the settings page.
= 2.2.1 =
* Adds support for WordPress' new changelog readme.txt standard. Version information is now available from within the plugin updater.
* Enhances the links on the plugin page. Adds a settings, FAQ, and support link.
= 2.2 =
* Fixes the disappearing / missing enclosure bug introduced with WordPress 2.8's new "enclosure prune" method.
* Adds a second-line of defense fix to WordPress 2.8's "enclosure prune" method that will prevent enclosures from becoming garbled serialized text.
* Adds logic to disable the add podcast button for 3 seconds to prevent duplicate enclosures.
* Adds an additional error message for non-standard http responses.
* Improves 404 detection for HTML error pages.
= 2.1.2 =
* Adds error messages to the admin AJAX calls.
* Adds comment with version number to header output.
= 2.1.1 =
* Fixes a UTF8 feed title encoding problem.
* Supports WordPress 2.8.
= 2.1 =
* Adds local detection of mime types and file size. No longer requires an external connection to successfully enclose a file.
* Removes stray player code that appears on some WordPress theme pages using the_excerpt.
* Upgrades the JW FLV Media Player to version 4.4.
* Adds player support (via JW FLV Media Player) for m4a files.
= 2.0.4 =
* Fixes encoding issues with certain file URLs. This should eliminate the cURL issue for most people.
= 2.0.3 =
* Corrects an incorrect function call in the podPress importer left over from converting to a class-based plugin.
= 2.02 =
* Corrects issue where a manually inserted player would not prevent the automatic player from being added.
= 2.01 =
* Fixes a blank page issue when automatically including the podcast player on posts.
= 2.0 =
* Podcasting is now supported by Spiral Web Consulting.
* Corrects feed URL issues when a category with the name "podcast" existed. Note: Due to this change, the URL for format feeds has changed slightly.
* Fixes a bug that prevented new enclosures from being added.
* Converts Podcasting to a class-based plugin. This will make adding new features easier.
* Drastically improves new/edit enclosure interface to conform with WordPress 2.7 design standards.
* Adds an option to disable WordPress' automatic enclosing of file URLs.
* Allows HTML to be entered in the text fields surrounding players.
* Adds an option to use the video player for audio files.
* Adds support for handling 404 error situations more gracefully.
= 2.0b20 =
* Corrects broken format feeds.
* Adds several better methods for enclosing a feed (mainly fixing redirects not working).
* Fixes all known feed validation issues as well as a few that would prevent iTunes clients from reading the feed.
= 2.0b19 =
* Fixes an error that could occur if cURL is missing from PHP.
= 2.0b18 =
* Corrects encoding issues with video file download links.
= 2.0b17 =
* Resolves an issue where enclosures could disappear from the main feed when Podcasting is activated.
* Resolves an issue where a local enclosure was not working for some users do to a missing magic_mime on their server.
= 2.0b16 =
* Corrects a PHP warning that could occur prevent an enclosure from occurring.
= 2.0b15 =
* Corrects a bug in remote file retrieval present since beta 13.
= 2.0b14 =
* Applies the fixes in beta 13 to the podPress importer.
* Fixes a rare PHP error related to the local enclosure attempt.
* Corrects a potential XHTML error with certain themes.
= 2.0b13 =
* Greatly improves enclosure retrieval. If the file cant be accessed via the internet, a local attempt will be made. Anyone experiencing the missing enclosures bug should upgrade to this version.
* Adds a notification if there are issues connecting to the file.
* Corrects some plugin conflicts.
* Fixes issues with foreign characters in the blog title.
= 2.0b12 =
* Corrects an XML warning and error in the podcast feed related to the iTunes image.
* Removes a warning that could display during a podPress import.
= 2.0b11 =
* Adds support for importing via WPMU.
* Fixes a bug where the podPress importer would not handle relative URLs correctly.
= 2.0b10 =
* Improves file type detection for the Send to Editor button.
* Corrects an XML warning in the podcast feed related to the iTunes image.
* Improves robustness of script additions, possibly fixing some IE scripting errors.
* Fixes some errors where importing from podPress would fail.
= 2.0b9 =
* Now alerts the user if the file they enter does not exist (404). This should help weed out the mysterious disappearing enclosures.
* Fixes a conflict with some of WordPress 2.7s admin jQuery (namely the show button in the media gallery).
* Corrects an XML warning in the podcast feed related to the iTunes image.
= 2.0b8 =
* Corrects an error message related to the new automatic player addition.
= 2.0b7 =
* Supports WordPress 2.7 and now requires WordPress 2.6.
* Includes an importer for migrating from podPress.
* Adds a video player (JW FLV Player) and updates the audio player (WordPress Audio Player 2.0).
* Adds an option to automatically include players above or below the content of a post.
* Adds options to configure player variables on a global or per player basis.
* Adds options for placing text above, before, and below a player, while specifying a field as a “download link”.
* Adds a more robust method for enclosing files. This new method adds relative URL support, support for enclosing any type of file, and should alleviate the problems most users were having. If a server issue is detected, a warning is displayed with more information on how to correct the problem.
* Adds an option to configure the language of RSS feeds.
* Adds a standard RSS image tag to the feed when itunes:artwork is used.
* Fixes countless potential feed validation issues.
= 1.65 =
* Corrects saved draft issue brought on by WordPress 2.6.
= 1.64 =
* Adds missing image showing the audio players colors.
* Fixes a bug where changing a formats slug would forget the formats explicit setting.
= 1.63 =
* Corrects typo preventing 1.62s fix from working.
= 1.62 =
* Resolves an issue where an episode would not be saved once navigating away from the page.
= 1.61 =
* Resolves an issue where certain URL characters such as spaces would cause a failure creating an enclosure.
* Resolves validation issues with the RSS feed.
= 1.6 =
* Adds options to configure the audio players colors.
= 1.52 =
* The player is no longer replaced with the text “Download Podcast” in feeds to prevent that text from showing up in iTunes descriptions when the player is inserted first in a post.
= 1.51 =
* Fixes the Send to Editor button when the visual editor is disabled.
= 1.5 =
* Fixes compatibility issues with WordPress 2.5.
* Updates to the user interface to reflect the changes in 2.5.
* Episode addition interface is now fully AJAX. Add and delete episodes without having to refresh the page.
* Converts [podcast] tag to new shortcode API.
* Fixes Send to Editor button not working on the visual editor.
* Note: Version 1.5 requires WordPress 2.5.
= 1.02 =
* Fixes a critical Javascript error affecting Internet Explorer and possibly other browsers.
* It is recommended to install this update as soon as possible.
= 1.01 =
* Fixes a conflict with the Feedburner Feedsmith plugin.
* Resolves AJAX errors when managing formats.
= 1.0 =
* Initial release.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

@@ -1,121 +0,0 @@
<?php
/*
A simple library class to ease the use of a further level of submenus in the admin pages
Uses no javascript but 'borrows' some CSS it shouldn't
*/
define('ADMIN_SUBPAGES_LIBRARY', true);
class admin_subpages {
var $pages = array();
var $parent_page = '';
var $current_page = array();
function admin_subpages($parent_page='') {
register_shutdown_function(array(&$this, "__destruct"));
$this->__construct($parent_page);
}
function __construct($parent_page='') {
if ($parent_page === '') {
$parent_page = $_SERVER['QUERY_STRING'];
$p1 = strpos($parent_page, 'page=');
$p2 = strpos($parent_page, '&');
if ($p2 === false) {
$parent_page = substr($parent_page, $p1+5);
} else {
$parent_page = substr($parent_page, $p1+5, $p2-$p1-5);
}
}
$this->parent_page = $parent_page;
}
function __destruct() {
}
function add_subpage($title, $slug, $view) {
$this->pages[] = array('title' => $title, 'slug' => $slug, 'view' => $view);
}
function add_subpages($pages) {
foreach ($pages as $page) {
$this->pages[] = array('title' => $page[0], 'slug' => $page[1], 'view' => $page[2]);
}
}
function page_from_slug($slug) {
if (!isset($slug)) {
return $this->pages[0];
}
foreach ($this->pages as $page) {
if ($page['slug'] === $slug) {
return $page;
}
}
die('non-existent slug');
}
function display_menu() {
echo "\n<ul id=\"submenu\" style=\"display: block\">\n";
// for compatibility with WP mu
$base = ($_SERVER['REDIRECT_URL']) ? $_SERVER['REDIRECT_URL'] : $_SERVER['PHP_SELF'];
$base .= '?page=' . $this->parent_page . '&subpage=';
$this->current_page = $this->page_from_slug($_GET['subpage']);
foreach($this->pages as $page) {
if($page === $this->current_page) {
echo "<li style=\"display: inline\"><a href=\"$base{$page['slug']}\" class=\"current\" style=\"display: inline\">{$page['title']}</a></li>\n";
} else {
echo "<li style=\"display: inline\"><a href=\"$base{$page['slug']}\" style=\"display: inline\">{$page['title']}</a></li>\n";
}
}
echo "</ul>\n";
}
function display_view() {
$this->current_page['view']();
}
function display() {
$this->display_menu();
$this->display_view();
}
}
/* ?>
<script type="text/javascript">
if (document.styleSheets) {
document.getElementById("submenu").id = "subpage";
for (var i=0; i<document.styleSheets.length; i++) {
var styleSheet = document.styleSheets[i];
var ii = 0;
var cssRule = false;
do {
if (styleSheet.cssRules) {
cssRule = styleSheet.cssRules[ii];
} else {
cssRule = styleSheet.rules[ii];
}
if (cssRule && cssRule.selectorText) {
var rulebits = cssRule.selectorText.toLowerCase().split(",");
for (var j=0; j<rulebits.length; j++) {
if (rulebits[j].indexOf('#submenu') != -1) {
if (styleSheet.insertRule)
styleSheet.insertRule(rulebits[j].replace('#submenu','#subpage') + ' {' + cssRule.style.cssText + '}', styleSheet.cssRules.length);
else
styleSheet.addRule(rulebits[j].replace('#submenu','#subpage'), cssRule.style.cssText, -1);
}
}
}
ii++;
} while (cssRule)
}
}
</script>
<?php
*/
?>
File diff suppressed because it is too large Load Diff
@@ -1,648 +0,0 @@
<?php
/*
Library for the Recent Posts, Random Posts, Recent Comments, and Similar Posts plugins
-- provides the routines which the plugins share
*/
define('CF_LIBRARY', true);
function ppl_parse_args($args) {
// $args is of the form 'key1=val1&key2=val2'
// The code copes with null values, e.g., 'key1=&key2=val2'
// and arguments with embedded '=', e.g. 'output_template=<li class="stuff">{...}</li>'.
$result = array();
if($args){
// the default separator is '&' but you may wish to include the character in a title, say,
// so you can specify an alternative separator by making the first character of $args
// '&' and the second character your new separator...
if (substr($args, 0, 1) === '&') {
$s = substr($args, 1, 1);
$args = substr($args, 2);
} else {
$s = '&';
}
// separate the arguments into key=value pairs
$arguments = explode($s, $args);
foreach($arguments as $arg){
if($arg){
// find the position of the first '='
$i = strpos($arg, '=');
// if not a valid format ('key=value) we ignore it
if ($i){
$key = substr($arg, 0, $i);
$val = substr($arg, $i+1);
$result[$key]=$val;
}
}
}
}
return $result;
}
function ppl_set_options($option_key, $arg, $default_output_template) {
$options = get_option($option_key);
// deal with compound options
if (isset($arg['custom-key'])) {$arg['custom']['key'] = $arg['custom-key']; unset($arg['custom-key']);}
if (isset($arg['custom-op'])) {$arg['custom']['op'] = $arg['custom-op']; unset($arg['custom-op']);}
if (isset($arg['custom-value'])) {$arg['custom']['value'] = $arg['custom-value']; unset($arg['custom-value']);}
if (isset($arg['age-direction'])) {$arg['age']['direction'] = $arg['age-direction']; unset($arg['age-direction']);}
if (isset($arg['age-length'])) {$arg['age']['length'] = $arg['age-length']; unset($arg['age-length']);}
if (isset($arg['age-duration'])) {$arg['age']['duration'] = $arg['age-duration']; unset($arg['age-duration']);}
if (isset($arg['sort-by1'])) {$arg['sort']['by1'] = $arg['sort-by1']; unset($arg['sort-by1']);}
if (isset($arg['sort-order1'])) {$arg['sort']['order1'] = $arg['sort-order1']; unset($arg['sort-order1']);}
if (isset($arg['sort-case1'])) {$arg['sort']['case1'] = $arg['sort-case1']; unset($arg['sort-case1']);}
if (isset($arg['sort-by2'])) {$arg['sort']['by2'] = $arg['sort-by2']; unset($arg['sort-by2']);}
if (isset($arg['sort-order2'])) {$arg['sort']['order2'] = $arg['sort-order2']; unset($arg['sort-order2']);}
if (isset($arg['sort-case2'])) {$arg['sort']['case2'] = $arg['sort-case2']; unset($arg['sort-case2']);}
if (isset($arg['status-publish'])) {$arg['status']['publish'] = $arg['status-publish']; unset($arg['status-publish']);}
if (isset($arg['status-private'])) {$arg['status']['private'] = $arg['status-private']; unset($arg['status-private']);}
if (isset($arg['status-draft'])) {$arg['status']['draft'] = $arg['status-draft']; unset($arg['status-draft']);}
if (isset($arg['status-future'])) {$arg['status']['future'] = $arg['status-future']; unset($arg['status-future']);}
// then fill in the defaults
if (!isset($arg['limit'])) $arg['limit'] = stripslashes($options['limit']);
if (!isset($arg['skip'])) $arg['skip'] = stripslashes($options['skip']);
if (!isset($arg['divider'])) $arg['divider'] = stripslashes($options['divider']);
if (!isset($arg['omit_current_post'])) $arg['omit_current_post'] = $options['omit_current_post'];
if (!isset($arg['just_current_post'])) $arg['just_current_post'] = $options['just_current_post'];
if (!isset($arg['show_private'])) $arg['show_private'] = $options['show_private'];
if (!isset($arg['show_pages'])) $arg['show_pages'] = $options['show_pages'];
if (!isset($arg['show_attachments'])) $arg['show_attachments'] = $options['show_attachments'];
if (!isset($arg['none_text'])) $arg['none_text'] = stripslashes($options['none_text']);
if (!isset($arg['no_text'])) $arg['no_text'] = $options['no_text'];
if (!isset($arg['tag_str'])) $arg['tag_str'] = stripslashes($options['tag_str']);
if (!isset($arg['excluded_cats'])) $arg['excluded_cats'] = stripslashes($options['excluded_cats']);
if (!isset($arg['included_cats'])) $arg['included_cats'] = stripslashes($options['included_cats']);
if (!isset($arg['excluded_authors'])) $arg['excluded_authors'] = stripslashes($options['excluded_authors']);
if (!isset($arg['included_authors'])) $arg['included_authors'] = stripslashes($options['included_authors']);
if (!isset($arg['excluded_posts'])) $arg['excluded_posts'] = stripslashes($options['excluded_posts']);
if (!isset($arg['included_posts'])) $arg['included_posts'] = stripslashes($options['included_posts']);
if (!isset($arg['stripcodes'])) $arg['stripcodes'] = $options['stripcodes'];
if (!isset($arg['prefix'])) $arg['prefix'] = stripslashes($options['prefix']);
if (!isset($arg['suffix'])) $arg['suffix'] = stripslashes($options['suffix']);
if (!isset($arg['output_template'])) $arg['output_template'] = stripslashes($options['output_template']);
// an empty output_template makes no sense so we fall back to the default
if ($arg['output_template'] == '') $arg['output_template'] = $default_output_template;
if (!isset($arg['match_cat'])) $arg['match_cat'] = $options['match_cat'];
if (!isset($arg['match_tags'])) $arg['match_tags'] = $options['match_tags'];
if (!isset($arg['match_author'])) $arg['match_author'] = $options['match_author'];
if (!isset($arg['age'])) $arg['age'] = $options['age'];
if (!isset($arg['custom'])) $arg['custom'] = $options['custom'];
if (!isset($arg['sort'])) $arg['sort'] = $options['sort'];
if (!isset($arg['status'])) $arg['status'] = $options['status'];
// just for recent_posts
if (!isset($arg['date_modified'])) $arg['date_modified'] = $options['date_modified'];
// just for recent_comments
if (!isset($arg['group_by'])) $arg['group_by'] = $options['group_by'];
if (!isset($arg['group_template'])) $arg['group_template'] = stripslashes($options['group_template']);
if (!isset($arg['show_type'])) $arg['show_type'] = $options['show_type'];
if (!isset($arg['no_author_comments'])) $arg['no_author_comments'] = $options['no_author_comments'];
if (!isset($arg['no_user_comments'])) $arg['no_user_comments'] = $options['no_user_comments'];
if (!isset($arg['unique'])) $arg['unique'] = $options['unique'];
// just for similar_posts[feed]
if (!isset($arg['combine'])) $arg['combine'] = $options['crossmatch'];
if (!isset($arg['weight_content'])) $arg['weight_content'] = $options['weight_content'];
if (!isset($arg['weight_title'])) $arg['weight_title'] = $options['weight_title'];
if (!isset($arg['weight_tags'])) $arg['weight_tags'] = $options['weight_tags'];
if (!isset($arg['num_terms'])) $arg['num_terms'] = stripslashes($options['num_terms']);
if (!isset($arg['term_extraction'])) $arg['term_extraction'] = $options['term_extraction'];
if (!isset($arg['hand_links'])) $arg['hand_links'] = $options['hand_links'];
// just for other_posts
if (!isset($arg['orderby'])) $arg['orderby'] = stripslashes($options['orderby']);
if (!isset($arg['orderby_order'])) $arg['orderby_order'] = $options['orderby_order'];
if (!isset($arg['orderby_case'])) $arg['orderby_case'] = $options['orderby_case'];
// the last options cannot be set via arguments
$arg['stripcodes'] = $options['stripcodes'];
$arg['utf8'] = $options['utf8'];
$arg['cjk'] = $options['cjk'];
$arg['use_stemmer'] = $options['use_stemmer'];
$arg['batch'] = $options['batch'];
$arg['content_filter'] = $options['content_filter'];
$arg['widget_parameters'] = stripslashes($options['widget_parameters']);
$arg['widget_condition'] = stripslashes($options['widget_condition']);
$arg['feed_on'] = $options['feed_on'];
$arg['feed_priority'] = $options['feed_priority'];
$arg['feed_parameters'] = stripslashes($options['feed_parameters']);
$arg['append_on'] = $options['append_on'];
$arg['append_priority'] = $options['append_priority'];
$arg['append_parameters'] = stripslashes($options['append_parameters']);
$arg['append_condition'] = stripslashes($options['append_condition']);
$arg['exclude_users'] = $options['exclude_users'];
$arg['count_home'] = $options['count_home'];
$arg['count_feed'] = $options['count_feed'];
$arg['count_single'] = $options['count_single'];
$arg['count_archive'] = $options['count_archive'];
$arg['count_category'] = $options['count_category'];
$arg['count_page'] = $options['count_page'];
$arg['count_search'] = $options['count_search'];
return $arg;
}
function ppl_prepare_template($template) {
// Now we process the output_template to find the embedded tags which are to be replaced
// with values taken from the database.
// A tag is of the form, {tag:ext}, where the tag part will be evaluated and replaced
// and the optional ext part provides extra data pertinent to that tag
preg_match_all('/{((?:[^{}]|{[^{}]*})*)}/', $template, $matches);
$translations = array();
foreach ($matches[1] as $match) {
list($tag, $ext) = explode(':', $match, 2);
$action = output_tag_action($tag);
if (function_exists($action)) {
// store the action that instantiates the tag
$translations['acts'][] = $action;
// add the tag in a form ready to use in translation later
$translations['fulltags'][] = '{'.$match.'}';
// the extra data if any
$translations['exts'][] = $ext;
}
}
return $translations;
}
function ppl_expand_template($result, $template, $translations, $option_key) {
global $wpdb, $wp_version;
$replacements = array();
$numtags = count($translations['fulltags']);
for ($i = 0; $i < $numtags; $i++) {
$fulltag = $translations['fulltags'][$i];
$act = $translations['acts'][$i];
$ext = $translations['exts'][$i];
$replacements[$fulltag] = $act($option_key, $result, $ext);
}
// Replace every valid tag with its value
$tmp = strtr($template, $replacements)."\n";
return $tmp;
}
function ppl_sort_items($sort, $results, $option_key, $group_template, $items) {
$translations1 = ppl_prepare_template($sort['by1']);
foreach ($results as $result) {
$key1 = ppl_expand_template($result, $sort['by1'], $translations1, $option_key);
if ($sort['case1'] !== 'false') $key1 = strtolower($key1);
$keys1[] = $key1;
}
if ($sort['by2'] !== '') {
$translations2 = ppl_prepare_template($sort['by2']);
foreach ($results as $result) {
$key2 = ppl_expand_template($result, $sort['by2'], $translations2, $option_key);
if ($sort['case2'] !== 'false') $key2 = strtolower($key2);
$keys2[] = $key2;
}
}
if (!empty($keys2)) {
array_multisort($keys1, intval($sort['order1']), $keys2, intval($sort['order2']), $results, $items);
} else {
array_multisort($keys1, intval($sort['order1']), $results, $items);
}
// merge the group titles into the items
if ($group_template) {
$group_translations = ppl_prepare_template($group_template);
$prev_key = '';
$insertions = 0;
foreach ($keys1 as $n => $key) {
if ($prev_key !== $key) {
array_splice($items, $n+$insertions, 0, ppl_expand_template($results[$n], $group_template, $group_translations, $option_key));
$insertions++;
}
$prev_key = $key;
}
}
return $items;
}
// the $post global can be overwritten by the use of $wp_query so we go back to the source
// note the addition of a 'manual overide' allowing the current posts to me marked by similar_posts_mark_current for example
function ppl_current_post_id($manual_current_ID = -1) {
$the_ID = -1;
if ($manual_current_ID > 0) {
$the_ID = $manual_current_ID;
} else if (isset($GLOBALS['wp_the_query'])) {
$the_ID = $GLOBALS['wp_the_query']->post->ID;
if (!$the_ID) $the_ID = $GLOBALS['wp_the_query']->posts[0]->ID;
} else {
$the_ID = $GLOBALS['post']->ID;
}
return $the_ID;
}
/*
Functions to fill in the WHERE part of the workhorse SQL
*/
function where_match_author() {
$current_author = $GLOBALS['wp_the_query']->post->post_author;
return "post_author = $current_author";
}
function where_match_tags($match_tags) {
global $wpdb, $wp_version;
$args = array('fields' => 'ids');
$tag_ids = wp_get_object_terms(ppl_current_post_id(), 'post_tag', $args);
if ( is_array($tag_ids) && count($tag_ids) > 0 ) {
if ($match_tags === 'any') {
$ids = get_objects_in_term($tag_ids, 'post_tag');
} else {
$ids = array();
foreach ($tag_ids as $tag_id){
if (count($ids) > 0) {
$ids = array_intersect($ids, get_objects_in_term($tag_id, 'post_tag'));
} else {
$ids = get_objects_in_term($tag_id, 'post_tag');
}
}
}
if ( is_array($ids) && count($ids) > 0 ) {
$ids = array_unique($ids);
$out_posts = "'" . implode("', '", $ids) . "'";
$sql = "$wpdb->posts.ID IN ($out_posts)";
} else {
$sql = "1 = 2";
}
} else {
$sql = "1 = 2";
}
return $sql;
}
function where_show_pages($show_pages, $show_attachments='false') {
if (function_exists('get_post_type')) {
$typelist = array();
if ($show_attachments === 'true') {$typelist[] = "'attachment'";};
if ($show_pages === 'true') {$typelist[] = "'page'"; $typelist[] = "'post'";}
else if ($show_pages === 'false') {$typelist[] = "'post'";}
else if ($show_pages === 'but') {$typelist[] = "'page'";};
if (count($typelist)===1) {
$sql = "post_type=$typelist[0]";
} else {
$sql = "post_type IN (" . implode(',',$typelist) . ")";
}
} else {
if ($show_pages === 'true') $sql = "post_status IN ('publish', 'static')";
else if ($show_pages === 'false') $sql = "post_status = 'publish'";
else if ($show_pages === 'but') $sql = "post_status = 'static'";
}
return $sql;
}
function where_show_status($status, $include_inherit='false') {
$set = array();
$status = (array) $status;
// a quick way of allowing for attachments having status=inherit
if ($include_inherit === 'true') $status['inherit'] = 'true';
foreach ($status as $name => $state) {
if ($state === 'true') $set[] = "'$name'";
}
if ($set) {
$result = implode(',', $set);
return "post_status IN ($result)";
} else {
return "1 = 2";
}
}
// a replacement, for WP < 2.3, ONLY category children
if (!function_exists('get_term_children')) {
function get_term_children($term, $taxonomy) {
if ($taxonomies !== 'category') return array();
return get_categories('child_of='.$term);
}
}
// a replacement, for WP < 2.3, ONLY to get posts with given category IDs
if (!function_exists('get_objects_in_term')) {
function get_objects_in_term($terms, $taxonomies) {
global $wpdb;
if ($taxonomies !== 'category') return array();
$terms = "'" . implode("', '", $terms) . "'";
$object_ids = $wpdb->get_col("SELECT post_id FROM $wpdb->post2cat WHERE category_id IN ($terms)");
if (!$object_ids) return array();
return $object_ids;
}
}
function where_match_category() {
global $wpdb, $wp_version;
$cat_ids = '';
foreach(get_the_category() as $cat) {
if ($cat->cat_ID) $cat_ids .= $cat->cat_ID . ',';
}
$cat_ids = rtrim($cat_ids, ',');
$catarray = explode(',', $cat_ids);
foreach ( $catarray as $cat ) {
$catarray = array_merge($catarray, get_term_children($cat, 'category'));
}
$catarray = array_unique($catarray);
$ids = get_objects_in_term($catarray, 'category');
$ids = array_unique($ids);
if ( is_array($ids) && count($ids) > 0 ) {
$out_posts = "'" . implode("', '", $ids) . "'";
$sql = "$wpdb->posts.ID IN ($out_posts)";
} else {
$sql = "1 = 2";
}
return $sql;
}
function where_included_cats($included_cats) {
global $wpdb, $wp_version;
$catarray = explode(',', $included_cats);
foreach ( $catarray as $cat ) {
$catarray = array_merge($catarray, get_term_children($cat, 'category'));
}
$catarray = array_unique($catarray);
$ids = get_objects_in_term($catarray, 'category');
if ( is_array($ids) && count($ids) > 0 ) {
$ids = array_unique($ids);
$in_posts = "'" . implode("', '", $ids) . "'";
$sql = "ID IN ($in_posts)";
} else {
$sql = "1 = 2";
}
return $sql;
}
function where_excluded_cats($excluded_cats) {
global $wpdb, $wp_version;
$catarray = explode(',', $excluded_cats);
foreach ( $catarray as $cat ) {
$catarray = array_merge($catarray, get_term_children($cat, 'category'));
}
$catarray = array_unique($catarray);
$ids = get_objects_in_term($catarray, 'category');
if ( is_array($ids) && count($ids) > 0 ) {
$out_posts = "'" . implode("', '", $ids) . "'";
$sql = "$wpdb->posts.ID NOT IN ($out_posts)";
} else {
$sql = "1 = 1";
}
return $sql;
}
function where_excluded_authors($excluded_authors){
return "post_author NOT IN ( $excluded_authors )";
}
function where_included_authors($included_authors){
return "post_author IN ( $included_authors )";
}
function where_excluded_posts($excluded_posts) {
return "ID NOT IN ( $excluded_posts )";
}
function where_included_posts($included_posts) {
return "ID IN ( $included_posts )";
}
function where_tag_str($tag_str) {
global $wpdb;
if ( strpos($tag_str, ',') !== false ) {
$intags = explode(',', $tag_str);
foreach ( (array) $intags as $tag ) {
$tags[] = sanitize_term_field('name', $tag, 0, 'post_tag', 'db');
}
$tag_type = 'any';
} else if ( strpos($tag_str, '+') !== false ) {
$intags = explode('+', $tag_str);
foreach ( (array) $intags as $tag ) {
$tags[] = sanitize_term_field('name', $tag, 0, 'post_tag', 'db');
}
$tag_type = 'all';
} else {
$tags[] = sanitize_term_field('name', $tag_str, 0, 'post_tag', 'db');
$tag_type = 'any';
}
$ids = array();
if ($tag_type == 'any') {
foreach ($tags as $tag){
if (is_term($tag, 'post_tag')) {
$t = get_term_by('name', $tag, 'post_tag');
$ids = array_merge($ids, get_objects_in_term($t->term_id, 'post_tag'));
}
}
} else {
foreach ($tags as $tag){
if (is_term($tag, 'post_tag')) {
$t = get_term_by('name', $tag, 'post_tag');
if (count($ids) > 0) {
$ids = array_intersect($ids, get_objects_in_term($t->term_id, 'post_tag'));
} else {
$ids = get_objects_in_term($t->term_id, 'post_tag');
}
}
}
}
if ( is_array($ids) && count($ids) > 0 ) {
$ids = array_unique($ids);
$out_posts = "'" . implode("', '", $ids) . "'";
$sql .= "$wpdb->posts.ID IN ($out_posts)";
} else $sql .= "1 = 2";
return $sql;
}
// note the addition of a 'manual overide' allowing the current posts to me marked by similar_posts_mark_current for example
function where_omit_post($manual_current_ID = -1) {
$postid = ppl_current_post_id($manual_current_ID);
if ($postid <= 1) $postid = -1;
return "ID != $postid";
}
function where_just_post() {
$postid = ppl_current_post_id();
if ($postid <= 1) $postid = -1;
return "ID = $postid";
}
function where_hide_pass() {
return "post_password =''";
}
function where_hide_future() {
// from wp 2.1 future posts are taken care of by post status
$time_difference = get_option('gmt_offset');
$now = gmdate("Y-m-d H:i:s",(time()+($time_difference*3600)));
$sql = "post_date <= '$now'";
return $sql;
}
function where_fulltext_match($weight_title, $titleterms, $weight_content, $contentterms, $weight_tags, $tagterms) {
$wsql = array();
if ($weight_title) $wsql[] = "MATCH (`title`) AGAINST ( \"$titleterms\" )";
if ($weight_content) $wsql[] = "MATCH (`content`) AGAINST ( \"$contentterms\" )";
if ($weight_tags) $wsql[] = "MATCH (`tags`) AGAINST ( \"$tagterms\" )";
return '(' . implode(' OR ', $wsql) . ') ' ;
}
function where_author_comments() {
$author_email = get_the_author_email();
return "'$author_email' != comment_author_email";
}
function where_user_comments() {
return "user_id = 0";
}
function score_fulltext_match($table_name, $weight_title, $titleterms, $weight_content, $contentterms, $weight_tags, $tagterms, $forced_ids='') {
global $wpdb;
$wsql = array();
if ($weight_title) $wsql[] = "(".number_format($weight_title, 4, '.', '')." * (MATCH (`title`) AGAINST ( \"$titleterms\" )))";
if ($weight_content) $wsql[] = "(".number_format($weight_content, 4, '.', '')." * (MATCH (`content`) AGAINST ( \"$contentterms\" )))";
if ($weight_tags) $wsql[] = "(".number_format($weight_tags, 4, '.', '')." * (MATCH (`tags`) AGAINST ( \"$tagterms\" )))";
if ($forced_ids) {
// apply a delta function to boost the score for certain IDs
$fIDs = explode(',', $forced_ids);
foreach($fIDs as $fID) {
$wsql[] = "100 * (1 - SIGN(ID ^ $fID))"; // the previous delta was $wsql[] = "100*EXP(-10*POW((ID-$fID),2))";
}
}
return '(' . implode(' + ', $wsql) . " ) as score FROM `$table_name` LEFT JOIN `$wpdb->posts` ON `pID` = `ID` ";
}
function where_comment_type($comment_type) {
if ($comment_type === 'comments') $sql = "comment_type = ''";
elseif ($comment_type === 'trackbacks') $sql = "comment_type != ''";
return $sql;
}
function where_check_age($direction, $length, $duration) {
global $wp_version;
if ('none' === $direction) return '';
$age = "DATE_SUB(CURDATE(), INTERVAL $length $duration)";
// we only filter out posts based on age, not pages
if ('before' === $direction) {
if (function_exists('get_post_type')) {
return "(post_date <= $age OR post_type='page')";
} else {
return "(post_date <= $age OR post_status='static')";
}
} else {
if (function_exists('get_post_type')) {
return "(post_date >= $age OR post_type='page')";
} else {
return "(post_date >= $age OR post_status='static')";
}
}
}
function where_check_custom($key, $op, $value) {
if ($op === 'EXISTS') {
return "meta_key = '$key'";
} else {
return "(meta_key = '$key' && meta_value $op '$value')";
}
}
/*
End of SQL functions
*/
function ppl_microtime() {
list($usec, $sec) = explode(" ", microtime());
return ((float)$usec + (float)$sec);
}
/*
Some routines to handle appending output
*/
// array of what to append to posts
global $ppl_filter_data;
$ppl_filter_data = array();
// each plugin calls this on startup to have content scanned for its own tag
function ppl_register_post_filter($type, $key, $class, $condition='') {
global $ppl_filter_data;
$options = get_option($key);
$priority = $options[$type . '_priority'];
$parameters = stripslashes($options[$type . '_parameters']);
$ppl_filter_data [] = array('type' => $type, 'priority' => $priority, 'class' => $class, 'parameters' => $parameters, 'key' => $key, 'condition' => stripslashes($condition));
// we want them in decreasing priority
sort($ppl_filter_data);
}
function ppl_post_filter($content) {
global $ppl_filter_data;
foreach ($ppl_filter_data as $data) {
if (('append' === $data['type'] && !is_feed() && eval($data['condition'])) || ('feed' === $data['type'] && is_feed()) )
$content .= call_user_func_array(array($data['class'], 'execute'), array($data['parameters'], '<li>{link}</li>', $data['key']));
}
return $content;
}
function ppl_post_filter_init() {
global $ppl_filter_data;
if (!$ppl_filter_data) return;
add_filter('the_content', 'ppl_post_filter', 5);
}
// watch out that the registration functions are called earlier
add_action ('init', 'ppl_post_filter_init');
/*
Now some routines to handle content filtering
*/
// the '|'-separated list of valid content filter tags
global $ppl_filter_tags;
// each plugin calls this on startup to have content scanned for its own tag
function ppl_register_content_filter($tag) {
global $ppl_filter_tags;
if (!$ppl_filter_tags) {
$ppl_filter_tags = $tag;
} else {
$tags = explode('|', $ppl_filter_tags);
$tags[] = $tag;
$tags = array_unique($tags);
$ppl_filter_tags = implode('|', $tags);
}
}
function ppl_do_replace($matches) {
return call_user_func(array($matches[1], 'execute'), $matches[2]);
}
function ppl_content_filter($content) {
global $ppl_filter_tags;
// replaces every instance of "<!--RecentPosts-->", for example, with the output of the plugin
// the filter tag can be followed by text which will be used as a parameter string to change the behaviour of the plugin
return preg_replace_callback("/<!--($ppl_filter_tags)\s*(.*)-->/", "ppl_do_replace", $content);
}
function ppl_content_filter_init() {
global $ppl_filter_tags;
if (!$ppl_filter_tags) return;
add_filter( 'the_content', 'ppl_content_filter', 5 );
add_filter( 'the_content_rss', 'ppl_content_filter', 5 );
add_filter( 'the_excerpt', 'ppl_content_filter', 5 );
add_filter( 'the_excerpt_rss', 'ppl_content_filter', 5 );
add_filter( 'widget_text', 'ppl_content_filter', 5 );
}
// watch out that the registration functions are called earlier
add_action ('init', 'ppl_content_filter_init');
add_action ('init', 'ppl_post_filter_init');
?>
File diff suppressed because it is too large Load Diff
@@ -1,45 +0,0 @@
<?php
/*
Plugin Name: Post-Plugin Library
Plugin URI: http://rmarsh.com/plugins/post-plugin-library/
Description: Does nothing by itself but supplies common code for the <a href="http://rmarsh.com/plugins/similar-posts/">Similar Posts</a>, <a href="http://rmarsh.com/plugins/recent-posts/">Recent Posts</a>, <a href="http://rmarsh.com/plugins/random-posts/">Random Posts</a>, and <a href="http://rmarsh.com/plugins/recent-comments/">Recent Comments</a> plugins. Make sure you have the latest version of this plugin.
Author: Rob Marsh, SJ
Version: 2.6.2.1
Author URI: http://rmarsh.com/
*/
/*
Copyright 2008 Rob Marsh, SJ (http://rmarsh.com)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
define ('POST_PLUGIN_LIBRARY', true);
if ( ! defined( 'WP_CONTENT_URL' ) )
define( 'WP_CONTENT_URL', get_option( 'siteurl' ) . '/wp-content' );
if ( ! defined( 'WP_CONTENT_DIR' ) )
define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' );
if ( ! defined( 'WP_PLUGIN_URL' ) )
define( 'WP_PLUGIN_URL', WP_CONTENT_URL. '/plugins' );
if ( ! defined( 'WP_PLUGIN_DIR' ) )
define( 'WP_PLUGIN_DIR', WP_CONTENT_DIR . '/plugins' );
if (!defined('CF_LIBRARY')) require(WP_PLUGIN_DIR.'/post-plugin-library/common_functions.php');
if (!defined('ACF_LIBRARY')) require(WP_PLUGIN_DIR.'/post-plugin-library/admin_common_functions.php');
if (!defined('OT_LIBRARY')) require(WP_PLUGIN_DIR.'/post-plugin-library/output_tags.php');
if (!defined('ADMIN_SUBPAGES_LIBRARY')) require(WP_PLUGIN_DIR.'/post-plugin-library/admin-subpages.php');
?>
@@ -1,278 +0,0 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR Rob Marsh, SJ
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: http://wordpress.org/tag/post-plugin-library\n"
"POT-Creation-Date: 2008-09-13 11:26+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: admin_common_functions.php:120
msgid "Available Tags"
msgstr ""
#: admin_common_functions.php:200
msgid ""
"This option takes you to my site where you can inform me of any issues \r\n"
"\tyou are having with this plugin. It also passes along useful debugging "
"information such as \r\n"
"\twhich versions of WordPress, PHP, and MySQL you are using, as well as the "
"current \r\n"
"\tplugin settings."
msgstr ""
#: admin_common_functions.php:204
msgid "File Report"
msgstr ""
#: admin_common_functions.php:235
msgid "The plugin and all its settings have been completely removed"
msgstr ""
#: admin_common_functions.php:243
msgid ""
"Deactivating a plugin from the Plugins page usually leaves all the plugin's"
"\r\n"
"\tsettings intact. Often this is the desired behaviour as you can then "
"choose to reactivate the plugin \r\n"
"\tand all your settings will still be in place. If, however, you want to "
"remove this plugin \r\n"
"\tcompletely, along with all its settings and tables, you can do so by "
"pressing the button below."
msgstr ""
#: admin_common_functions.php:249
msgid "Remove Plugin"
msgstr ""
#: admin_common_functions.php:282
msgid "Number of posts to show:"
msgstr ""
#: admin_common_functions.php:291
msgid "Number of posts to skip:"
msgstr ""
#: admin_common_functions.php:300
msgid "Omit the current post?"
msgstr ""
#: admin_common_functions.php:314
msgid "Show just the current post?"
msgstr ""
#: admin_common_functions.php:328
msgid "Show password-protected posts?"
msgstr ""
#: admin_common_functions.php:342
msgid "Show static pages?"
msgstr ""
#: admin_common_functions.php:357
msgid "Show attachments?"
msgstr ""
#: admin_common_functions.php:371
msgid "Match the current post's author?"
msgstr ""
#: admin_common_functions.php:385
msgid "Match the current post's category?"
msgstr ""
#: admin_common_functions.php:400
msgid "Match the current post's tags?"
msgstr ""
#: admin_common_functions.php:415
msgid "Default display if no matches:"
msgstr ""
#: admin_common_functions.php:424
msgid "Show nothing if no matches?"
msgstr ""
#: admin_common_functions.php:438
msgid "Text and codes before the list:"
msgstr ""
#: admin_common_functions.php:447
msgid "Text and codes after the list:"
msgstr ""
#: admin_common_functions.php:456
msgid "Output template:"
msgstr ""
#: admin_common_functions.php:465
msgid "Text and codes between items:"
msgstr ""
#: admin_common_functions.php:475
msgid ""
"Match posts with tags:<br />(a,b matches posts with either tag, a+b only "
"matches posts with both tags)"
msgstr ""
#: admin_common_functions.php:484
msgid "Posts to exclude:"
msgstr ""
#: admin_common_functions.php:485 admin_common_functions.php:494
msgid "comma-separated IDs"
msgstr ""
#: admin_common_functions.php:493
msgid "Posts to include:"
msgstr ""
#: admin_common_functions.php:503
msgid "Authors to exclude/include:"
msgstr ""
#: admin_common_functions.php:537
msgid "Categories to exclude/include:"
msgstr ""
#: admin_common_functions.php:593
msgid "Other plugins' tags to remove from snippet:"
msgstr ""
#: admin_common_functions.php:596
msgid "opening"
msgstr ""
#: admin_common_functions.php:596
msgid "closing"
msgstr ""
#: admin_common_functions.php:607
msgid "Ignore posts :"
msgstr ""
#: admin_common_functions.php:635
msgid "Display posts that are:"
msgstr ""
#: admin_common_functions.php:675
msgid "Match posts by custom field:"
msgstr ""
#: admin_common_functions.php:706
msgid "Output after post:"
msgstr ""
#: admin_common_functions.php:729
msgid "Output in RSS feeds:"
msgstr ""
#: admin_common_functions.php:751
msgid "Output in widget:"
msgstr ""
#: admin_common_functions.php:774
msgid ""
"Add Similar Posts to feeds? (DEPRECATED! This setting will be removed in the "
"next major release - use the placement settings instead)"
msgstr ""
#: admin_common_functions.php:788
msgid "Output in content:<br />(<em>via</em> special tags)"
msgstr ""
#: admin_common_functions.php:810
msgid "Sort Output By:<br />leave blank for default order"
msgstr ""
#: admin_common_functions.php:878
msgid "Select output by custom field:"
msgstr ""
#: admin_common_functions.php:911
msgid "Maximum number of words to use for match:"
msgstr ""
#: admin_common_functions.php:920
msgid "Extract terms to match by:"
msgstr ""
#: admin_common_functions.php:934
msgid "Relative importance of:"
msgstr ""
#: admin_common_functions.php:949
msgid "Look for manual links in custom field?"
msgstr ""
#: admin_common_functions.php:965
msgid "Type of comment to show:"
msgstr ""
#: admin_common_functions.php:980
msgid "Type of grouping:"
msgstr ""
#: admin_common_functions.php:996
msgid "Group title template:"
msgstr ""
#: admin_common_functions.php:1005
msgid "Omit comments by the post author?"
msgstr ""
#: admin_common_functions.php:1019
msgid "Omit comments by registered users?"
msgstr ""
#: admin_common_functions.php:1033
msgid "Order by date of last edit rather than date of creation?"
msgstr ""
#: admin_common_functions.php:1055
msgid "Visit plugin homepage"
msgstr ""
#: output_tags.php:384
msgid " at "
msgstr ""
#: output_tags.php:424
#, php-format
msgid "View all posts in %s"
msgstr ""
#. Plugin Name of an extension
msgid "Post-Plugin Library"
msgstr ""
#. Plugin URI of an extension
msgid "http://rmarsh.com/plugins/post-plugin-library/"
msgstr ""
#. Description of an extension
msgid ""
"Does nothing by itself but supplies common code for the <a "
"href=\"http://rmarsh.com/plugins/similar-posts/\">Similar Posts</a>, <a "
"href=\"http://rmarsh.com/plugins/recent-posts/\">Recent Posts</a>, <a "
"href=\"http://rmarsh.com/plugins/random-posts/\">Random Posts</a>, and <a "
"href=\"http://rmarsh.com/plugins/recent-comments/\">Recent Comments</a> "
"plugins. Make sure you have the latest version of this plugin."
msgstr ""
#. Author of an extension
msgid "Rob Marsh, SJ"
msgstr ""
#. Author URI of an extension
msgid "http://rmarsh.com/"
msgstr ""
@@ -1,129 +0,0 @@
=== Post-Plugin Library ===
Contributors: RobMarsh
Tags: posts, comments, random, recent, similar, related, popular, post-plugins
Requires at least: 1.5
Tested up to: 2.6.2
Stable tag: 2.6.2.1
The shared code library for Similar posts, Recent Posts, Random Posts, Popular Posts and Recent Comments.
== Description ==
The Post-Plugin Library does nothing by itself but **must** be installed to provide shared code for the [Similar Posts](http://wordpress.org/extend/plugins/similar-posts/), [Recent Posts](http://wordpress.org/extend/plugins/recent-posts-plugin/), [Random Posts](http://wordpress.org/extend/plugins/random-posts-plugin/), [Popular Posts](http://wordpress.org/extend/plugins/popular-posts-plugin/), and [Recent Comments](http://wordpress.org/extend/plugins/recent-comments-plugin/) plugins.
== Installation ==
1. IMPORTANT! If you are upgrading from a previous version first deactivate the plugin, then delete the plugin folder from your server.
1. Upload the plugin folder to your /wp-content/plugins/ folder.
1. Go to the **Plugins** page and activate the plugin.
[My web site](http://rmarsh.com/) has [full instructions](http://rmarsh.com/plugins/) and [information on customisation](http://rmarsh.com/plugins/post-options/).
== Version History ==
* 2.6.2.1
* support for recent comments to only show one comment per post
* fix for donate link
* 2.6.2.0
* new {imagealt} output tag -- rather like {imagesrc}
* {excerpt} can now trim to whole sentences
* content filter can now take parameter string
* widget can now take parameter string
* output can be appended to posts & feeds
* 2.6.1.0
* the current post can be marked manually
* widgets now honour the option to show no output if list is empty
* {commenterlink} now respects the appropriate filter
* 2.6.0.0
* version bump to indicate compatibility with WP 2.6
* fix to really include attachments
* new parameter for {imagesrc} to append a suffix to the image name, e.g. to get the thumbnail for attachments
* 2.5.0.11
* new option to include attachments
* {php} tag now accepts nested tags
* new output tag {authorurl} -- permalink to archive of author's posts
* fix for numeric locale issue in Similar Posts
* 2.5.10
* new option to select algorithm for term extraction in Similar Posts
* new manual links option in Similar Posts
* fix for faulty non-English tag indexing in Similar Posts
* fix for page selection in old versions of WP
* made omit current post try harder to find current post ID
* 2.5.0.9
* new option to order Recent Posts by date of last edit rather than date of creation
* new option to match the current post's author
* extended options for snippet and excerpt output tags
* 2.5.0.7
* new option to show by status, i.e., published/private/draft/future
* {categorynames} and {categorylinks} apply 'single_cat_name' filter
* fixes bug in WP pre-2.2 causing installation code to fail
* 2.5.0.6
* bug fix for new option for Recent Comments
* 2.5.0.5
* new option for Recent Comments: just_current_post
* {snippet} and {commentsnippet} now handle '...'
* {commentexcerpt} now same parameters as (excerpt}
* 2.5.0.4
* {commentpopupurl} targets the correct comment
* 2.5.0.3
* bug fix for showing pages when not selected
* 2.5.0.2
* {image} tag has even more options
* new {commentpopupurl} tag
* 2.5.0.1
* made compatible with WP MU
* 2.5.0
* {image} has new post, link, and default parameters
* new {imagesrc} tag
* fix to empty category bug
* 2.5b28
* more work on {image} scaling
* improvements to Similar Posts matching
* experiment with Chinese/Korean/Japanese matching
* 2.5b27
* made {image} scaling more robust
* 2.5b26
* reverted thumnail serving (speed)
* fix current post after extra query
* 2.5b25
* option to sort output, group templates
* removed 'trim_before' option added more logical 'divider'
* {date:raw}, {commentdate:raw}, etc.
* fix for {image} resizing when <img > and not <img />
* {image} now serves real thumbnails
* 2.5b24
* fix for recursive replacement by content filter
* fix to {gravatar} to allow for 'identicon' etc.
* fix to {commenter} to allow trimming
* fix a warning in safe mode
* 2.5b23
* new option to filter on custom fields
* proper nesting of braces in {if} ; also allowed in condition
* improved bug report feature
* better way to omit user comments
* 2.5b22
* show_pages option now possible to show only pages
* update for {postviews}
* fix {commenterlink} giving no output
* 2.5b21
* fix bug in {snippet} stripping
* 2.5b20
* fix default behaviour of {gravatar}
* 2.5b18
* new tag {if:condition:true:false}
* 2.5b17
* enhanced {php}
* 2.5b16
* fix submenus to work with Lighter Admin Drop Menu
* 2.5b15
* fix bugs, add 'included posts' setting
* 2.5b14
* enhanced bug reporter
* 2.5b13
* added {gravatar}, extended {author}
* 2.5b11
* fixed problem with bug reporter
* 2.5b9
* clarifying installation instructions
@@ -1,169 +0,0 @@
wpEditorInit = function() {
// Activate tinyMCE if it's the user's default editor
if ( ( 'undefined' == typeof wpTinyMCEConfig ) || 'tinymce' == wpTinyMCEConfig.defaultEditor ) {
document.getElementById('editorcontainer').style.padding = '0px';
tinyMCE.execCommand("mceAddControl", false, "content");
} else {
var H;
if ( H = tinymce.util.Cookie.getHash("TinyMCE_content_size") )
document.getElementById('content').style.height = H.ch - 30 + 'px';
}
};
switchEditors = {
saveCallback : function(el, content, body) {
document.getElementById(el).style.color = '#fff';
if ( tinyMCE.activeEditor.isHidden() )
content = document.getElementById(el).value;
else
content = this.pre_wpautop(content);
return content;
},
pre_wpautop : function(content) {
// We have a TON of cleanup to do. Line breaks are already stripped.
// Protect pre|script tags
content = content.replace(/<(pre|script)[^>]*>[\s\S]+?<\/\1>/g, function(a) {
a = a.replace(/<br ?\/?>[\r\n]*/g, '<wp_temp>');
return a.replace(/<\/?p( [^>]*)?>[\r\n]*/g, '<wp_temp>');
});
// Pretty it up for the source editor
var blocklist1 = 'blockquote|ul|ol|li|table|thead|tbody|tr|th|td|div|h[1-6]|p';
content = content.replace(new RegExp('\\s*</('+blocklist1+')>\\s*', 'mg'), '</$1>\n');
content = content.replace(new RegExp('\\s*<(('+blocklist1+')[^>]*)>', 'mg'), '\n<$1>');
content = content.replace(new RegExp('<p( [^>]*)?>[\\s\\n]*<(/?script[^>]*)>', 'mg'), '\n<$2>');
content = content.replace(new RegExp('<(/?script[^>]*)>[\\s\\n]*</p>', 'mg'), '\n<$1>');
// Fix some block element newline issues
content = content.replace(new RegExp('\\s*<div', 'mg'), '\n<div');
content = content.replace(new RegExp('</div>\\s*', 'mg'), '</div>\n');
content = content.replace(new RegExp('\\s*\\[caption([^\\[]+)\\[/caption\\]\\s*', 'gi'), '\n\n[caption$1[/caption]\n\n');
content = content.replace(new RegExp('caption\\]\\n\\n+\\[caption', 'g'), 'caption]\n\n[caption');
var blocklist2 = 'blockquote|ul|ol|li|table|thead|tr|th|td|h[1-6]|pre';
content = content.replace(new RegExp('\\s*<(('+blocklist2+') ?[^>]*)\\s*>', 'mg'), '\n<$1>');
content = content.replace(new RegExp('\\s*</('+blocklist2+')>\\s*', 'mg'), '</$1>\n');
content = content.replace(new RegExp('<li([^>]*)>', 'g'), '\t<li$1>');
if ( content.indexOf('<object') != -1 ) {
content = content.replace(new RegExp('\\s*<param([^>]*)>\\s*', 'mg'), "<param$1>");
content = content.replace(new RegExp('\\s*</embed>\\s*', 'mg'), '</embed>');
}
// Unmark special paragraph closing tags
content = content.replace(new RegExp('</p#>', 'g'), '</p>\n');
content = content.replace(new RegExp('\\s*(<p [^>]+>.*</p>)', 'mg'), '\n$1');
content = content.replace(new RegExp('<p>\\s*</p>', 'mg'), "<p>&nbsp;</p>\n");
// put back the line breaks in pre|script
content = content.replace(/<wp_temp>/g, '\n');
// Hope.
return content;
},
go : function(id) {
var ed = tinyMCE.get(id);
var qt = document.getElementById('quicktags');
var H = document.getElementById('edButtonHTML');
var P = document.getElementById('edButtonPreview');
var ta = document.getElementById(id);
var ec = document.getElementById('editorcontainer');
if ( ! ed || ed.isHidden() ) {
ta.style.color = '#fff';
this.edToggle(P, H);
edCloseAllTags(); // :-(
qt.style.display = 'none';
ec.style.padding = '0px';
ta.style.padding = '0px';
ta.value = this.wpautop(ta.value);
if ( ed ) ed.show();
else tinyMCE.execCommand("mceAddControl", false, id);
this.wpSetDefaultEditor('tinymce');
} else {
this.edToggle(H, P);
ta.style.height = ed.getContentAreaContainer().offsetHeight + 6 + 'px';
ed.hide();
qt.style.display = 'block';
if ( tinymce.isIE6 ) {
ta.style.width = '98%';
ec.style.padding = '0px';
ta.style.padding = '6px';
} else {
ta.style.width = '100%';
ec.style.padding = '6px';
}
ta.style.color = '';
this.wpSetDefaultEditor('html');
}
},
edToggle : function(A, B) {
A.className = 'active';
B.className = '';
B.onclick = A.onclick;
A.onclick = null;
},
wpSetDefaultEditor : function(editor) {
try {
editor = escape( editor.toString() );
} catch(err) {
editor = 'tinymce';
}
var userID = document.getElementById('user-id');
var date = new Date();
date.setTime(date.getTime()+(10*365*24*60*60*1000));
document.cookie = "wordpress_editor_" + userID.value + "=" + editor + "; expires=" + date.toGMTString();
},
wpautop : function(pee) {
// filtered when switching html to visual
var blocklist = 'table|thead|tfoot|caption|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|form|blockquote|address|math|p|h[1-6]|script';
var blocklist2 = 'table|thead|tfoot|caption|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|form|blockquote|address|math|h[1-6]|script';
pee = pee + "\n\n";
pee = pee.replace(new RegExp('(<(?:'+blocklist+')[^>]*>)', 'gi'), "\n$1");
pee = pee.replace(new RegExp('(</(?:'+blocklist+')>)', 'gi'), "$1\n\n");
pee = pee.replace(new RegExp("\\r\\n|\\r", 'g'), "\n");
pee = pee.replace(new RegExp("\\n\\s*\\n+", 'g'), "\n\n");
pee = pee.replace(new RegExp('([\\s\\S]+?)\\n\\n', 'mg'), "<p>$1</p>\n");
pee = pee.replace(new RegExp('<p( [^>]*)?>[\\s\\n]*</p>', 'mg'), "<p$1>&nbsp;</p>\n");
pee = pee.replace(new RegExp('<p>\\s*(</?(?:'+blocklist+')[^>]*>)\\s*</p>', 'gi'), "$1");
pee = pee.replace(new RegExp("<p>(<li.+?)</p>", 'gi'), "$1");
pee = pee.replace(new RegExp("<p ?[^>]*>(<!--(.*)?-->)", 'gi'), "$1");
pee = pee.replace(new RegExp("(<!--(.*)?-->)</p>", 'gi'), "$1");
pee = pee.replace(new RegExp('<p>\\s*<blockquote([^>]*)>', 'gi'), "<blockquote$1><p>");
pee = pee.replace(new RegExp('</blockquote>\\s*</p>', 'gi'), '</p></blockquote>');
pee = pee.replace(new RegExp('<p>[\\s\\n]*(<(?:'+blocklist+')[^>]*>)', 'gi'), "$1");
pee = pee.replace(new RegExp('<p>[\\s\\n]*(</(?:'+blocklist2+')[^>]*>)', 'gi'), "$1");
pee = pee.replace(new RegExp('(<(?:'+blocklist2+')[^>]*>)[\\s\\n]*</p>', 'gi'), "$1");
pee = pee.replace(new RegExp('(</(?:'+blocklist+')[^>]*>)[\\s\\n]*</p>', 'gi'), "$1");
pee = pee.replace(new RegExp('(</?(?:'+blocklist+')[^>]*>)\\s*<br />', 'gi'), "$1");
pee = pee.replace(new RegExp('<br />(\\s*</?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)>)', 'gi'), '$1');
pee = pee.replace(new RegExp('(?:<p>|<br ?/?>)*\\s*\\[caption([^\\[]+)\\[/caption\\]\\s*(?:</p>|<br ?/?>)*', 'gi'), '[caption$1[/caption]');
// Fix the pre|script tags
pee = pee.replace(/<(pre|script)[^>]*>[\s\S]+?<\/\1>/g, function(a) {
a = a.replace(/<br ?\/?>[\r\n]*/g, '\n');
return a.replace(/<\/?p( [^>]*)?>[\r\n]*/g, '\n');
});
return pee;
}
}
@@ -1,163 +0,0 @@
switchEditors = {
mode : '',
I : function(e) {
return document.getElementById(e);
},
edInit : function() {
var h = tinymce.util.Cookie.getHash("TinyMCE_content_size"), H = this.I('edButtonHTML'), P = this.I('edButtonPreview');
// Activate TinyMCE if it's the user's default editor
if ( getUserSetting( 'editor' ) == 'html' ) {
if ( h )
try { this.I('content').style.height = h.ch - 30 + 'px'; } catch(e){};
} else {
try {
this.I("quicktags").style.display = "none";
} catch(e){};
tinyMCE.execCommand("mceAddControl", false, "content");
}
},
saveCallback : function(el, content, body) {
if ( tinyMCE.activeEditor.isHidden() )
content = this.I(el).value;
else
content = this.pre_wpautop(content);
return content;
},
pre_wpautop : function(content) {
// filtered when switching visual to html
// We have a TON of cleanup to do. Line breaks are already stripped.
// Protect pre|script tags
content = content.replace(/<(pre|script)[^>]*>[\s\S]+?<\/\1>/g, function(a) {
a = a.replace(/<br ?\/?>[\r\n]*/g, '<wp_temp>');
return a.replace(/<\/?p( [^>]*)?>[\r\n]*/g, '<wp_temp>');
});
// Pretty it up for the source editor
var blocklist1 = 'blockquote|ul|ol|li|table|thead|tbody|tr|th|td|div|h[1-6]|p';
content = content.replace(new RegExp('\\s*</('+blocklist1+')>\\s*', 'mg'), '</$1>\n');
content = content.replace(new RegExp('\\s*<(('+blocklist1+')[^>]*)>', 'mg'), '\n<$1>');
content = content.replace(new RegExp('<p( [^>]*)?>[\\s\\n]*<(/?script[^>]*)>', 'mg'), '\n<$2>');
content = content.replace(new RegExp('<(/?script[^>]*)>[\\s\\n]*</p>', 'mg'), '\n<$1>');
// Fix some block element newline issues
content = content.replace(new RegExp('\\s*<div', 'mg'), '\n<div');
content = content.replace(new RegExp('</div>\\s*', 'mg'), '</div>\n');
content = content.replace(new RegExp('\\s*\\[caption([^\\[]+)\\[/caption\\]\\s*', 'gi'), '\n\n[caption$1[/caption]\n\n');
content = content.replace(new RegExp('caption\\]\\n\\n+\\[caption', 'g'), 'caption]\n\n[caption');
var blocklist2 = 'blockquote|ul|ol|li|table|thead|tr|th|td|h[1-6]|pre';
content = content.replace(new RegExp('\\s*<(('+blocklist2+') ?[^>]*)\\s*>', 'mg'), '\n<$1>');
content = content.replace(new RegExp('\\s*</('+blocklist2+')>\\s*', 'mg'), '</$1>\n');
content = content.replace(new RegExp('<li([^>]*)>', 'g'), '\t<li$1>');
if ( content.indexOf('<object') != -1 ) {
content = content.replace(new RegExp('\\s*<param([^>]*)>\\s*', 'mg'), "<param$1>");
content = content.replace(new RegExp('\\s*</embed>\\s*', 'mg'), '</embed>');
}
// Unmark special paragraph closing tags
content = content.replace(new RegExp('</p#>', 'g'), '</p>\n');
content = content.replace(new RegExp('\\s*(<p [^>]+>.*</p>)', 'mg'), '\n$1');
content = content.replace(new RegExp('<p>\\s*</p>', 'mg'), "<p>&nbsp;</p>\n");
// put back the line breaks in pre|script
content = content.replace(/<wp_temp>/g, '\n');
// Hope.
return content;
},
go : function(id, mode) {
id = id || 'content';
mode = mode || this.mode || '';
var ed = tinyMCE.get(id) || false;
var qt = this.I('quicktags');
var H = this.I('edButtonHTML');
var P = this.I('edButtonPreview');
var ta = this.I(id);
if ( 'tinymce' == mode ) {
if ( ed && ! ed.isHidden() )
return false;
this.mode = 'html';
ta.style.color = '#fff';
P.className = 'active';
H.className = '';
edCloseAllTags(); // :-(
qt.style.display = 'none';
ta.value = this.wpautop(ta.value);
if ( ed ) ed.show();
else tinyMCE.execCommand("mceAddControl", false, id);
setUserSetting( 'editor', 'tinymce' );
} else {
if ( ! ed || ed.isHidden() )
return false;
this.mode = 'tinymce';
H.className = 'active';
P.className = '';
ta.style.height = ed.getContentAreaContainer().offsetHeight + 6 + 'px';
ed.hide();
qt.style.display = 'block';
ta.style.color = '';
setUserSetting( 'editor', 'html' );
}
return false;
},
wpautop : function(pee) {
// filtered when switching html to visual
var blocklist = 'table|thead|tfoot|caption|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|form|blockquote|address|math|p|h[1-6]|script';
var blocklist2 = 'table|thead|tfoot|caption|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|form|blockquote|address|math|h[1-6]|script';
pee = pee + "\n\n";
pee = pee.replace(new RegExp('(<(?:'+blocklist+')[^>]*>)', 'gi'), "\n$1");
pee = pee.replace(new RegExp('(</(?:'+blocklist+')>)', 'gi'), "$1\n\n");
pee = pee.replace(new RegExp("\\r\\n|\\r", 'g'), "\n");
pee = pee.replace(new RegExp("\\n\\s*\\n+", 'g'), "\n\n");
pee = pee.replace(new RegExp('([\\s\\S]+?)\\n\\n', 'mg'), "<p>$1</p>\n");
pee = pee.replace(new RegExp('<p( [^>]*)?>[\\s\\n]*</p>', 'mg'), "<p$1>&nbsp;</p>\n");
pee = pee.replace(new RegExp('<p>\\s*(</?(?:'+blocklist+')[^>]*>)\\s*</p>', 'gi'), "$1");
pee = pee.replace(new RegExp("<p>(<li.+?)</p>", 'gi'), "$1");
pee = pee.replace(new RegExp("<p ?[^>]*>(<!--(.*)?-->)", 'gi'), "$1");
pee = pee.replace(new RegExp("(<!--(.*)?-->)</p>", 'gi'), "$1");
pee = pee.replace(new RegExp('<p>\\s*<blockquote([^>]*)>', 'gi'), "<blockquote$1><p>");
pee = pee.replace(new RegExp('</blockquote>\\s*</p>', 'gi'), '</p></blockquote>');
pee = pee.replace(new RegExp('<p>[\\s\\n]*(<(?:'+blocklist+')[^>]*>)', 'gi'), "$1");
pee = pee.replace(new RegExp('<p>[\\s\\n]*(</(?:'+blocklist2+')[^>]*>)', 'gi'), "$1");
pee = pee.replace(new RegExp('(<(?:'+blocklist2+')[^>]*>)[\\s\\n]*</p>', 'gi'), "$1");
pee = pee.replace(new RegExp('(</(?:'+blocklist+')[^>]*>)[\\s\\n]*</p>', 'gi'), "$1");
pee = pee.replace(new RegExp('(</?(?:'+blocklist+')[^>]*>)\\s*<br />', 'gi'), "$1");
pee = pee.replace(new RegExp('<br />(\\s*</?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)>)', 'gi'), '$1');
pee = pee.replace(new RegExp('(?:<p>|<br ?/?>)*\\s*\\[caption([^\\[]+)\\[/caption\\]\\s*(?:</p>|<br ?/?>)*', 'gi'), '[caption$1[/caption]');
// Fix the pre|script tags
pee = pee.replace(/<(pre|script)[^>]*>[\s\S]+?<\/\1>/g, function(a) {
a = a.replace(/<br ?\/?>[\r\n]*/g, '\n');
return a.replace(/<\/?p( [^>]*)?>[\r\n]*/g, '\n');
});
return pee;
}
}
@@ -1,158 +0,0 @@
jQuery(document).ready(function($){
var h = wpCookies.getHash('TinyMCE_content_size');
if ( getUserSetting( 'editor' ) == 'html' ) {
if ( h )
$('#content').css('height', h.ch - 15 + 'px');
} else {
$('#content').css('color', 'white');
$('#quicktags').hide();
}
});
var switchEditors = {
mode : '',
I : function(e) {
return document.getElementById(e);
},
edInit : function() {
},
saveCallback : function(el, content, body) {
if ( tinyMCE.activeEditor.isHidden() )
content = this.I(el).value;
else
content = this.pre_wpautop(content);
return content;
},
pre_wpautop : function(content) {
var blocklist1, blocklist2;
// Protect pre|script tags
content = content.replace(/<(pre|script)[^>]*>[\s\S]+?<\/\1>/g, function(a) {
a = a.replace(/<br ?\/?>[\r\n]*/g, '<wp_temp>');
return a.replace(/<\/?p( [^>]*)?>[\r\n]*/g, '<wp_temp>');
});
// Pretty it up for the source editor
var blocklist1 = 'blockquote|ul|ol|li|table|thead|tbody|tr|th|td|div|h[1-6]|p';
content = content.replace(new RegExp('\\s*</('+blocklist1+')>\\s*', 'mg'), '</$1>\n');
content = content.replace(new RegExp('\\s*<(('+blocklist1+')[^>]*)>', 'mg'), '\n<$1>');
content = content.replace(new RegExp('<p( [^>]*)?>[\\s\\n]*<(/?script[^>]*)>', 'mg'), '\n<$2>');
content = content.replace(new RegExp('<(/?script[^>]*)>[\\s\\n]*</p>', 'mg'), '\n<$1>');
// Fix some block element newline issues
content = content.replace(new RegExp('\\s*<div', 'mg'), '\n<div');
content = content.replace(new RegExp('</div>\\s*', 'mg'), '</div>\n');
content = content.replace(new RegExp('\\s*\\[caption([^\\[]+)\\[/caption\\]\\s*', 'gi'), '\n\n[caption$1[/caption]\n\n');
content = content.replace(new RegExp('caption\\]\\n\\n+\\[caption', 'g'), 'caption]\n\n[caption');
var blocklist2 = 'blockquote|ul|ol|li|table|thead|tr|th|td|h[1-6]|pre';
content = content.replace(new RegExp('\\s*<(('+blocklist2+') ?[^>]*)\\s*>', 'mg'), '\n<$1>');
content = content.replace(new RegExp('\\s*</('+blocklist2+')>\\s*', 'mg'), '</$1>\n');
content = content.replace(new RegExp('<li([^>]*)>', 'g'), '\t<li$1>');
if ( content.indexOf('<object') != -1 ) {
content = content.replace(new RegExp('\\s*<param([^>]*)>\\s*', 'mg'), "<param$1>");
content = content.replace(new RegExp('\\s*</embed>\\s*', 'mg'), '</embed>');
}
// Unmark special paragraph closing tags
content = content.replace(new RegExp('</p#>', 'g'), '</p>\n');
content = content.replace(new RegExp('\\s*(<p [^>]+>.*</p>)', 'mg'), '\n$1');
content = content.replace(new RegExp('<p>\\s*</p>', 'mg'), "<p>&nbsp;</p>\n");
// put back the line breaks in pre|script
content = content.replace(/<wp_temp>/g, '\n');
// Hope.
return content;
},
go : function(id, mode) {
id = id || 'content';
mode = mode || this.mode || '';
var ed, qt = this.I('quicktags'), H = this.I('edButtonHTML'), P = this.I('edButtonPreview'), ta = this.I(id);
try { ed = tinyMCE.get(id); }
catch(e) { ed = false; }
if ( 'tinymce' == mode ) {
if ( ed && ! ed.isHidden() )
return false;
setUserSetting( 'editor', 'tinymce' );
this.mode = 'html';
P.className = 'active';
H.className = '';
edCloseAllTags(); // :-(
qt.style.display = 'none';
ta.value = this.wpautop(ta.value);
if ( ed ) {
ed.show();
} else {
try{tinyMCE.execCommand("mceAddControl", false, id);}
catch(e){}
}
} else {
setUserSetting( 'editor', 'html' );
ta.style.color = '#000';
this.mode = 'tinymce';
H.className = 'active';
P.className = '';
if ( ed && !ed.isHidden() ) {
ta.style.height = ed.getContentAreaContainer().offsetHeight + 24 + 'px';
ed.hide();
}
qt.style.display = 'block';
}
return false;
},
wpautop : function(pee) {
// filtered when switching html to visual
var blocklist = 'table|thead|tfoot|caption|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|form|blockquote|address|math|p|h[1-6]|script';
var blocklist2 = 'table|thead|tfoot|caption|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|form|blockquote|address|math|h[1-6]|script';
pee = pee + "\n\n";
pee = pee.replace(new RegExp('(<(?:'+blocklist+')[^>]*>)', 'gi'), "\n$1");
pee = pee.replace(new RegExp('(</(?:'+blocklist+')>)', 'gi'), "$1\n\n");
pee = pee.replace(new RegExp("\\r\\n|\\r", 'g'), "\n");
pee = pee.replace(new RegExp("\\n\\s*\\n+", 'g'), "\n\n");
pee = pee.replace(new RegExp('([\\s\\S]+?)\\n\\n', 'mg'), "<p>$1</p>\n");
pee = pee.replace(new RegExp('<p( [^>]*)?>[\\s\\n]*</p>', 'mg'), "<p$1>&nbsp;</p>\n");
pee = pee.replace(new RegExp('<p>\\s*(</?(?:'+blocklist+')[^>]*>)\\s*</p>', 'gi'), "$1");
pee = pee.replace(new RegExp("<p>(<li.+?)</p>", 'gi'), "$1");
pee = pee.replace(new RegExp("<p ?[^>]*>(<!--(.*)?-->)", 'gi'), "$1");
pee = pee.replace(new RegExp("(<!--(.*)?-->)</p>", 'gi'), "$1");
pee = pee.replace(new RegExp('<p>\\s*<blockquote([^>]*)>', 'gi'), "<blockquote$1><p>");
pee = pee.replace(new RegExp('</blockquote>\\s*</p>', 'gi'), '</p></blockquote>');
pee = pee.replace(new RegExp('<p>[\\s\\n]*(<(?:'+blocklist+')[^>]*>)', 'gi'), "$1");
pee = pee.replace(new RegExp('<p>[\\s\\n]*(</(?:'+blocklist2+')[^>]*>)', 'gi'), "$1");
pee = pee.replace(new RegExp('(<(?:'+blocklist2+')[^>]*>)[\\s\\n]*</p>', 'gi'), "$1");
pee = pee.replace(new RegExp('(</(?:'+blocklist+')[^>]*>)[\\s\\n]*</p>', 'gi'), "$1");
pee = pee.replace(new RegExp('(</?(?:'+blocklist+')[^>]*>)\\s*<br />', 'gi'), "$1");
pee = pee.replace(new RegExp('<br />(\\s*</?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)>)', 'gi'), '$1');
pee = pee.replace(new RegExp('(?:<p>|<br ?/?>)*\\s*\\[caption([^\\[]+)\\[/caption\\]\\s*(?:</p>|<br ?/?>)*', 'gi'), '[caption$1[/caption]');
// Fix the pre|script tags
pee = pee.replace(/<(pre|script)[^>]*>[\s\S]+?<\/\1>/g, function(a) {
a = a.replace(/<br ?\/?>[\r\n]*/g, '\n');
return a.replace(/<\/?p( [^>]*)?>[\r\n]*/g, '\n');
});
return pee;
}
};
@@ -1,109 +0,0 @@
msgid ""
msgstr ""
"Project-Id-Version: PS Disable Auto Formatting\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-01-13 11:37+0900\n"
"PO-Revision-Date: 2009-01-21 17:38+0900\n"
"Last-Translator: hitoshi omagari\n"
"Language-Team: Prime Strategy Co.,Ltd. <system@prime-strategy.co.jp>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Poedit-Language: Japanese\n"
"X-Poedit-Country: JAPAN\n"
"X-Poedit-SourceCharset: utf-8\n"
"X-Poedit-KeywordsList: __;_e\n"
"X-Poedit-SearchPath-0: ps_disable_auto_formatting\n"
#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:15
msgid "content formatting"
msgstr "記事内容の自動整形"
#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:16
msgid "comment formatting"
msgstr "コメントの自動整形"
#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:17
msgid "excerpt formatting"
msgstr "抜粋の自動整形"
#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:18
msgid "term description formatting"
msgstr "説明(カテゴリー、リンクなど)の自動整形"
#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:155
#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:229
msgid "Auto Formatting"
msgstr "自動整形"
#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:195
msgid "Could not update post in the database"
msgstr "データベースのアップデートに失敗いたしました。"
#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:198
msgid "Database is not found."
msgstr "データベースが見つかりません。"
#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:208
msgid "No formatting post or page exists."
msgstr "整形する記事が存在しません。"
#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:211
msgid "Require checked allow batch formatting."
msgstr "一括整形処理の許可が必要です。"
#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:232
msgid "The settings has changed successfully."
msgstr "設定が変更されました。"
#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:236
#, php-format
msgid "Batch fomatting process has completed. total %d posts formatted."
msgstr "一括整形処理が完了いたしました。整形処理が行われた記事は、全部で%dです。"
#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:244
msgid "The settings has not been changed. There were no changes or failed to update the data base."
msgstr "設定は変更されていません。変更された項目が存在しないか、データベースのアップデート失敗です。"
#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:255
msgid "disable"
msgstr "停止"
#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:264
msgid "Batch formatting for past posts"
msgstr "過去記事の一括整形"
#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:265
msgid ""
"<p>To make it display the same as the format before run this plug-in,\n"
"automatic operation process to the specified period of the posts.<br />\n"
"Even if some unexpected errors occur, the data is restorable because\n"
"rivision on the processed post is made.<br />\n"
"This process is safe even if you do two or more times, perhaps. We cannot assure though.<br />\n"
"* It is strongly recommended to take the <a href=\"http://codex.wordpress.org/Backing_Up_Your_Database\" title=\"Backing Up Your Database\">backup your database</a> before processing.</p>"
msgstr "<p>プラグインを利用する場合にも段落・改行が以前通り表示されるよう、最新の編集が指定日以前の投稿・ページ全てに対し、自動段落整形の一括処理を行います。<br />整形処理を行った投稿・ページについては、リビジョンを作成しますので、万が一不具合が発生した投稿・ページにおいても復元が可能です。<br />複数回整形処理を行ってもおそらく問題にはならないと思いますが、極力避けてください。<br />※ 処理を行う前に極力<a href=\"http://wpdocs.sourceforge.jp/%E3%83%87%E3%83%BC%E3%82%BF%E3%83%99%E3%83%BC%E3%82%B9%E3%81%AE%E3%83%90%E3%83%83%E3%82%AF%E3%82%A2%E3%83%83%E3%83%97\" title=\"データベースのバックアップ\">データベースのバックアップ</a>を行っておいてください。</p>"
#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:273
msgid "Formatting before"
msgstr "整形処理時限"
#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:276
msgid "* Formatting posts and pages are modified before this time."
msgstr "※ 最新の更新時刻が指定時刻以前である記事に対して整形処理が行われます。"
#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:281
msgid "Batch formatting"
msgstr "一括整形処理"
#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:283
msgid "Allow batch formatting"
msgstr "一括整形処理を許可"
#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:287
msgid "If you have any problems or find a bug in this plugin, please <a href=\"http://www.web-strategy.jp/wp_plugin/ps_disable_auto_formatting/#postcomment\">report to us</a>."
msgstr "本プラグインのご利用に際して問題があったり、バグを発見された場合には、<a href=\"http://www.web-strategy.jp/wp_plugin/ps_disable_auto_formatting/#postcomment\">ご連絡</a>いただければ幸いです。"
#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:295
msgid "Sorry, Your WordPress (version %s) is old to use PS Disable Auto Formatting plugin. Please upgrade to version 2.5 or higher."
msgstr "ご利用中のWordPress (バージョン %s)では、PS Natural Paragraph Formatting プラグインはご利用になれません。2.5以上のバージョンにアップグレードしてください。"
@@ -1,110 +0,0 @@
msgid ""
msgstr ""
"Project-Id-Version: PS Disable Auto Formatting 0.9.2\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-01-21 17:35+0900\n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Poedit-Language: \n"
"X-Poedit-Country: \n"
"X-Poedit-SourceCharset: utf-8\n"
"X-Poedit-KeywordsList: __;_e\n"
"X-Poedit-Basepath: \n"
"X-Poedit-SearchPath-0: ps_disable_auto_formatting\n"
#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:15
msgid "content formatting"
msgstr ""
#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:16
msgid "comment formatting"
msgstr ""
#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:17
msgid "excerpt formatting"
msgstr ""
#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:18
msgid "term description formatting"
msgstr ""
#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:155
#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:229
msgid "Auto Formatting"
msgstr ""
#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:195
msgid "Could not update post in the database"
msgstr ""
#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:198
msgid "Database is not found."
msgstr ""
#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:208
msgid "No formatting post or page exists."
msgstr ""
#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:211
msgid "Require checked allow batch formatting."
msgstr ""
#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:232
msgid "The settings has changed successfully."
msgstr ""
#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:236
#, php-format
msgid "Batch fomatting process has completed. total %d posts formatted."
msgstr ""
#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:244
msgid "The settings has not been changed. There were no changes or failed to update the data base."
msgstr ""
#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:255
msgid "disable"
msgstr ""
#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:264
msgid "Batch formatting for past posts"
msgstr ""
#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:265
msgid ""
"<p>To make it display the same as the format before run this plug-in,\n"
"automatic operation process to the specified period of the posts.<br />\n"
"Even if some unexpected errors occur, the data is restorable because\n"
"rivision on the processed post is made.<br />\n"
"This process is safe even if you do two or more times, perhaps. We cannot assure though.<br />\n"
"* It is strongly recommended to take the <a href=\"http://codex.wordpress.org/Backing_Up_Your_Database\" title=\"Backing Up Your Database\">backup your database</a> before processing.</p>"
msgstr ""
#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:273
msgid "Formatting before"
msgstr ""
#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:276
msgid "* Formatting posts and pages are modified before this time."
msgstr ""
#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:281
msgid "Batch formatting"
msgstr ""
#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:283
msgid "Allow batch formatting"
msgstr ""
#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:287
msgid "If you have any problems or find a bug in this plugin, please <a href=\"http://www.web-strategy.jp/wp_plugin/ps_disable_auto_formatting/#postcomment\">report to us</a>."
msgstr ""
#: ps_disable_auto_formatting/ps_disable_auto_formatting.php:295
msgid "Sorry, Your WordPress (version %s) is old to use PS Disable Auto Formatting plugin. Please upgrade to version 2.5 or higher."
msgstr ""
@@ -1,308 +0,0 @@
<?php
/*
Plugin Name: PS Disable Auto Formatting
Plugin URI: http://www.web-strategy.jp/wp_plugin/ps_disable_auto_formatting/
Description: PS Disable Auto Formatting is able to disable function auto formatting (wpautop) and save &lt;p&gt; and &lt;br /&gt; formatted content.
Version: 1.0.3
Author: Hitoshi Omagari
Author URI: http://www.web-strategy.jp/
*/
class ps_disable_auto_formatting {
var $setting_items = array(
'content formatting' => 'the_content',
'comment formatting' => 'comment_text',
'excerpt formatting' => 'the_excerpt',
'term description formatting' => 'term_description',
);
var $mce_version = '20080121';
function __construct() {
global $wp_version;
if ( version_compare( $wp_version, '2.5', '>=' ) ) {
add_action( 'init', array( &$this, 'disable_auto_formatting_init' ) );
add_action( 'admin_menu', array( &$this, 'add_disable_formatting_setting_page') );
add_filter( 'print_scripts_array', array( &$this, 'rewrite_default_script' ) );
add_filter( 'wp_insert_post_data', array( &$this, 'formatting_quickpress_post' ) );
add_action( 'media_buttons', array( &$this, 'check_edit_mode_and_add_ichedit_pre' ), 9 );
add_action( 'media_buttons', array( &$this, 'delete_filtering_wp_richedit_pre' ) );
} else {
add_action('admin_notices', array( &$this, 'version_too_old' ) );
}
}
function ps_disable_auto_formatting() {
$this->__construct();
}
function disable_auto_formatting_init() {
$locale = get_locale();
$lang_file = dirname( __file__ ) . '/language/ps_disable_auto_formatting-' . $locale . '.mo';
if ( file_exists( $lang_file ) ) {
load_textdomain( 'ps_disable_auto_formatting', $lang_file );
}
$this->option_settings = get_option( 'ps_disable_auto_formatting' );
if ( $this->option_settings === false ) {
$this->set_default_settings();
$this->option_settings = get_option( 'ps_disable_auto_formatting' );
} elseif ( ! $this->option_settings ) {
$this->option_settings = array();
}
$this->delete_default_filters();
}
function delete_default_filters() {
global $wp_filter;
foreach ( $this->option_settings as $hook ) {
if ( $hook == 'comment_text' ) {
$priority = 30;
} else {
$priority = 10;
}
remove_filter( $hook, 'wpautop', $priority );
if ( $hook == 'the_content' ) {
foreach ( array_keys( $wp_filter['the_content'][10] ) as $hook_name ) {
if ( strpos( $hook_name, 'tam_contact_form_sevenwpautop_substitute' ) !== false ) {
remove_filter( 'the_content', $hook_name );
}
}
}
}
}
function set_default_settings() {
$default = array( 'the_content' );
update_option( 'ps_disable_auto_formatting', $default );
}
function rewrite_default_script( $todo ) {
global $wp_version, $wp_scripts;
if ( version_compare( $wp_version, '2.8', '>=' ) ) {
$scripyt_src = get_option( 'siteurl' ) . '/' . str_replace( str_replace( '\\', '/', ABSPATH ), '', str_replace( '\\', '/', dirname( __file__ ) ) ) . '/js/280/ps_editor.js';
} elseif ( version_compare( $wp_version, '2.7', '>=' ) ) {
$scripyt_src = get_option( 'siteurl' ) . '/' . str_replace( str_replace( '\\', '/', ABSPATH ), '', str_replace( '\\', '/', dirname( __file__ ) ) ) . '/js/270/ps_editor.js';
} else {
$scripyt_src = get_option( 'siteurl' ) . '/' . str_replace( str_replace( '\\', '/', ABSPATH ), '', str_replace( '\\', '/', dirname( __file__ ) ) ) . '/js/250/ps_editor.js';
if ( version_compare( $wp_version, '2.6', '>=' ) ) {
$wp_scripts->registered['editor_functions']->src = $scripyt_src;
} else {
$wp_scripts->scripts['editor_functions']->src = $scripyt_src;
}
}
$wp_scripts->add( 'ps_editor', $scripyt_src, false, $this->mce_version );
$key = array_search( 'editor', $todo );
if ( $key !== false ) {
if ( version_compare( $wp_version, '2.7', '>=' ) ) {
$todo[$key] = 'ps_editor';
} else {
unset( $todo[$key] );
}
}
return $todo;
}
function formatting_quickpress_post( $data ) {
global $action;
if ( in_array( $action, array( 'post-quickpress-publish', 'post-quickpress-save' ) ) ) {
if ( empty( $_POST['quickpress_post_ID'] ) ) {
$data['post_content'] = wpautop( $data['post_content'] );
}
}
return $data;
}
function delete_filtering_wp_richedit_pre() {
remove_filter( 'the_editor_content', 'wp_richedit_pre' );
}
function check_edit_mode_and_add_ichedit_pre() {
global $wp_filter;
if ( isset( $wp_filter['the_editor_content'][10]['wp_richedit_pre'] ) ) {
add_filter( 'the_editor_content', array( &$this, 'ps_richedit_pre' ) );
}
}
function ps_richedit_pre( $text ) {
if ( empty($text) ) return apply_filters('richedit_pre', '');
$output = convert_chars($text);
$output = htmlspecialchars($output, ENT_NOQUOTES);
return apply_filters('richedit_pre', $output);
}
function add_disable_formatting_setting_page() {
if ( function_exists( 'add_options_page' ) ) {
add_options_page( 'PS Disable Auto Formatting',
__( 'Auto Formatting', 'ps_disable_auto_formatting' ),
8,
basename( __FILE__ ),
array( &$this, 'output_disable_formatting_setting_page') );
}
}
function output_disable_formatting_setting_page() {
global $wpdb, $wp_error;
if( $_POST['_wpnonce'] ) {
check_admin_referer();
if ( $_POST['batch_formatting'] ) {
if ( $_POST['allow_batch_formatting'] ) {
$time_limit = sprintf( '%04d-%02d-%02d %02d:%02d:00', $_POST['aa'], $_POST['mm'], $_POST['jj'], $_POST['hh'], $_POST['mn'] );
$sql = "
SELECT `ID`
FROM $wpdb->posts
WHERE `post_status` IN ( 'publish', 'draft', 'pending' )
AND `post_type` IN ( 'post', 'page' )
AND `post_modified` < '$time_limit'
";
$formatting_posts = $wpdb->get_results( $sql, ARRAY_A );
$formatted_posts = array();
if ( $formatting_posts ) {
foreach ( $formatting_posts as $row ) {
$data = array();
$post = get_post( $row['ID'] );
$data['post_content'] = wpautop( $post->post_content );
if ( $post->post_content_filtered ) {
$data['post_content_filtered'] = wpautop( $post->post_content_filtered );
}
$data['post_modified_gmt'] = current_time( 'mysql', 1 );
$data['post_modified'] = current_time( 'mysql' );
do_action( 'pre_post_update', $post->ID );
if ( false === $wpdb->update( $wpdb->posts, $data, array( 'ID' => $post->ID ) ) ) {
if ( $wp_error ) {
$error_mes = new WP_Error('db_update_error', __('Could not update post in the database'), $wpdb->last_error);
break;
} else {
$error_mes = __( 'Database is not found.', 'ps_disable_auto_formatting' );
break;
}
}
$formatted_posts[] = $row['ID'];
}
if ( ! $error_mes ) {
$batch_ret = true;
}
} else {
$error_mes = __( 'No formatting post or page exists.', 'ps_disable_auto_formatting' );
}
} else {
$error_mes = __( 'Require checked allow batch formatting.', 'ps_disable_auto_formatting' );
}
} else {
foreach ( $_POST['ps_disable_auto_formatting'] as $key => $func ) {
if ( ! in_array( $func, $this->setting_items) ) {
unset( $_POST['ps_disable_auto_formatting'][$key] );
}
}
$ret = update_option( 'ps_disable_auto_formatting', $_POST['ps_disable_auto_formatting'] );
if ( $ret ) {
$this->option_settings = get_option( 'ps_disable_auto_formatting' );
}
}
}
?>
<div class=wrap>
<?php if ( function_exists( 'screen_icon' ) ) { screen_icon(); } ?>
<h2><?php _e( 'Auto Formatting', 'ps_disable_auto_formatting' ); ?></h2>
<?php if ( $ret ) { ?>
<div id="message" class="updated">
<p><?php _e('The settings has changed successfully.', 'ps_disable_auto_formatting' );?></p>
</div>
<?php } elseif ( $batch_ret ) { ?>
<div id="message" class="updated">
<p><?php printf( __( 'Batch fomatting process has completed. total %d posts formatted.', 'ps_disable_auto_formatting' ), count( $formatting_posts ) );?></p>
</div>
<?php } elseif ( $error_mes ) { ?>
<div id="notice" class="error">
<p><?php echo wp_specialchars( $error_mes ); ?></p>
</div>
<?php } elseif ( $_POST['ps_disable_auto_formatting'] && ! $ret ) { ?>
<div id="notice" class="error">
<p><?php _e('The settings has not been changed. There were no changes or failed to update the data base.', 'ps_disable_auto_formatting' );?></p>
</div>
<?php } ?>
<form method="post" action="">
<?php wp_nonce_field(); ?>
<table class="form-table">
<?php foreach( $this->setting_items as $id => $func ) { ?>
<tr>
<th><?php _e( $id, 'ps_disable_auto_formatting' ); ?></th>
<td>
<input type="checkbox" id="ps_disable_auto_formatting_<?php echo $func ?>" name="ps_disable_auto_formatting[]" value="<?php echo $func ?>"<?php if ( in_array( $func, $this->option_settings ) ) { echo ' checked="checked"'; } ?> />
<label for="ps_disable_auto_formatting_<?php echo $func ?>"><?php _e( 'disable', 'ps_disable_auto_formatting' ); ?></label>
</td>
</tr>
<?php } ?>
</table>
<p class="submit">
<input type="submit" name="ps_disable_auto_formatting_submit" class="button-primary" value="<?php _e( 'Save Changes' ); ?>" />
</p>
<?php if ( current_user_can( 'edit_post' ) && current_user_can( 'edit_page' ) ) { ?>
<h3><?php _e( 'Batch formatting for past posts' ,'ps_disable_auto_formatting' ); ?></h3>
<?php _e( '<p>To make it display the same as the format before run this plug-in,
automatic operation process to the specified period of the posts.<br />
Even if some unexpected errors occur, the data is restorable because
rivision on the processed post is made.<br />
This process is safe even if you do two or more times, perhaps. We cannot assure though.<br />
* It is strongly recommended to take the <a href="http://codex.wordpress.org/Backing_Up_Your_Database" title="Backing Up Your Database">backup your database</a> before processing.</p>' ,'ps_disable_auto_formatting' ); ?>
<table class="form-table">
<tr>
<th><?php _e( 'Formatting before' ,'ps_disable_auto_formatting' ); ?></th>
<td>
<?php touch_time( 0, 0, 0, 1 ); ?><br />
<?php _e( '* Formatting posts and pages are modified before this time.' ,'ps_disable_auto_formatting' ); ?>
</td>
</tr>
</table>
<div>
<span class="submit"><input type="submit" name="batch_formatting" value="<?php _e( 'Batch formatting', 'ps_disable_auto_formatting' ); ?>" /></span>
&nbsp;&nbsp;&nbsp;<input type="checkbox" id="allow_batch_formatting" name="allow_batch_formatting" value="1" />
<label for="allow_batch_formatting"><?php _e( 'Allow batch formatting', 'ps_disable_auto_formatting' ); ?></label>
</div>
<?php } ?>
</form>
<p><?php _e( 'If you have any problems or find a bug in this plugin, please <a href="http://www.web-strategy.jp/wp_plugin/ps_disable_auto_formatting/#postcomment">report to us</a>.' , 'ps_disable_auto_formatting' ); ?></p>
</div>
<?php
}
function version_too_old() {
global $wp_version;
echo '<div class="updated fade"><p>' . sprintf( __( 'Sorry, Your WordPress (version %s) is old to use PS Disable Auto Formatting plugin. Please upgrade to version 2.5 or higher.', 'ps_disable_auto_formatting' ), $wp_version ) . '</p></div>';
$active_plugins = get_option('active_plugins');
$search_plugin = str_replace( str_replace( '\\', '/', ABSPATH . PLUGINDIR . '/' ), '', str_replace( '\\', '/', __file__ ) );
$key = array_search( $search_plugin, $active_plugins );
if ( $key !== false ) {
unset( $active_plugins[$key] );
}
update_option( 'active_plugins', $active_plugins );
}
} // class end
$ps_disable_auto_formatting =& new ps_disable_auto_formatting();
@@ -1,105 +0,0 @@
=== PS Disable Auto Formatting ===
Contributors: jim912
Tags: auto formatting, formatting, format, paragraph, linebreak, wpautop
Requires at least: 2.5
Tested up to: 2.8.3
Stable tag: trunk
Stops the automatic forming and the HTML tag removal in the html mode of WordPress, and generates a natural paragraph and changing line.
== Description ==
If you are annoying by the habit of the WordPress automatic formatting, try this plugin.
PS Disable Auto Formatting stops automatic formatting of WordPress (wpautop), and modifies the html source generated by the visual editor.
This plugin stops automatic formatting of WordPress (wpautop), and modifies the html source generated by the visual editor.
When editing it in the HTML mode, it stops unintended removal of br tag and p tag , either addition of p tag.
And when editing in the visual mode, it achieves to generate natural changing line and paragraph that you will intend.
= Functions =
* Disable the auto formating in the each areas of post, comment, excerpt, terms description.
* Stops the auto removal of p and br tag when editing html mode.
* Batch formatting to all articles that you have already posted.
== Installation ==
1. Unzip the downloaded package and upload into your WordPress plugins directory.
If you use WordPress 2.7 or later, you can install from admin page.
2. Go to plugins list and activate "PS Disable Auto Formatting".
3. After install, a managing page of automatic forming is added to config list.
The default setting stops only the automatic formating of the post.
Change and submit the settings of each areas if necessary.
= Batch formatting for past posts =
Batch formatting is a function for the past posts posted before use this plugin.
You do not have to use it if there are no post.
When you activate this plugin, there will be no changing line and paragraph in the past posts because auto formatting of WordPress has stopped.
To solve this problem, this function does the batch processing to the article within
the specified range.
(Before use this function, reserve the [backup of the data base](http://codex.wordpress.org/Backing_Up_Your_Database "backup of the data base") is recommended.)
== Frequently Asked Questions ==
= When is this plugin effective? =
For example, it will be effective in case use HTML mode every time, and when copy from existing HTML files.
It also comes to be able to post consecutive changing line.
= I do not understand whether which area to be stop batch formatting. =
Try to stop the area where the visual editor is used.
= Can the setting change and the batch formatting function be done at the same time? =
No.
When "change setting" button is pushed, the setting is changed.
When "Batch formatting" button is pushed, the batch plastic operation is done. The setting is not changed.
= It displays as "It is necessary to permit the batch formatting" and cannot do the batch formatting. =
To prevent the operational error, the batch processing is not done if there is no permission.
Please check "Permit batch formatting" check box.
== Changelog ==
* **1.0.3**
* fix : missed writing specifications of plugin(version & discription)
* **1.0.2**
* compatible with WordPress version 2.8
(bugfix : post area is whiteouted when switching visual to html mode in version 2.8)
* **0.9.2**
* bugfix : disappearing nothing included paragraph and linebreak element when load a post to edit
* bugfix : wrong javascript path in case of WordPress is set as sub directory.
* bugfix : in version 2.6 or 2.5, javascript isn't replaced.
* **0.9.1**
* bugfix : disappearing paragraph element with swithing mode in some browsers
* compatible with quickpress
* **0.9.0**
* Public release
== Screenshots ==
1. Administration interface of PS Disable Auto Formatting
== Notice ==
Please back up the data base as much as possible before doing the batch formatting.
Though we have tested as much as possible, there is a possibility that processing stops on the way.
Even if some trouble occurs in the article data by some rare accident, we can not assume the responsibility.
If you have any problems or find a bug in this plugin, please [report to us](http://www.web-strategy.jp/wp_plugin/ps_disable_auto_formatting/#postcomment "contact form").
== Links ==
"[PS Auto Sitemap](http://wordpress.org/extend/plugins/ps-auto-sitemap/ "WordPress sitemap plugin")" is a plugin automatically generates a site map page from your WordPress site.
It is easy to install for beginners and easy to customize for experts.
It can change the settings of the display of the lists from administration page, several neat CSS skins for the site map tree are prepared.
"[CMS service with WordPress](http://www.web-strategy.jp/ "CMS service with WordPress")" provides you service that uses WordPress as a CMS.
== Special Thanks ==
Translation:[dacelo](http://www.dacelo.info/blog/ "Translation")
Naming Advise:[Samuel Bollinge](http://blog.comeuphither.com/ "Naming Advise")
Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

@@ -1,117 +0,0 @@
<?php
if ( 3 >= $GLOBALS['dd32_version'] && !class_exists('DD32') ) {
class DD32 {
var $version = 3;
function DD32() {
}
//$folder = Full path to folder
function find_files( $folder, $args = array() ) {
$folder = untrailingslashit($folder);
$defaults = array( 'pattern' => '', 'levels' => 100, 'relative' => '' );
$r = wp_parse_args($args, $defaults);
extract($r, EXTR_SKIP);
//Now for recursive calls, clear relative, we'll handle it, and decrease the levels.
unset($r['relative']);
--$r['levels'];
if ( ! $levels )
return array();
if ( ! is_readable($folder) )
return false;
$files = array();
if ( $dir = @opendir( $folder ) ) {
while ( ( $file = readdir($dir) ) !== false ) {
if ( in_array($file, array('.', '..') ) )
continue;
if ( is_dir( $folder . '/' . $file ) ) {
$files2 = DD32::find_files( $folder . '/' . $file, $r );
if( $files2 )
$files = array_merge($files, $files2 );
else if ( empty($pattern) || preg_match('|^' . str_replace('\*', '\w+', preg_quote($pattern)) . '$|i', $file) )
$files[] = $folder . '/' . $file . '/';
} else {
if ( empty($pattern) || preg_match('|^' . str_replace('\*', '\w+', preg_quote($pattern)) . '$|i', $file) )
$files[] = $folder . '/' . $file;
}
}
}
@closedir( $dir );
if ( ! empty($relative) ) {
$relative = trailingslashit($relative);
foreach ( $files as $key => $file )
$files[$key] = preg_replace('!^' . preg_quote($relative) . '!', '', $file);
}
return $files;
}
function add_configure($plugin, $title, $url, $args = array() ) {
$defaults = array( 'class' => '', 'title' => $title );
$r = wp_parse_args($args, $defaults);
$link = "<a href='$url' class='{$r['class']}' title='{$r['title']}'>$title</a>";
add_action("plugin_action_links_$plugin", create_function('$links', 'return array_merge( array("' . $link . '"), $links);'));
}
//Function adds a list of changes after the plugin in the plugins table.
function add_changelog($plugin, $url) {
add_action("after_plugin_row_$plugin", create_function('$data', 'DD32::add_changelog_rows("' . $plugin .'", "' . $url . '", $data);'), 10, 2);
}
function add_changelog_rows($plugin, $url, $plugin_data) {
if ( false === get_option('dd32_changelogs', false) )
add_option('dd32_changelogs', array(), '', 'no'); //Add a no-auto-load option.
$update = get_option('update_plugins');
if ( ! isset($update->response[$plugin]) )
return;
$changelogs = get_option('dd32_changelogs', array());
if ( ! isset($changelogs[$url]) || !isset($changelogs[$url]['time']) || $changelogs[$url]['time'] < time()-24*60*60 ) {
$log = wp_remote_get($url);
if ( $log['response']['code'] != 200 )
return;
if ( ! preg_match('!== Changelog ==\s+(.*?)\s+(==|$)!is', $log['body'], $mat) )
return;
$mat = preg_split('!^=!im', $mat[1]);
$changes = array();
foreach ( (array)$mat as $version ) {
if ( preg_match('!^\s+([\w.]+)\s*=!i', $version, $mat_version) )
$change_version = $mat_version[1];
else
$change_version = 'unknown';
if ( preg_match_all('!^\s*[*](.*)$!im', $version, $mat_changes) )
foreach ( (array)$mat_changes[1] as $change )
$changes[ $change_version ][] = trim($change);
}
$changelogs[ $url ] = array('time' => time(), 'changes' => $changes);
update_option('dd32_changelogs', $changelogs);
} else {
$changes = $changelogs[ $url ]['changes'];
}
foreach ( (array) $changes as $version => $changelog_item ) {
if ( version_compare($version, $plugin_data['Version'], '<=') && 'unknown' != $version )
continue;
echo '
<tr>
<td colspan="2" class="plugin-update">&nbsp;</td>
<td class="plugin-update">' . $version . '</td>
<td colspan="2" class="plugin-update" style="text-align: left;"><ol style="list-style:circle"><li>' . implode('</li><li>', $changelog_item) .'</li></ol></td>
</tr>
';
}
}
}}
?>
@@ -1,85 +0,0 @@
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2008-08-11 16:38+1000\n"
"PO-Revision-Date: \n"
"Last-Translator: Dion Hulse <contact@dd32.id.au>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Poedit-Language: Czech\n"
"X-Poedit-Country: CZECH REPUBLIC\n"
"X-Poedit-KeywordsList: __;_e\n"
"X-Poedit-Basepath: ../\n"
"X-Poedit-SearchPath-0: .\n"
#: revision-control.php:38
#: revision-control.php:151
#: revision-control.php:294
msgid "Revisions"
msgstr "Verze"
#: revision-control.php:41
#: revision-control.php:337
msgid "Revision Control"
msgstr "Správa verzí"
#: revision-control.php:142
msgid "Post Revisions"
msgstr "Předchozí verze"
#: revision-control.php:153
#: revision-control.php:347
#: revision-control.php:368
msgid "Enabled"
msgstr "Zapnuto"
#: revision-control.php:154
#: revision-control.php:157
#: revision-control.php:165
msgid " (default)"
msgstr "(přednastavené)"
#: revision-control.php:156
#: revision-control.php:350
#: revision-control.php:371
msgid "Disabled"
msgstr "Vypnuto"
#: revision-control.php:164
#: revision-control.php:357
#: revision-control.php:377
#, php-format
msgid "Limit to %d Revisions"
msgstr "Povol %d"
#: revision-control.php:262
msgid "Are you sure you wish to delete this Revision?"
msgstr "Opravdu smazat tuto verzi?"
#: revision-control.php:262
msgid "(delete)"
msgstr "(smazat)"
#: revision-control.php:329
msgid "Settings saved."
msgstr "Nastavení uloženo"
#: revision-control.php:334
msgid "<strong>Error:</strong> You have defined <code>WP_POST_REVISIONS</code> in your <code>wp-config.php</code> file, In order to use this plugin you will need to remove it."
msgstr "<strong>Chyba:</strong> V konfiguračním souboru <code>wp-config.php</code> je nastaveno <code>WP_POST_REVISIONS</code>, pro správný běh tohoto pluginu je nutné tuto volbu odstranit."
#: revision-control.php:343
msgid "Default Revision Status for Posts"
msgstr "Přednastavený stav verzí pro příspěvky"
#: revision-control.php:364
msgid "Default Revision Status for Pages"
msgstr "Přednastavený stav verzí pro stránky"
#: revision-control.php:385
msgid "Save Changes"
msgstr "Uložit změny"
@@ -1,83 +0,0 @@
msgid ""
msgstr ""
"Project-Id-Version: Revision-Control\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2008-08-11 16:37+1000\n"
"PO-Revision-Date: \n"
"Last-Translator: Dion Hulse <contact@dd32.id.au>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Poedit-KeywordsList: __;_e\n"
"X-Poedit-Basepath: ../\n"
"X-Poedit-SearchPath-0: .\n"
#: revision-control.php:38
#: revision-control.php:151
#: revision-control.php:294
msgid "Revisions"
msgstr "Revisionen"
#: revision-control.php:41
#: revision-control.php:337
msgid "Revision Control"
msgstr "Revisionskontrolle"
#: revision-control.php:142
msgid "Post Revisions"
msgstr "Revisionen"
#: revision-control.php:153
#: revision-control.php:347
#: revision-control.php:368
msgid "Enabled"
msgstr "Aktiviert"
#: revision-control.php:154
#: revision-control.php:157
#: revision-control.php:165
msgid " (default)"
msgstr " (Standard)"
#: revision-control.php:156
#: revision-control.php:350
#: revision-control.php:371
msgid "Disabled"
msgstr "Deaktiviert"
#: revision-control.php:164
#: revision-control.php:357
#: revision-control.php:377
#, php-format
msgid "Limit to %d Revisions"
msgstr "Begrenze auf %d Revisionen"
#: revision-control.php:262
msgid "Are you sure you wish to delete this Revision?"
msgstr "Sind Sie sich sicher, dass Sie diese Revision löschen möchen?"
#: revision-control.php:262
msgid "(delete)"
msgstr "(löschen)"
#: revision-control.php:329
msgid "Settings saved."
msgstr "Einstellungen gespeichert."
#: revision-control.php:334
msgid "<strong>Error:</strong> You have defined <code>WP_POST_REVISIONS</code> in your <code>wp-config.php</code> file, In order to use this plugin you will need to remove it."
msgstr "<strong>Fehler:</strong> Sie haben <code>WP_POST_REVISIONS</code> in Ihrer <code>wp-config.php</code>-Datei definiert; um dieses Plugin nutzen zu können, müssen Sie es entfernen."
#: revision-control.php:343
msgid "Default Revision Status for Posts"
msgstr "Standard-Revisionsstatus für Artikel"
#: revision-control.php:364
msgid "Default Revision Status for Pages"
msgstr "Standard-Revisionsstatus für Seiten"
#: revision-control.php:385
msgid "Save Changes"
msgstr "Änderungen speichern"
@@ -1,207 +0,0 @@
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2008-10-01 19:22+1000\n"
"PO-Revision-Date: 2008-10-01 19:22+1000\n"
"Last-Translator: Dion Hulse <contact@dd32.id.au>\n"
"Language-Team: SteAgl <stefano.aglietti@gmail.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Poedit-Language: Italian\n"
"X-Poedit-Country: ITALY\n"
"X-Poedit-SourceCharset: utf-8\n"
"X-Poedit-KeywordsList: __;_e\n"
"X-Poedit-Basepath: ../\n"
"X-Poedit-SearchPath-0: .\n"
#: revision-control.php:38
#: revision-control.php:151
#: revision-control.php:294
msgid "Revisions"
msgstr "Revisiones"
#: revision-control.php:41
#: revision-control.php:337
msgid "Revision Control"
msgstr "Control de Revisiones"
#: revision-control.php:142
msgid "Post Revisions"
msgstr "Revisiones de Entrada"
#: revision-control.php:153
#: revision-control.php:347
#: revision-control.php:368
msgid "Enabled"
msgstr "Activado"
#: revision-control.php:154
#: revision-control.php:157
#: revision-control.php:165
msgid " (default)"
msgstr " (por defecto)"
#: revision-control.php:156
#: revision-control.php:350
#: revision-control.php:371
msgid "Disabled"
msgstr "Desactivado"
#: revision-control.php:164
#: revision-control.php:357
#: revision-control.php:377
#, php-format
msgid "Limit to %d Revisions"
msgstr "Limitar a %d Revisiones"
#: revision-control.php:262
msgid "Are you sure you wish to delete this Revision?"
msgstr "¿Estás seguro de querer eliminar esta Revisión?"
#: revision-control.php:262
msgid "(delete)"
msgstr "(borrar)"
#: revision-control.php:329
msgid "Settings saved."
msgstr "Preferencias guardadas."
#: revision-control.php:334
msgid "<strong>Error:</strong> You have defined <code>WP_POST_REVISIONS</code> in your <code>wp-config.php</code> file, In order to use this plugin you will need to remove it."
msgstr "<strong>Error:</strong> Has definido <code>WP_POST_REVISIONS</code> en tu fichero <code>wp-config.php</code>, para usar este plugin debes eliminar la definición del fichero."
#: revision-control.php:343
msgid "Default Revision Status for Posts"
msgstr "Estado por defecto de las revisiones en las entradas"
#: revision-control.php:364
msgid "Default Revision Status for Pages"
msgstr "Estado por defecto de las revisiones en las páginas"
#: revision-control.php:385
msgid "Save Changes"
msgstr "Guardar Cambios"
#~ msgid "Revisions:"
#~ msgstr "Revisioni:"
#~ msgid "Limit to"
#~ msgstr "Limitate a"
#~ msgid "<h1>Add From Server</h1> Sorry, This plugin requires WordPress 2.5+"
#~ msgstr ""
#~ "<h1>Aggiungi da server</h1> Questo plugin richiede almeno WordPress 2.5+"
#~ msgid "Add From Server"
#~ msgstr "Aggiungi da server"
#~ msgid "Import"
#~ msgstr "Importa"
#~ msgid "Filename"
#~ msgstr "Nome file"
#~ msgid "Parent Folder"
#~ msgstr "Cartella madre"
#~ msgid "Toggle All"
#~ msgstr "Cambia tutti"
#~ msgid ""
#~ "Note: Will not take effect if selected file is within an upload folder at "
#~ "present"
#~ msgstr ""
#~ "Nota: Non avrà effetto se i file selezionati sono al momento nelal "
#~ "cartella di upload"
#~ msgid "Do not add selected files to current post Gallery"
#~ msgstr ""
#~ "Non aggiungere i file selezionati alla Galleria dell'articolo corrente"
#~ msgid "Import selected files"
#~ msgstr "Importa i file selezionati"
#~ msgid "<em>%s</em> has been added to Media library"
#~ msgstr "<em>%s</em> è statp aggiunto alla Libreria media"
#~ msgid "The uploaded file could not be moved to %s."
#~ msgstr "I file caricati non possono venir spostati in %s."
#~ msgid ""
#~ "Once you have selected files to be imported, Head over to the <a href=\"%s"
#~ "\">Media Library tab</a> to add them to your post."
#~ msgstr ""
#~ "Una volta selezionati i file da importare, andare sulla <a href=\"%s"
#~ "\">linguetta Libreria media</a> per aggiungerli al proprio articolo."
#~ msgid "Current Directory"
#~ msgstr "Directory corrente"
#~ msgid "Security hash missing."
#~ msgstr "Has di sicurezza mancante."
#~ msgid "You don't have enough access rights."
#~ msgstr "Non disponi dei permessi di accesso."
#~ msgid "<h2>Set Up Your FeedBurner Feed</h2>"
#~ msgstr "<h2>Imposta il tuo feed FeedBurner</h2>"
#~ msgid ""
#~ "<p>This plugin makes it easy to redirect 100% of traffic for your feeds "
#~ "to a FeedBurner feed you have created. FeedBurner can then track all of "
#~ "your feed subscriber traffic and usage and apply a variety of features "
#~ "you choose to improve and enhance your original WordPress feed.</p>"
#~ msgstr ""
#~ "<p>Questo plugin rende semplicissimo reindirizzare il 100% del traffico "
#~ "dei vostri feed ad un feed FeedBurner da voi creato. FeedBurner può "
#~ "tenere traccia di tutto il traffico e l'utilizzo effettuato dagli "
#~ "abbonati al feed ed applicare una serie di funzioni a vostra scelta per "
#~ "migliorare e incrementare il feed originale WordPress.</p>"
#~ msgid "To get started,"
#~ msgstr "Per iniziare,"
#~ msgid "create a FeedBurner feed for "
#~ msgstr "crea un feed Feedburner per "
#~ msgid "This feed will handle all traffic for your posts."
#~ msgstr "Questo feed gestirà tutto il traffico per gli articoli."
#~ msgid ""
#~ "Once you have created your FeedBurner feed, enter its address into the "
#~ "field below"
#~ msgstr ""
#~ "Una volta creato il feed su FeedBurner, inserire il suo indirizzo nel "
#~ "campo seguente"
#~ msgid ""
#~ "Optional: If you also want to handle your WordPress comments feed using "
#~ "FeedBurner"
#~ msgstr ""
#~ "Opzionale: Se si desidera gestire anche il feed dei commenti di WordPress "
#~ "utilizzando FeedBurner"
#~ msgid ""
#~ "create a FeedBurner comments feed</a> and then enter its address below:"
#~ msgstr ""
#~ "crea un feed dei commenti su FeedBurner</a> e quindi inserisci "
#~ "l'indirizzo qui sotto:"
#~ msgid "Save"
#~ msgstr "Salva"
#~ msgid "Sorry, you are not allowed to access this page."
#~ msgstr "Non ti è permesso accedere a questa pagina."
#~ msgid "ShareThis Options"
#~ msgstr "Opzioni ShareThis"
#~ msgid ""
#~ "Where do I go to get the ShareThis Code?<br><br>You can configure your "
#~ "ShareThis widget using our customizing tool (and be sure to register to "
#~ "get tracking) located here: <a href=\"http://sharethis.com/publisher?"
#~ "type=wpplugin\">sharethis.com/publisher?type=wpplugin</a>"
#~ msgstr ""
#~ "Dove andare per ottenere il Codice ShareThis?<br><br>Puoi configurare il "
#~ "tuo widget ShareThis tramite il nostro strumento di personalizzazione (e "
#~ "assicurati di registrarti per avere accesso al tracking) che si trova "
#~ "qui: <a href=\"http://sharethis.com/publisher?type=wpplugin\">sharethis."
#~ "com/publisher?type=wpplugin</a>"
#~ msgid "Paste your widget code in here:"
#~ msgstr "Incolla qui il tuo codice del widget:"
#~ msgid "Automatically add ShareThis to your posts?*"
#~ msgstr "Aggiungi automaticamente ShareThis ai tuoi articoli?*"
#~ msgid "Automatically add ShareThis to your pages?*"
#~ msgstr "Aggiungi automaticamente ShareThis alle tue pagine?*"
#~ msgid "Yes"
#~ msgstr "Si"
#~ msgid "No"
#~ msgstr "No"
#~ msgid ""
#~ "* Note, if you turn this off, you will want to add the <a href=\"http://"
#~ "support.sharethis.com/publishers/publishers-faq/wordpress/66\">ShareThis "
#~ "template tag</a> to your theme."
#~ msgstr ""
#~ "* Nota, se disabiliti questa opzione, dovrai aggiungere il <a href="
#~ "\"http://support.sharethis.com/publishers/publishers-faq/wordpress/66"
#~ "\">marcatore dei tempate di ShareThis</a> al tuo tema."
#~ msgid "Update ShareThis Options"
#~ msgstr "Aggiorna opzioni ShareThis"
#~ msgid "ShareThis"
#~ msgstr "ShareThis"
@@ -1,86 +0,0 @@
msgid ""
msgstr ""
"Project-Id-Version: 1.7\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2008-08-17 22:16+1000\n"
"PO-Revision-Date: \n"
"Last-Translator: Dion Hulse <contact@dd32.id.au>\n"
"Language-Team: PozHonks\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Poedit-Language: French\n"
"X-Poedit-Country: FRANCE\n"
"X-Poedit-SourceCharset: utf-8\n"
"X-Poedit-KeywordsList: _e;__\n"
"X-Poedit-Basepath: ../\n"
"X-Poedit-SearchPath-0: .\n"
#: revision-control.php:38
#: revision-control.php:151
#: revision-control.php:294
msgid "Revisions"
msgstr "Révisions"
#: revision-control.php:41
#: revision-control.php:337
msgid "Revision Control"
msgstr "Contrôle des Révisions"
#: revision-control.php:142
msgid "Post Revisions"
msgstr "Historique de l'article"
#: revision-control.php:153
#: revision-control.php:347
#: revision-control.php:368
msgid "Enabled"
msgstr "Activé"
#: revision-control.php:154
#: revision-control.php:157
#: revision-control.php:165
msgid " (default)"
msgstr " (par défaut)"
#: revision-control.php:156
#: revision-control.php:350
#: revision-control.php:371
msgid "Disabled"
msgstr "Désactivé"
#: revision-control.php:164
#: revision-control.php:357
#: revision-control.php:377
#, php-format
msgid "Limit to %d Revisions"
msgstr "Limité à %d versions"
#: revision-control.php:262
msgid "Are you sure you wish to delete this Revision?"
msgstr "Êtes-vous sûr de vouloir effacer cette version ?"
#: revision-control.php:262
msgid "(delete)"
msgstr "(effacer)"
#: revision-control.php:329
msgid "Settings saved."
msgstr "Paramètres enregistrés."
#: revision-control.php:334
msgid "<strong>Error:</strong> You have defined <code>WP_POST_REVISIONS</code> in your <code>wp-config.php</code> file, In order to use this plugin you will need to remove it."
msgstr "<strong>Erreur:</strong> Vous avez défini <code>WP_POST_REVISIONS</code> dans votre fichier <code>wp-config.php</code>. Afin d'utiliser cette extensions, vous devez retirer ce code."
#: revision-control.php:343
msgid "Default Revision Status for Posts"
msgstr "Réglage Général de l'Historique des Articles"
#: revision-control.php:364
msgid "Default Revision Status for Pages"
msgstr "Réglage Général de l'Historique des Pages"
#: revision-control.php:385
msgid "Save Changes"
msgstr "Enregistrer les modifications"
@@ -1,83 +0,0 @@
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2008-08-04 11:38+1000\n"
"PO-Revision-Date: \n"
"Last-Translator: Dion Hulse <contact@dd32.id.au>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Poedit-KeywordsList: __;_e\n"
"X-Poedit-Basepath: ../\n"
"X-Poedit-SearchPath-0: .\n"
#: revision-control.php:38
#: revision-control.php:151
#: revision-control.php:294
msgid "Revisions"
msgstr "גרסאות"
#: revision-control.php:41
#: revision-control.php:337
msgid "Revision Control"
msgstr "ניהול גרסאות"
#: revision-control.php:142
msgid "Post Revisions"
msgstr "גרסאות פוסטים"
#: revision-control.php:153
#: revision-control.php:347
#: revision-control.php:368
msgid "Enabled"
msgstr "מאופשר"
#: revision-control.php:154
#: revision-control.php:157
#: revision-control.php:165
msgid " (default)"
msgstr "(ברירת מחדל)"
#: revision-control.php:156
#: revision-control.php:350
#: revision-control.php:371
msgid "Disabled"
msgstr "כבוי"
#: revision-control.php:164
#: revision-control.php:357
#: revision-control.php:377
#, php-format
msgid "Limit to %d Revisions"
msgstr "הגבל ל- %d גרסאות"
#: revision-control.php:262
msgid "Are you sure you wish to delete this Revision?"
msgstr "האם ברצונך למחוק גרסאות אלו?"
#: revision-control.php:262
msgid "(delete)"
msgstr "(מחיקה)"
#: revision-control.php:329
msgid "Settings saved."
msgstr "הגדרות נשמרו."
#: revision-control.php:334
msgid "<strong>Error:</strong> You have defined <code>WP_POST_REVISIONS</code> in your <code>wp-config.php</code> file, In order to use this plugin you will need to remove it."
msgstr "<strong>שגיאה:</strong> הגדרת <code>WP_POST_REVISIONS</code> בקובץ <code>wp-config.php</code> שלך, על מנת להשתמש בתוסף זה יש להסיר הגדרה זו.."
#: revision-control.php:343
msgid "Default Revision Status for Posts"
msgstr "מצב ברירת המחדל לגרסאות עבור פוסטים"
#: revision-control.php:364
msgid "Default Revision Status for Pages"
msgstr "מצב ברירת המחדל לגרסאות עבור עמודים"
#: revision-control.php:385
msgid "Save Changes"
msgstr "שמור שינויים"
@@ -1,207 +0,0 @@
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2008-07-27 18:02+1000\n"
"PO-Revision-Date: 2008-07-27 12:23+0100\n"
"Last-Translator: \n"
"Language-Team: SteAgl <stefano.aglietti@gmail.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Poedit-Language: Italian\n"
"X-Poedit-Country: ITALY\n"
"X-Poedit-SourceCharset: utf-8\n"
"X-Poedit-KeywordsList: __;_e\n"
"X-Poedit-Basepath: ../\n"
"X-Poedit-SearchPath-0: .\n"
#: revision-control.php:38
#: revision-control.php:151
#: revision-control.php:283
msgid "Revisions"
msgstr "Revisioni"
#: revision-control.php:41
#: revision-control.php:326
msgid "Revision Control"
msgstr "Controllo revisioni"
#: revision-control.php:142
msgid "Post Revisions"
msgstr "Revisioni articolo"
#: revision-control.php:153
#: revision-control.php:336
#: revision-control.php:357
msgid "Enabled"
msgstr "Abilitate"
#: revision-control.php:154
#: revision-control.php:157
#: revision-control.php:163
msgid " (default)"
msgstr " (predefinito)"
#: revision-control.php:156
#: revision-control.php:339
#: revision-control.php:360
msgid "Disabled"
msgstr "Disabilitate"
#: revision-control.php:163
#: revision-control.php:346
#: revision-control.php:366
#, php-format
msgid "Limit to %d Revisions"
msgstr "Limite di %d revisioni"
#: revision-control.php:252
msgid "Are you sure you wish to delete this Revision?"
msgstr "Si è sicuri di volre cancellare questa revisione?"
#: revision-control.php:252
msgid "(delete)"
msgstr "(cancella)"
#: revision-control.php:318
msgid "Settings saved."
msgstr "Le impostazioni sono state salvate."
#: revision-control.php:323
msgid "<strong>Error:</strong> You have defined <code>WP_POST_REVISIONS</code> in your <code>wp-config.php</code> file, In order to use this plugin you will need to remove it."
msgstr "<strong>Errore:</strong> Nel file <code>wp-config.php</code> la variabile <code>WP_POST_REVISIONS</code> è definita. Per poter usare questo plugin occorrerà rimuoverla."
#: revision-control.php:332
msgid "Default Revision Status for Posts"
msgstr "Stato predefinito revisioni per gli articoli"
#: revision-control.php:353
msgid "Default Revision Status for Pages"
msgstr "Stato predefinito revisioni per le pagine"
#: revision-control.php:374
msgid "Save Changes"
msgstr "Salva le modifiche"
#~ msgid "Revisions:"
#~ msgstr "Revisioni:"
#~ msgid "Limit to"
#~ msgstr "Limitate a"
#~ msgid "<h1>Add From Server</h1> Sorry, This plugin requires WordPress 2.5+"
#~ msgstr ""
#~ "<h1>Aggiungi da server</h1> Questo plugin richiede almeno WordPress 2.5+"
#~ msgid "Add From Server"
#~ msgstr "Aggiungi da server"
#~ msgid "Import"
#~ msgstr "Importa"
#~ msgid "Filename"
#~ msgstr "Nome file"
#~ msgid "Parent Folder"
#~ msgstr "Cartella madre"
#~ msgid "Toggle All"
#~ msgstr "Cambia tutti"
#~ msgid ""
#~ "Note: Will not take effect if selected file is within an upload folder at "
#~ "present"
#~ msgstr ""
#~ "Nota: Non avrà effetto se i file selezionati sono al momento nelal "
#~ "cartella di upload"
#~ msgid "Do not add selected files to current post Gallery"
#~ msgstr ""
#~ "Non aggiungere i file selezionati alla Galleria dell'articolo corrente"
#~ msgid "Import selected files"
#~ msgstr "Importa i file selezionati"
#~ msgid "<em>%s</em> has been added to Media library"
#~ msgstr "<em>%s</em> è statp aggiunto alla Libreria media"
#~ msgid "The uploaded file could not be moved to %s."
#~ msgstr "I file caricati non possono venir spostati in %s."
#~ msgid ""
#~ "Once you have selected files to be imported, Head over to the <a href=\"%s"
#~ "\">Media Library tab</a> to add them to your post."
#~ msgstr ""
#~ "Una volta selezionati i file da importare, andare sulla <a href=\"%s"
#~ "\">linguetta Libreria media</a> per aggiungerli al proprio articolo."
#~ msgid "Current Directory"
#~ msgstr "Directory corrente"
#~ msgid "Security hash missing."
#~ msgstr "Has di sicurezza mancante."
#~ msgid "You don't have enough access rights."
#~ msgstr "Non disponi dei permessi di accesso."
#~ msgid "<h2>Set Up Your FeedBurner Feed</h2>"
#~ msgstr "<h2>Imposta il tuo feed FeedBurner</h2>"
#~ msgid ""
#~ "<p>This plugin makes it easy to redirect 100% of traffic for your feeds "
#~ "to a FeedBurner feed you have created. FeedBurner can then track all of "
#~ "your feed subscriber traffic and usage and apply a variety of features "
#~ "you choose to improve and enhance your original WordPress feed.</p>"
#~ msgstr ""
#~ "<p>Questo plugin rende semplicissimo reindirizzare il 100% del traffico "
#~ "dei vostri feed ad un feed FeedBurner da voi creato. FeedBurner può "
#~ "tenere traccia di tutto il traffico e l'utilizzo effettuato dagli "
#~ "abbonati al feed ed applicare una serie di funzioni a vostra scelta per "
#~ "migliorare e incrementare il feed originale WordPress.</p>"
#~ msgid "To get started,"
#~ msgstr "Per iniziare,"
#~ msgid "create a FeedBurner feed for "
#~ msgstr "crea un feed Feedburner per "
#~ msgid "This feed will handle all traffic for your posts."
#~ msgstr "Questo feed gestirà tutto il traffico per gli articoli."
#~ msgid ""
#~ "Once you have created your FeedBurner feed, enter its address into the "
#~ "field below"
#~ msgstr ""
#~ "Una volta creato il feed su FeedBurner, inserire il suo indirizzo nel "
#~ "campo seguente"
#~ msgid ""
#~ "Optional: If you also want to handle your WordPress comments feed using "
#~ "FeedBurner"
#~ msgstr ""
#~ "Opzionale: Se si desidera gestire anche il feed dei commenti di WordPress "
#~ "utilizzando FeedBurner"
#~ msgid ""
#~ "create a FeedBurner comments feed</a> and then enter its address below:"
#~ msgstr ""
#~ "crea un feed dei commenti su FeedBurner</a> e quindi inserisci "
#~ "l'indirizzo qui sotto:"
#~ msgid "Save"
#~ msgstr "Salva"
#~ msgid "Sorry, you are not allowed to access this page."
#~ msgstr "Non ti è permesso accedere a questa pagina."
#~ msgid "ShareThis Options"
#~ msgstr "Opzioni ShareThis"
#~ msgid ""
#~ "Where do I go to get the ShareThis Code?<br><br>You can configure your "
#~ "ShareThis widget using our customizing tool (and be sure to register to "
#~ "get tracking) located here: <a href=\"http://sharethis.com/publisher?"
#~ "type=wpplugin\">sharethis.com/publisher?type=wpplugin</a>"
#~ msgstr ""
#~ "Dove andare per ottenere il Codice ShareThis?<br><br>Puoi configurare il "
#~ "tuo widget ShareThis tramite il nostro strumento di personalizzazione (e "
#~ "assicurati di registrarti per avere accesso al tracking) che si trova "
#~ "qui: <a href=\"http://sharethis.com/publisher?type=wpplugin\">sharethis."
#~ "com/publisher?type=wpplugin</a>"
#~ msgid "Paste your widget code in here:"
#~ msgstr "Incolla qui il tuo codice del widget:"
#~ msgid "Automatically add ShareThis to your posts?*"
#~ msgstr "Aggiungi automaticamente ShareThis ai tuoi articoli?*"
#~ msgid "Automatically add ShareThis to your pages?*"
#~ msgstr "Aggiungi automaticamente ShareThis alle tue pagine?*"
#~ msgid "Yes"
#~ msgstr "Si"
#~ msgid "No"
#~ msgstr "No"
#~ msgid ""
#~ "* Note, if you turn this off, you will want to add the <a href=\"http://"
#~ "support.sharethis.com/publishers/publishers-faq/wordpress/66\">ShareThis "
#~ "template tag</a> to your theme."
#~ msgstr ""
#~ "* Nota, se disabiliti questa opzione, dovrai aggiungere il <a href="
#~ "\"http://support.sharethis.com/publishers/publishers-faq/wordpress/66"
#~ "\">marcatore dei tempate di ShareThis</a> al tuo tema."
#~ msgid "Update ShareThis Options"
#~ msgstr "Aggiorna opzioni ShareThis"
#~ msgid "ShareThis"
#~ msgstr "ShareThis"
@@ -1,92 +0,0 @@
msgid ""
msgstr ""
"Project-Id-Version: revison contorol ja\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2008-07-31 13:06+1000\n"
"PO-Revision-Date: \n"
"Last-Translator: Dion Hulse <contact@dd32.id.au>\n"
"Language-Team: tekapo <tekapo@gmail.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Poedit-Language: Japanese\n"
"X-Poedit-Country: JAPAN\n"
"X-Poedit-SourceCharset: utf-8\n"
"X-Poedit-KeywordsList: __;_e\n"
"X-Poedit-Basepath: C:\\www\\wordpress\\wp-content\\plugins\\revision-control\n"
"X-Poedit-SearchPath-0: .\n"
#: revision-control.php:38
#: revision-control.php:151
#: revision-control.php:294
msgid "Revisions"
msgstr "リビジョン"
#: revision-control.php:41
#: revision-control.php:337
msgid "Revision Control"
msgstr "リビジョンコントロール"
#: revision-control.php:142
msgid "Post Revisions"
msgstr "投稿リビジョン"
#: revision-control.php:153
#: revision-control.php:347
#: revision-control.php:368
msgid "Enabled"
msgstr "使用する"
#: revision-control.php:154
#: revision-control.php:157
#: revision-control.php:165
#, fuzzy
msgid " (default)"
msgstr "(削除)"
#: revision-control.php:156
#: revision-control.php:350
#: revision-control.php:371
msgid "Disabled"
msgstr "使用しない"
#: revision-control.php:164
#: revision-control.php:357
#: revision-control.php:377
#, fuzzy, php-format
msgid "Limit to %d Revisions"
msgstr "%d リビジョン"
#: revision-control.php:262
msgid "Are you sure you wish to delete this Revision?"
msgstr "このリビジョンを削除しますか ?"
#: revision-control.php:262
msgid "(delete)"
msgstr "(削除)"
#: revision-control.php:329
msgid "Settings saved."
msgstr "設定を保存しました。"
#: revision-control.php:334
msgid "<strong>Error:</strong> You have defined <code>WP_POST_REVISIONS</code> in your <code>wp-config.php</code> file, In order to use this plugin you will need to remove it."
msgstr "<strong>エラー:</strong> <code>wp-config.php</code> ファイル内で <code>WP_POST_REVISIONS</code> が設定されています。このプラグインを利用するにはこの設定を削除してください。"
#: revision-control.php:343
msgid "Default Revision Status for Posts"
msgstr "投稿のリビジョン設定"
#: revision-control.php:364
msgid "Default Revision Status for Pages"
msgstr "ページのリビジョン設定"
#: revision-control.php:385
msgid "Save Changes"
msgstr "変更を保存"
#~ msgid "Revisions:"
#~ msgstr "リビジョン:"
#~ msgid "Limit to"
#~ msgstr "次のリビジョンまで保持:"
@@ -1,86 +0,0 @@
msgid ""
msgstr ""
"Project-Id-Version: Revision Control\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2008-12-03 22:24+1000\n"
"PO-Revision-Date: \n"
"Last-Translator: Dion Hulse <contact@dd32.id.au>\n"
"Language-Team: <contact@dd32.id.au>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Poedit-Language: French\n"
"X-Poedit-Country: Australia\n"
"X-Poedit-SourceCharset: utf-8\n"
"X-Poedit-Basepath: C:\\www\\wordpress\\wp-content\\plugins\\revision-control\n"
"X-Poedit-KeywordsList: __;_e\n"
"X-Poedit-SearchPath-0: .\n"
#: revision-control.php:38
#: revision-control.php:151
#: revision-control.php:294
msgid "Revisions"
msgstr "Revīzijas"
#: revision-control.php:41
#: revision-control.php:337
msgid "Revision Control"
msgstr "Revīziju kontrole"
#: revision-control.php:142
msgid "Post Revisions"
msgstr "Raksta revīzija"
#: revision-control.php:153
#: revision-control.php:347
#: revision-control.php:368
msgid "Enabled"
msgstr "Aktivizēta"
#: revision-control.php:154
#: revision-control.php:157
#: revision-control.php:165
msgid " (default)"
msgstr "(pamata)"
#: revision-control.php:156
#: revision-control.php:350
#: revision-control.php:371
msgid "Disabled"
msgstr "Deaktivizēta"
#: revision-control.php:164
#: revision-control.php:357
#: revision-control.php:377
#, php-format
msgid "Limit to %d Revisions"
msgstr "Saīsināt līdz %d revīzijām"
#: revision-control.php:262
msgid "Are you sure you wish to delete this Revision?"
msgstr "Vai esi pārliecināts, ka vēlies šo revīziju dzēst?"
#: revision-control.php:262
msgid "(delete)"
msgstr "(dzēst)"
#: revision-control.php:329
msgid "Settings saved."
msgstr "Uzstādījumi saglabāti."
#: revision-control.php:334
msgid "<strong>Error:</strong> You have defined <code>WP_POST_REVISIONS</code> in your <code>wp-config.php</code> file, In order to use this plugin you will need to remove it."
msgstr "<strong>Kļūda:</strong> Esi definējis <code>WP_POST_REVISIONS</code> savā <code>wp-config.php</code> failā, Lai lietotu šo spraudni, tas ir jāizņem."
#: revision-control.php:343
msgid "Default Revision Status for Posts"
msgstr "Pamata revīzijas statuss rakstiem"
#: revision-control.php:364
msgid "Default Revision Status for Pages"
msgstr "Pamata revīzijas statuss lapām"
#: revision-control.php:385
msgid "Save Changes"
msgstr "Saglabāt izmaiņas"
@@ -1,86 +0,0 @@
msgid ""
msgstr ""
"Project-Id-Version: Revision Control\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2008-12-03 22:24+1000\n"
"PO-Revision-Date: \n"
"Last-Translator: Dion Hulse <contact@dd32.id.au>\n"
"Language-Team: <contact@dd32.id.au>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Poedit-Language: French\n"
"X-Poedit-Country: Australia\n"
"X-Poedit-SourceCharset: utf-8\n"
"X-Poedit-Basepath: C:\\www\\wordpress\\wp-content\\plugins\\revision-control\n"
"X-Poedit-KeywordsList: __;_e\n"
"X-Poedit-SearchPath-0: .\n"
#: revision-control.php:38
#: revision-control.php:151
#: revision-control.php:294
msgid "Revisions"
msgstr "Revīzijas"
#: revision-control.php:41
#: revision-control.php:337
msgid "Revision Control"
msgstr "Revīziju kontrole"
#: revision-control.php:142
msgid "Post Revisions"
msgstr "Raksta revīzija"
#: revision-control.php:153
#: revision-control.php:347
#: revision-control.php:368
msgid "Enabled"
msgstr "Aktivizēta"
#: revision-control.php:154
#: revision-control.php:157
#: revision-control.php:165
msgid " (default)"
msgstr "(pamata)"
#: revision-control.php:156
#: revision-control.php:350
#: revision-control.php:371
msgid "Disabled"
msgstr "Deaktivizēta"
#: revision-control.php:164
#: revision-control.php:357
#: revision-control.php:377
#, php-format
msgid "Limit to %d Revisions"
msgstr "Saīsināt līdz %d revīzijām"
#: revision-control.php:262
msgid "Are you sure you wish to delete this Revision?"
msgstr "Vai esi pārliecināts, ka vēlies šo revīziju dzēst?"
#: revision-control.php:262
msgid "(delete)"
msgstr "(dzēst)"
#: revision-control.php:329
msgid "Settings saved."
msgstr "Uzstādījumi saglabāti."
#: revision-control.php:334
msgid "<strong>Error:</strong> You have defined <code>WP_POST_REVISIONS</code> in your <code>wp-config.php</code> file, In order to use this plugin you will need to remove it."
msgstr "<strong>Kļūda:</strong> Esi definējis <code>WP_POST_REVISIONS</code> savā <code>wp-config.php</code> failā, Lai lietotu šo spraudni, tas ir jāizņem."
#: revision-control.php:343
msgid "Default Revision Status for Posts"
msgstr "Pamata revīzijas statuss rakstiem"
#: revision-control.php:364
msgid "Default Revision Status for Pages"
msgstr "Pamata revīzijas statuss lapām"
#: revision-control.php:385
msgid "Save Changes"
msgstr "Saglabāt izmaiņas"
@@ -1,86 +0,0 @@
msgid ""
msgstr ""
"Project-Id-Version: Revision Control\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2008-08-12 12:00+1000\n"
"PO-Revision-Date: \n"
"Last-Translator: Dion Hulse <contact@dd32.id.au>\n"
"Language-Team: <contact@dd32.id.au>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Poedit-Language: French\n"
"X-Poedit-Country: Australia\n"
"X-Poedit-SourceCharset: utf-8\n"
"X-Poedit-Basepath: ../\n"
"X-Poedit-KeywordsList: __;_e\n"
"X-Poedit-SearchPath-0: .\n"
#: revision-control.php:38
#: revision-control.php:151
#: revision-control.php:294
msgid "Revisions"
msgstr "Revisies"
#: revision-control.php:41
#: revision-control.php:337
msgid "Revision Control"
msgstr "Revisie Beheer"
#: revision-control.php:142
msgid "Post Revisions"
msgstr "Bericht Revisies"
#: revision-control.php:153
#: revision-control.php:347
#: revision-control.php:368
msgid "Enabled"
msgstr "Geactiveerd"
#: revision-control.php:154
#: revision-control.php:157
#: revision-control.php:165
msgid " (default)"
msgstr "(standaard)"
#: revision-control.php:156
#: revision-control.php:350
#: revision-control.php:371
msgid "Disabled"
msgstr "Uitgeschakelt"
#: revision-control.php:164
#: revision-control.php:357
#: revision-control.php:377
#, php-format
msgid "Limit to %d Revisions"
msgstr "Beperk tot %d revisies"
#: revision-control.php:262
msgid "Are you sure you wish to delete this Revision?"
msgstr "Weet je zeker dat je deze revisie wilt verwijderen?"
#: revision-control.php:262
msgid "(delete)"
msgstr "(verwijderen)"
#: revision-control.php:329
msgid "Settings saved."
msgstr "Instellingen opgeslagen."
#: revision-control.php:334
msgid "<strong>Error:</strong> You have defined <code>WP_POST_REVISIONS</code> in your <code>wp-config.php</code> file, In order to use this plugin you will need to remove it."
msgstr "<strong>Fout:</strong> <code>WP_POST_REVISIONS</code> is gedefinieerd in <code>wp-config.php</code>, je dient deze waarde te verwijderen als je gebruik wilt maken van deze plugin."
#: revision-control.php:343
msgid "Default Revision Status for Posts"
msgstr "Standaard Revisie Status voor Berichten"
#: revision-control.php:364
msgid "Default Revision Status for Pages"
msgstr "Standaard Revisie Status voor Paginas"
#: revision-control.php:385
msgid "Save Changes"
msgstr "Wijzigingen Opslaan"
@@ -1,86 +0,0 @@
msgid ""
msgstr ""
"Project-Id-Version: Revision Control (Russian)\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2008-08-15 18:23+1000\n"
"PO-Revision-Date: \n"
"Last-Translator: Dion Hulse <contact@dd32.id.au>\n"
"Language-Team: Lecactus <lecactus@lecactus.ru>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Poedit-Language: Russian\n"
"X-Poedit-Country: RUSSIAN FEDERATION\n"
"X-Poedit-SourceCharset: utf-8\n"
"X-Poedit-Basepath: ../\n"
"X-Poedit-KeywordsList: __;_e\n"
"X-Poedit-SearchPath-0: .\n"
#: revision-control.php:38
#: revision-control.php:151
#: revision-control.php:294
msgid "Revisions"
msgstr "Ревизии"
#: revision-control.php:41
#: revision-control.php:337
msgid "Revision Control"
msgstr "Управление ревизиями"
#: revision-control.php:142
msgid "Post Revisions"
msgstr "Ревизии записи"
#: revision-control.php:153
#: revision-control.php:347
#: revision-control.php:368
msgid "Enabled"
msgstr "Включено"
#: revision-control.php:154
#: revision-control.php:157
#: revision-control.php:165
msgid " (default)"
msgstr "(по умолчанию)"
#: revision-control.php:156
#: revision-control.php:350
#: revision-control.php:371
msgid "Disabled"
msgstr "Отключено"
#: revision-control.php:164
#: revision-control.php:357
#: revision-control.php:377
#, php-format
msgid "Limit to %d Revisions"
msgstr "Ограничить до %d ревизий"
#: revision-control.php:262
msgid "Are you sure you wish to delete this Revision?"
msgstr "Вы уверены что хотите удалить эту ревизию?"
#: revision-control.php:262
msgid "(delete)"
msgstr "(удалить)"
#: revision-control.php:329
msgid "Settings saved."
msgstr "Настройки сохранены."
#: revision-control.php:334
msgid "<strong>Error:</strong> You have defined <code>WP_POST_REVISIONS</code> in your <code>wp-config.php</code> file, In order to use this plugin you will need to remove it."
msgstr "<strong>Ошибка:</strong> Вы определили <code>WP_POST_REVISIONS</code> в вашем файле <code>wp-config.php</code>. Чтобы использовать этот плагин, вы должны удалить/закомментировать эту строку."
#: revision-control.php:343
msgid "Default Revision Status for Posts"
msgstr "Статус ревизий по умолчанию для записей"
#: revision-control.php:364
msgid "Default Revision Status for Pages"
msgstr "Статус ревизий по умолчанию для страниц"
#: revision-control.php:385
msgid "Save Changes"
msgstr "Сохранить изменения"
@@ -1,85 +0,0 @@
msgid ""
msgstr ""
"Project-Id-Version: Revision\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2008-10-17 14:48+1000\n"
"PO-Revision-Date: \n"
"Last-Translator: Dion Hulse <contact@dd32.id.au>\n"
"Language-Team: Semih Aksu (Seemsiyah) <systemcoder@windowslive.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Poedit-Language: Turkish\n"
"X-Poedit-Country: TURKEY\n"
"X-Poedit-KeywordsList: _e;__\n"
"X-Poedit-Basepath: ../\n"
"X-Poedit-SearchPath-0: .\n"
#: revision-control.php:38
#: revision-control.php:151
#: revision-control.php:294
msgid "Revisions"
msgstr "Revizyonlar"
#: revision-control.php:41
#: revision-control.php:337
msgid "Revision Control"
msgstr "Revizyon Ayarları"
#: revision-control.php:142
msgid "Post Revisions"
msgstr "Yazı Revizyonları"
#: revision-control.php:153
#: revision-control.php:347
#: revision-control.php:368
msgid "Enabled"
msgstr "Aktif"
#: revision-control.php:154
#: revision-control.php:157
#: revision-control.php:165
msgid " (default)"
msgstr "(varsayılan)"
#: revision-control.php:156
#: revision-control.php:350
#: revision-control.php:371
msgid "Disabled"
msgstr "Devre dışı"
#: revision-control.php:164
#: revision-control.php:357
#: revision-control.php:377
#, php-format
msgid "Limit to %d Revisions"
msgstr "%d Revizyonla Sınırla"
#: revision-control.php:262
msgid "Are you sure you wish to delete this Revision?"
msgstr "Bu Revizyonu silmek istediğinize emin misiniz ?"
#: revision-control.php:262
msgid "(delete)"
msgstr "(sil)"
#: revision-control.php:329
msgid "Settings saved."
msgstr "Ayarlar kaydedildi."
#: revision-control.php:334
msgid "<strong>Error:</strong> You have defined <code>WP_POST_REVISIONS</code> in your <code>wp-config.php</code> file, In order to use this plugin you will need to remove it."
msgstr "<strong>Hata:</strong> <code>wp-config.php</code> dosyanızda, <code>WP_POST_REVISIONS</code> kodunu bulunduruyorsunuz. Bu eklentiyi kullanmak için gerekli alanı silmek zorundasınız."
#: revision-control.php:343
msgid "Default Revision Status for Posts"
msgstr "Yazılar için Varsayılan Revizyon Durumu"
#: revision-control.php:364
msgid "Default Revision Status for Pages"
msgstr "Sayfalar için Varsayılan Revizyon Durumu"
#: revision-control.php:385
msgid "Save Changes"
msgstr "Değişiklikleri Kaydet"
@@ -1,92 +0,0 @@
msgid ""
msgstr ""
"Project-Id-Version: revison contorol zh-tw\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2008-07-31 13:06+1000\n"
"PO-Revision-Date: \n"
"Last-Translator: Dion Hulse <contact@dd32.id.au>\n"
"Language-Team: actercompany.com <frank@actercompany.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Poedit-Language: Chinese Traditional\n"
"X-Poedit-Country: Taiwan\n"
"X-Poedit-SourceCharset: utf-8\n"
"X-Poedit-KeywordsList: __;_e\n"
"X-Poedit-Basepath: ../\n"
"X-Poedit-SearchPath-0: .\n"
#: revision-control.php:38
#: revision-control.php:151
#: revision-control.php:294
msgid "Revisions"
msgstr "修訂"
#: revision-control.php:41
#: revision-control.php:337
msgid "Revision Control"
msgstr "版本控制"
#: revision-control.php:142
msgid "Post Revisions"
msgstr "修改後"
#: revision-control.php:153
#: revision-control.php:347
#: revision-control.php:368
msgid "Enabled"
msgstr "使能夠"
#: revision-control.php:154
#: revision-control.php:157
#: revision-control.php:165
#, fuzzy
msgid " (default)"
msgstr "(刪除)"
#: revision-control.php:156
#: revision-control.php:350
#: revision-control.php:371
msgid "Disabled"
msgstr "使用しない"
#: revision-control.php:164
#: revision-control.php:357
#: revision-control.php:377
#, fuzzy, php-format
msgid "Limit to %d Revisions"
msgstr "%d 修訂"
#: revision-control.php:262
msgid "Are you sure you wish to delete this Revision?"
msgstr "您是否確定刪除此修訂版本嗎?"
#: revision-control.php:262
msgid "(delete)"
msgstr "(刪除)"
#: revision-control.php:329
msgid "Settings saved."
msgstr "設置已保存。"
#: revision-control.php:334
msgid "<strong>Error:</strong> You have defined <code>WP_POST_REVISIONS</code> in your <code>wp-config.php</code> file, In order to use this plugin you will need to remove it."
msgstr "<strong>錯誤:</strong> 您所定義的 <code>WP_POST_REVISIONS</code> 在您的 <code>wp-config.php</code> 檔案,在以使用這個外掛程式,您需要將它移除。"
#: revision-control.php:343
msgid "Default Revision Status for Posts"
msgstr "默認情況下修訂狀態的職位"
#: revision-control.php:364
msgid "Default Revision Status for Pages"
msgstr "默認情況下修訂地位的頁面"
#: revision-control.php:385
msgid "Save Changes"
msgstr "保存更改"
#~ msgid "Revisions:"
#~ msgstr "修訂:"
#~ msgid "Limit to"
#~ msgstr "限制"
@@ -1,86 +0,0 @@
msgid ""
msgstr ""
"Project-Id-Version: Revision Control\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2008-07-27 18:26+1000\n"
"PO-Revision-Date: \n"
"Last-Translator: Dion Hulse <contact@dd32.id.au>\n"
"Language-Team: <contact@dd32.id.au>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Poedit-Language: French\n"
"X-Poedit-Country: Australia\n"
"X-Poedit-SourceCharset: utf-8\n"
"X-Poedit-Basepath: C:\\www\\wordpress\\wp-content\\plugins\\revision-control\n"
"X-Poedit-KeywordsList: __;_e\n"
"X-Poedit-SearchPath-0: .\n"
#: revision-control.php:38
#: revision-control.php:151
#: revision-control.php:294
msgid "Revisions"
msgstr ""
#: revision-control.php:41
#: revision-control.php:337
msgid "Revision Control"
msgstr ""
#: revision-control.php:142
msgid "Post Revisions"
msgstr ""
#: revision-control.php:153
#: revision-control.php:347
#: revision-control.php:368
msgid "Enabled"
msgstr ""
#: revision-control.php:154
#: revision-control.php:157
#: revision-control.php:165
msgid " (default)"
msgstr ""
#: revision-control.php:156
#: revision-control.php:350
#: revision-control.php:371
msgid "Disabled"
msgstr ""
#: revision-control.php:164
#: revision-control.php:357
#: revision-control.php:377
#, php-format
msgid "Limit to %d Revisions"
msgstr ""
#: revision-control.php:262
msgid "Are you sure you wish to delete this Revision?"
msgstr ""
#: revision-control.php:262
msgid "(delete)"
msgstr ""
#: revision-control.php:329
msgid "Settings saved."
msgstr ""
#: revision-control.php:334
msgid "<strong>Error:</strong> You have defined <code>WP_POST_REVISIONS</code> in your <code>wp-config.php</code> file, In order to use this plugin you will need to remove it."
msgstr ""
#: revision-control.php:343
msgid "Default Revision Status for Posts"
msgstr ""
#: revision-control.php:364
msgid "Default Revision Status for Pages"
msgstr ""
#: revision-control.php:385
msgid "Save Changes"
msgstr ""
@@ -1,8 +0,0 @@
Translations of this plugin are welcome & any valid translations submitted will be included in future releases.
Please submit any translations in .mo/.po format to wordpress@dd32.id.au
Thanks :)
Dion
Thanks to Stefano for the Italian Translation (& the help for how to use poedit:))
@@ -1,70 +0,0 @@
=== Revision Control ===
Contributors: dd32
Tags: 2.7, 2.6, revisions, post, admin
Requires at least: 2.7
Tested up to: 2.8
Stable tag: 1.9.7
Revision Control allows finer control over the Post Revision system included with WordPress 2.6
== Description ==
Revision Control is a plugin for WordPress 2.6+ which gives the user more control over the Post/Page Revisions.
The plugin allows the user to set a blog-global setting (Settings -> Revisions) for pages/posts to enable/disable/limit the number of revisions which are saved for the page/post. The user may change this setting on a per-page/post basis from the Revisions Meta box.
The plugin also allows the deletion of specific revisions via the Revisions post metabox.
== Changelog ==
= 1.0 =
* Initial Release
= 1.1, 1.2, 1.3 =
* Italian & Japanese Translations
* Allows Deletion of a Single revision via the Revisions post box
* The global setting has been divded into Posts and Pages, The setting should now stick past a page load
* The per-post setting should now correctly work again (After a bug introduced in 1.2)
= 1.5 =
* Skipped 1.4
* Sticking option values should finally be fixed.
* Thanks to Translators, Apologies to Translators for releasing 1.5 with changes before getting updated lang files
= 1.6 =
* oops, Forgot something from 1.5: If you set the page/posts's option to the *same* as the default, Then the per-page option is now forgotten.
= 1.7 =
* Fix a bug with Firefox stealing the focus on the Revision limit drop-down, Thanks Viper007Bond
* Added HeBrew translation, Thanks Elad!
* No features added.
= 1.8 =
* German Translation from Tux
* Czech Translation from Pavel
* Dutch Translation from Steven
* Russian Translation from Кактус
* French Translation from David
* Bug fix: Limit revisions dropdown sticks to 2 revisions on admin panel.
* No features added.
= 1.9 =
* Spanish Translation from Alejandro
* Turkish Translation from Semih
* Latvian Translation from Rolands
* Fix 'Disabled' per-object checkbox
* Introduce DD32's common data class, Adds Update version changelog functionality
* WP 2.7 compatibility, This is mainly a maintanence release until version 2.0 is fully finalised.
= 1.9.1 =
* Small bugfixes
= 1.9.7 =
* 1.9.2, 1.9.3, 1.9.5 all seem screwy, Something was wrong with my SVN client, it was commiting from a previous revision and not my current revision...
* 2.8.1 compatibility
== Screenshots ==
1. The Global Settings
2. The per-post Settings
@@ -1,416 +0,0 @@
<?php
/*
Plugin Name: Revision Control
Plugin URI: http://dd32.id.au/wordpress-plugins/revision-control/
Description: Allows finer control over the number of Revisions stored on a global & per-post/page basis.
Author: Dion Hulse
Version: 1.9.7
*/
/**
* This function defines WP_POST_REVISIONS for the current post.
* Note: The define is auto-defined to true shortly after this hook is run.
*/
add_action('plugins_loaded', 'rc_loaded');
function rc_loaded() {
if ( defined('WP_POST_REVISIONS') && defined('WP_ADMIN') ) {
define('RC_DEFINED_BAD', true); //Lets notify the user about this on the Revision control menu item.
return;
}
if ( ! defined('WP_ADMIN') || ! WP_ADMIN )
return;
//Ok, Time to add Admin related hooks :)
add_action('do_meta_boxes', 'rc_meta_box_manip', 15, 2);
add_action('admin_menu', 'rc_admin_menu');
//Now the Defines.
rc_define();
}
/**
* Add the Menu items.
*/
function rc_admin_menu() {
//Hack into the Menu ordering
add_options_page( __('Revision Control', 'revision-control'), __('Revisions', 'revision-control'), 'manage_options', 'revision-control', 'rc_admin');
//Load any translations.
load_plugin_textdomain( 'revision-control',
PLUGINDIR . '/' . dirname(plugin_basename(__FILE__)) . '/langs/', //2.5 Compatibility
dirname(plugin_basename(__FILE__)) . '/langs/'); //2.6+, Works with custom wp-content dirs.
}
/**
* Defined WP_POST_REVISIONS for the current post/page/etc
* Looks for Post ID's in the post and post_ID fields.
*/
function rc_define() {
$defaults = get_option('revision-control', true);
if ( ! is_array($defaults) ) { //Upgrade from 1.0 to 1.1
$defaults = array('post' => $defaults, 'page' => $defaults);
update_option('revision-control', $defaults);
}
$current_post = rc_get_page_id();
//Post or Page:
if ( ! $type = rc_get_page_type($current_post) )
return;
$revision_status = isset($defaults[ $type ]) ? $defaults[ $type ] : true;
define('RC_REVISION_DEFAULT', $revision_status);
if ( $current_post ) {
//Handle per-post/page settings.
$post_revision_status = get_post_meta($current_post, '_revision-control', true);
if ('' !== trim($post_revision_status) ) {
$revision_status = $post_revision_status;
//Eugh.. maybe_serialize() bug #7383 means integers/booleans are stored as string!
if ( is_string($revision_status) ) {
$revision_status = (int)$revision_status;
if ( 1 == $revision_status )
$revision_status = true;
}
}
}
@define('WP_POST_REVISIONS', $revision_status);
}
/**
* Determines if this is a Page or a Post, Or other.
*/
function rc_get_page_type( $id = 0 ) {
global $pagenow;
if ( isset($_POST['post_type']) )
return $_POST['post_type'];
else if ( 'page.php' == $pagenow || 'page-new.php' == $pagenow)
return 'page';
else if ( 'post.php' == $pagenow || 'post-new.php' == $pagenow)
return 'post';
else if ( $id && $post = get_post($id) )
return $post->post_type;
return false;
}
/**
* Determines the post/page's ID based on the 'post' and 'post_ID' POST/GET fields.
*/
function rc_get_page_id() {
foreach ( array( 'post_ID', 'post' ) as $field )
if ( isset( $_REQUEST[ $field ] ) )
return absint($_REQUEST[ $field ]);
if ( isset($_REQUEST['revision']) )
if ( $post = get_post( $id = absint($_REQUEST['revision']) ) )
return absint($post->post_parent);
return false;
}
/**
* Custom Revisions box
* Should use the API, But remove_meta_box followed by add_meta_box doesnt appear to add the new box
*/
function rc_meta_box_manip($page, $context) {
global $wp_meta_boxes;
$type = version_compare($GLOBALS['wp_version'], '2.6.999', '>') ? 'normal' : 'advanced';
if ( 'dashboard' == $page )
return;
if ( $type != $context )
return;
if ( isset($wp_meta_boxes[ $page ][ $type ][ 'core' ][ 'revisionsdiv' ]) )
$wp_meta_boxes[ $page ][ $type ][ 'core' ][ 'revisionsdiv' ]['callback'] = 'rc_revisions_meta_box';
else
add_meta_box('revisionsdiv', __('Post Revisions'), 'rc_revisions_meta_box', $page, $type, 'core');
}
/**
* The new Revision Meta box
*/
function rc_revisions_meta_box( $post ) {
rc_list_post_revisions();
?>
<strong><?php _e('Revisions', 'revision-control') ?>:</strong>
<input name="revision-control" id="revision-control-true" type="radio" value="true" <?php
if ( WP_POST_REVISIONS === true ) echo ' checked="checked"' ?> /><label for="revision-control-true"><?php _e('Enabled', 'revision-control');
if ( RC_REVISION_DEFAULT === true ) echo '<strong>' . __(' (default)', 'revision-control') . '</strong>' ?></label>&nbsp;&nbsp;
<input name="revision-control" id="revision-control-false" type="radio" value="false" <?php
if ( WP_POST_REVISIONS === 0 ) echo ' checked="checked"' ?>/><label for="revision-control-false"><?php _e('Disabled', 'revision-control');
if ( RC_REVISION_DEFAULT === 0 ) echo '<strong>' . __(' (default)', 'revision-control') . '</strong>' ?></label> &nbsp;&nbsp;
<input name="revision-control" id="revision-control-number" type="radio" value="number" <?php
if ( WP_POST_REVISIONS > 1 ) echo ' checked="checked"' ?>/>
<label for="revision-control-number" onclick="return false;">
<select name="revision-control-number" onclick="jQuery('#revision-control-number').attr('checked', 'checked');">
<?php for ( $i = 2; $i < 15; $i++ ) : ?>
<option value="<?php echo $i ?>"<?php if ( WP_POST_REVISIONS === $i ) echo ' selected="selected"'
?>><?php printf( __('Limit to %d Revisions', 'revision-control'), $i);
if ( RC_REVISION_DEFAULT === $i ) _e(' (default)', 'revision-control'); ?></option>
<?php endfor; ?>
</select>
</label>
<?php
}
/**
* Sets the per-post revision status. Also deletes any now-stale revisions.
*/
add_action('save_post', 'rc_perpost_value');
function rc_perpost_value($post_ID) {
if ( ! isset($_POST['revision-control']) )
return;
if ( 'number' == $_POST['revision-control'] && ! isset($_POST['revision-control-number']) )
return;
switch ( $_POST['revision-control'] ) {
case 'true':
if ( RC_REVISION_DEFAULT === true ) {
if ('' !== get_post_meta($post_ID, '_revision-control') )
delete_post_meta($post_ID, '_revision-control');
return;
}
update_post_meta($post_ID, '_revision-control', true);
$number_to_delete = false;
break;
case 'false':
if ( RC_REVISION_DEFAULT === 0 ) {
if ('' !== get_post_meta($post_ID, '_revision-control') )
delete_post_meta($post_ID, '_revision-control');
return;
}
update_post_meta($post_ID, '_revision-control', 0);
$number_to_delete = 0;
break;
case 'number':
$number_to_delete = (int)$_POST['revision-control-number'];
if ( RC_REVISION_DEFAULT === $number_to_delete ) {
if ('' !== get_post_meta($post_ID, '_revision-control') )
delete_post_meta($post_ID, '_revision-control');
return;
}
update_post_meta($post_ID, '_revision-control', $number_to_delete);
break;
default:
//Abort! Abort!
return;
}
if ( is_integer($number_to_delete) ) {
// all revisions and (possibly) one autosave
$revisions = wp_get_post_revisions( $post_ID, array( 'order' => 'ASC' ) );
//Number to delete, based on option.
$delete = count($revisions) - $number_to_delete;
if ( $delete < 1 )
return;
$revisions = array_slice( $revisions, 0, $delete );
foreach ( (array)$revisions as $revision )
if ( false === strpos( $revision->post_name, 'autosave' ) )
wp_delete_post_revision( $revision->ID );
}
}
/**
* Copy of wp_list_post_revisions() w/ non-list support stripped out.
*
*/
function rc_list_post_revisions( $post_id = 0 ) {
if ( !$post = get_post( $post_id ) )
return;
if ( !$revisions = wp_get_post_revisions( $post->ID ) )
return;
$titlef = _c( '%1$s by %2$s|post revision 1:datetime, 2:name' );
echo "<ul class='post-revisions'>\n";
foreach ( $revisions as $revision ) {
if ( !current_user_can( 'read_post', $revision->ID ) )
continue;
$date = wp_post_revision_title( $revision );
$name = get_author_name( $revision->post_author );
$title = sprintf( $titlef, $date, $name );
if ( current_user_can( 'edit_post', $revision->ID ) && ! wp_is_post_autosave( $revision ) ) {
$url = wp_nonce_url('admin-post.php?action=delete-revision&revision=' . $revision->ID, 'delete_revision-' . $revision->ID);
$title .= sprintf(' <a href="' . $url . '" onclick="return confirm(\'%s\')">%s</a>', js_escape(__('Are you sure you wish to delete this Revision?', 'revision-control')), __('(delete)', 'revision-control'));
}
echo "\t<li>$title</li>\n";
}
echo "</ul>";
}
/**
* Deletes a Revision
*/
add_action('admin_post_delete-revision', 'rc_delete_revision');
function rc_delete_revision() {
$revision = absint($_REQUEST['revision']);
if ( $revision ) {
check_admin_referer('delete_revision-' . $revision);
if ( current_user_can('delete_post', $revision) )
wp_delete_post_revision( $revision );
}
wp_safe_redirect(wp_get_referer());
}
/**
* Add the Plugin action link.
*/
add_filter('plugin_action_links', 'rc_plugins_filter', 10, 2);
function rc_plugins_filter($links, $plugin) {
static $this_plugin;
if( ! $this_plugin )
$this_plugin = plugin_basename(__FILE__);
if( $plugin == $this_plugin ) {
$links = array_merge( array('<a href="options-general.php?page=revision-control">' . __('Revisions', 'revision-control') . '</a>'), $links);
remove_filter('plugin_action_links', 'rc_plugins_filter'); //Nice citizens, We dont *really* need to check anymore.
}
return $links;
}
/**
* The admin page, Handles saving the setting too.
* checked() / selected() cannot save us, need a === instead of ==
*/
function rc_admin() {
$defaults = get_option('revision-control');
if ( 'POST' == strtoupper($_SERVER['REQUEST_METHOD']) ) {
check_admin_referer('update-options');
foreach ( array('post', 'page') as $field ) {
if ( ! isset($_POST['revision-control-' . $field]) )
continue;
switch ( $_POST['revision-control-' . $field] ) {
case 'true':
$defaults[ $field ] = true;
break;
case 'false':
$defaults[ $field ] = 0;
break;
case 'number':
$defaults[ $field ] = (int)$_POST['revision-control-' . $field . '-number'];
break;
}
}
if ( $defaults !== get_option('revision-control') ) {
update_option('revision-control', $defaults);
echo '<div id="message" class="updated fade"><p><strong>' . __('Settings saved.', 'revision-control') . '</strong></p></div>';
}
}
?>
<?php if ( defined('RC_DEFINED_BAD') ) : ?>
<div class="message error"><p><?php _e('<strong>Error:</strong> You have defined <code>WP_POST_REVISIONS</code> in your <code>wp-config.php</code> file, In order to use this plugin you will need to remove it.', 'revision-control') ?></p></div>
<?php endif; ?>
<div class="wrap">
<?php screen_icon(); ?>
<h2><?php _e('Revision Control', 'revision-control') ?></h2>
<form method="post" action="options-general.php?page=revision-control">
<?php wp_nonce_field('update-options') ?>
<table class="form-table">
<tr valign="top">
<th scope="row"><label for="revision-control-post"> <?php _e('Default Revision Status for Posts', 'revision-control') ?></label></th>
<td>
<input name="revision-control-post" id="revision-control-post-true" type="radio" value="true" <?php
if ( $defaults['post'] === true || $defaults['post'] === false ) echo ' checked="checked"' ?> />
<label for="revision-control-post-true"><?php _e('Enabled', 'revision-control') ?></label><br />
<input name="revision-control-post" id="revision-control-post-false" type="radio" value="false" <?php
if ( $defaults['post'] === 0 ) echo ' checked="checked"' ?>/>
<label for="revision-control-post-false"><?php _e('Disabled', 'revision-control') ?></label><br />
<input name="revision-control-post" id="revision-control-post-number" type="radio" value="number" <?php
if ( is_numeric( $defaults['post'] ) && $defaults['post'] > 1 ) echo ' checked="checked"' ?>/>
<label for="revision-control-post-number" onclick="return false;">
<select name="revision-control-post-number" onclick="jQuery('#revision-control-post-number').attr('checked', 'checked');">
<?php for ( $i = 2; $i < 15; $i++ ) : ?>
<option value="<?php echo $i ?>"<?php if ( $defaults['post'] === $i ) echo ' selected="selected"'
?>><?php printf( __('Limit to %d Revisions', 'revision-control'), $i) ?></option>
<?php endfor; ?>
</select>
</label>
</td>
</tr>
<tr valign="top">
<th scope="row"><label for="revision-control-page"> <?php _e('Default Revision Status for Pages', 'revision-control') ?></label></th>
<td>
<input name="revision-control-page" id="revision-control-page-true" type="radio" value="true" <?php
if ( $defaults['page'] === true || $defaults['page'] === false ) echo ' checked="checked"' ?> />
<label for="revision-control-page-true"><?php _e('Enabled', 'revision-control') ?></label><br />
<input name="revision-control-page" id="revision-control-page-false" type="radio" value="false" <?php
if ( $defaults['page'] === 0 ) echo ' checked="checked"' ?>/>
<label for="revision-control-page-false"><?php _e('Disabled', 'revision-control') ?></label><br />
<input name="revision-control-page" id="revision-control-page-number" type="radio" value="number" <?php
if ( is_numeric( $defaults['page'] ) && $defaults['post'] > 1 ) echo ' checked="checked"' ?>/>
<label for="revision-control-page-number" onclick="return false;">
<select name="revision-control-page-number" onclick="jQuery('#revision-control-page-number').attr('checked', 'checked');">
<?php for ( $i = 2; $i < 15; $i++ ) : ?>
<option value="<?php echo $i ?>"<?php if ( $defaults['page'] === $i ) echo ' selected="selected"' ?>><?php printf( __('Limit to %d Revisions', 'revision-control'), $i) ?></option>
<?php endfor; ?>
</select>
</label>
</td>
</tr>
</table>
<p class="submit">
<input type="submit" name="Submit" value="<?php _e('Save Changes', 'revision-control') ?>" />
</p>
</form>
</div>
<?php
}
class revision_control {
//Stub until 2.0 is finalised.
var $dd32_requires = 3;
var $basename = '';
var $folder = '';
var $version = '1.9.7';
function revision_control() {
//Set the directory of the plugin:
$this->basename = plugin_basename(__FILE__);
$this->folder = dirname($this->basename);
//Set the version of the DD32 library this plugin requires.
$GLOBALS['dd32_version'] = isset($GLOBALS['dd32_version']) ? max($GLOBALS['dd32_version'], $this->dd32_requires) : $this->dd32_requires;
add_action('init', array(&$this, 'load_dd32'), 20);
//Register general hooks.
add_action('admin_init', array(&$this, 'admin_init'));
}
function load_dd32() {
//Load common library
include 'inc/class.dd32.php';
}
function admin_init() {
DD32::add_changelog($this->basename, 'http://svn.wp-plugins.org/revision-control/trunk/readme.txt');
}
}
add_action('init', create_function('', '$GLOBALS["revision-control"] = new revision_control();'), 5);
?>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

@@ -1,854 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head>
<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"><title>Role Scoper Usage Guide</title>
<style type="text/css">
ul li {
list-style-type: disc;
margin-bottom: 0.7em;
}
ol li {
margin-bottom: 0.7em;
}
ul {
margin-right: 1em;
}
ol {
margin-right: 1em;
}
.step_list {
border: 1px solid black;
margin-left: 2em;
width: 32em;
padding-right: 0.5em;
color: white;
background-color: #008c00;
font-family: Verdana,Helvetica,sans-serif;
margin-top: 0.1em;
font-weight: bold;
font-size: small;
padding-top: 0.2em;
padding-bottom: 0.2em;
}
h1 {
font-family: Arial,Helvetica,sans-serif;
margin-top: 2em;
}
h2 {
font-family: Arial,Helvetica,sans-serif;
}
h3 {
font-family: Arial,Helvetica,sans-serif;
margin-bottom: 0.05em;
margin-top: 1.75em;
}
.steplist li {
color: white;
}
p {
margin-top: 0.3em;
}
h4 {
font-family: Verdana,Helvetica,sans-serif;
margin-bottom: 0.2em;
}
h5 {
font-family: "Times New Roman",Times,serif;
font-weight: bold;
margin-bottom: 0.2em;
font-size: medium;
}
</style>
</head>
<body>
<div id="wrap">
<h1 align="center">Role Scoper
plugin for WordPress</h1>
<h1 align="center"><span style="font-size: 20pt; font-family: Arial;">Usage Guide</span></h1>
<h3 style="margin-bottom: 0.2in; text-align: center; font-family: Arial;" align="center"><font size="-1">by Kevin Behrens</font></h3>
<p style="text-align: center;" align="center"><a href="http://agapetry.net/"><span style="font-family: &quot;Courier New&quot;;">http://agapetry.net/</span></a></p>
<p style="text-align: center;" align="center"><a href="http://agapetry.net/forum/"><span style="font-family: &quot;Courier New&quot;;">http://agapetry.net/forum/</span></a></p>
<p style="margin-bottom: 0.2in; text-align: center; font-family: Arial;" align="center"><font size="-1">original
document: 10
July 2008</font></p>
<p style="margin-bottom: 0.2in; text-align: center; font-family: Arial;" align="center"><font size="-1">revision: 3 November 2008</font></p>
<p>This
document
contains Topical commentary to orient an experienced WordPress blog
administrator to the new permission controls offered by Role Scoper.
Those
uninterested in this discussion may skip to step-by-step instructions
in the
How-to Guide. This document is a work in progress which will be
expanded and
updated periodically.</p>
<p>For
a general
overview of Role Scoper&#8217;s motives and screen shots which may provide a
helpful
accompaniment, see the following online document: <a href="http://agapetry.net/news/introducing-role-scoper/">http://agapetry.net/news/introducing-role-scoper/</a></p>
<h3>Contents</h3>
<p>Section
1: <a href="#Section1%7Cregion">Glossary
and Commentary</a></p>
<p>Section
2: <a href="#Section2%7Cregion">How-to
Guide</a></p>
<p>Section
3: <a href="#Section3%7Cregion">Customizations
and Extensions</a></p>
<p><a href="#Section3%7Cregion"><span style="font-family: Arial,Helvetica,sans-serif;"><span style="font-weight: bold;"></span></span></a></p>
<h3>Installation</h3>
<ol class="step_list">
<li>Upload / extract the zip to your web server such that the
directory <b>wp-content/plugins/role-scoper/ </b>contains
role-scoper.php, etc.&nbsp; <br>
<br>
<span style="font-weight: normal;">If your site has
CPanel, just copy the
zip
into wp-content/plugins and extract.&nbsp; Otherwise, extract the
zip on
your local computer and use FTP to create the new server directory and
upload all files.</span></li>
<li>Log into WordPress (yoursite/wp-admin/) as an Administrator</li>
<li>Click on Plugins; activate Role Scoper</li>
</ol>
Once the plugin is activated, this Usage Guide should prove
helpful.&nbsp; Your steps from here depend on what you're trying to
accomplish. &nbsp;If this document and the Role Scoper interface
don't
point the way, you can always place a request for help in the <a href="http://agapetry.net/forum/">support forum</a>.<br>
<a name="Section1|region"></a>
<h1 align="center">Section
1:
Glossary and Commentary</h1>
<h3>Description</h3>
<p>Role
Scoper is
a comprehensive drop-in replacement for capability enforcement and
administration in WordPress. Assign reading, editing or administration
roles to
users or groups on a page-specific, category-specific or other
content-specific
basis.</p>
<h3>Menu
Access</h3>
<p>After
activating Role Scoper, you will find two new utility links on the
right next
to &#8220;Settings&#8221;: Roles and Groups. Most of Role Scoper&#8217;s settings are
accessed
through the &#8220;Roles&#8221; or &#8220;Groups&#8221; links.</p>
&#8220;Groups&#8221;
pertains to the definition of User Groups, and to role assignments for
those
groups (see &#8220;User Groups&#8221; below. The role assignment portion of the
&#8220;Groups&#8221;
tab is therefore a mirror of corresponding role assignment links on the
&#8220;Roles&#8221;
tab which pertain to individual users.
<p>Those
wishing
only to assign or restrict access to an individual post or page may go
straight
to the WordPress post/page editor interface and look for the new
&#8220;Readers&#8221;,
&#8220;Contributors&#8221; and &#8220;Editors&#8221; tabs.</p>
<a name="general_roles"></a>
<h3>Scope:
Blog, Section or Object</h3>
<p>By
default,
Wordpress roles specify capabilities that a user has blog-wide. Pages
and Posts
can be marked private. If a user&#8217;s role includes the read_private_pages
capability, <b>all</b> private pages are readable to them.
Otherwise <b>none</b>
are. The same is true for editing or publishing capabilities - a user
can edit <b>all</b>
posts made by other users, or <b>none </b>of them.</p>
<p>Role
Scoper
allows you to assign roles in any of three scopes: blog-wide (Blog
scope),
category-wide (Section scope) or for a specific post/page (Object
scope). To reduce confusions, the
generic names &#8220;section&#8221; and "object" are not generally used in the User
Interface or in this documentation. &nbsp;However, a
section can consist of some custom taxonomy other than &#8220;category&#8221;, and
may or may not use the WP term_taxonomy schema. &nbsp;Likewise, Role
Scoper can be configured to control permissions for "objects" other
than posts and pages. &nbsp;In the future, other
plugins may use Role Scoper API to define sections
such as
forums, calendars or galleries.</p>
<p>When
some read
or edit operation is requested, Role Scoper filters the request and
grants
permission if the user has a qualifying role in any scope:</p>
<p style="text-align: center;" align="center"><span style="color: blue;">Blog
scope</span> <b>or</b>
<span style="color: blue;">Section
scope</span> <b>or</b> <span style="color: blue;">Object
scope</span>.</p>
<a name="roles~category"></a>
<h3>Category&nbsp;Role Assignment</h3>
<p>Category
roles, as an instance of &#8220;Section Roles&#8221;, are assigned on the WP Admin
-&gt;
Roles -&gt; Category page. &nbsp;Users and/or Groups may
receive a Category Role assignment.&nbsp;
Each Category has
a separate set of role checkboxes. Note that whether assigning or
removing role
assignments, you must check all the users/groups and all the roles
being
modified. The
dropdown list next to the &#8220;Update&#8221; button determine what effect the
update has.</p>
<p>When
assigning Category Roles, you can choose whether to assign to the selected
categories
only, to the selected and all subcategories (present or future), or to
subcategories only.</p>
<a name="roles~page"></a>
<a name="post"></a>
<a name="page"></a>
<h3>Post / Page Role Assignment</h3>
<p>Post
Roles and
Page Roles are instances of &#8220;Object Roles&#8221;. They may be assigned via
new tabs
on the WP post / page edit interface - &#8220;Readers&#8221;, &#8220;Editors&#8221;, etc. When
selecting users or groups for page role assignment, note that the
normal
checkboxes assign the role to current page, whereas the braced {[]}
checkbox
assigns the role to all subpages (present or future).</p>
<a name="restrictions~category"></a>
<h3>Category Restrictions <small><small>(previously
known as "Exclusive Section
Roles")</small></small></h3>
<p>A
role
assignment <b>grants </b>a user or group capabilities
which they may not
already have. When you assign several users the Post Editor role in
&#8220;Category
A&#8221;, you are allowing them to edit &#8220;Category A&#8221; posts on the basis
of&nbsp;Category Role. Some may already qualify based on their general
(blog-wide) WordPress role,
others may not.</p>
<p>However,
<b>one
user&#8217;s role assignment</b> <b>does not reduce access</b>
for any other users.
To deny some users access to &#8220;Category A&#8221; even though their General Role
qualifies, you must specify a<b>&nbsp;Category Restriction</b>.
There is a
separate setting for each Role in each Category. For Category A, if the
Post
Reader role is restricted, then users with a general Wordpress role of Post
Reader (which includes anonymous users) cannot read Category A posts
unless they
have a Category Role or Post Role assignment. Users with a different general role
which also contains the required capabilities will not be excluded.</p>
<p>Another
way of
describing&nbsp;Restrictions is that they allow you to selectively
remove
one or more qualifying clauses from the {General Role <b>OR</b> Category
Role <b>OR</b> Post/Page
Role} formula.</p>
<h5><b>Some
&#8220;Category Restriction&#8221; details to note:</b></h5>
<ul>
<li>If a
post is in &#8220;Category A&#8221; and &#8220;Category B&#8221;, a
user will not be excluded unless both categories have the necessary role restrictions.</li>
<li>With
any role assignment, a user is considered
to possess the assigned role <b>and</b> all roles it
&#8220;contains&#8221;. The Author
role contains the Contributor role if Author also has all of
Contributor&#8217;s
capabilities. The contained role is a subset of the containing role.</li>
<li>For a
user to be excluded, restrictions must be set for their General Role and all the roles it contains. For
example, if
a user&#8217;s&nbsp;Author role has been marked Restricted for &#8220;Category
A&#8221;, they
are not excluded from reading posts unless the roles &#8220;contained&#8221; in
Author (Post
Contributor and Post Reader) are also restricted. The actual role requirement in that case is Post Reader.</li>
<li>Blogs
which have used Role Manager to customize
WP roles should be aware of the following: If Role Scoper is configured
to use
&#8220;RS&#8221; role types, Category and Post/Page Restrictions are
applied on
the basis of which &#8220;RS&#8221; roles a user&#8217;s WP role contains. This statement will only
be
decipherable in conjunction with the documentation on &#8220;role types&#8221;. It
should
be a non-issue for WP installations which have removed any caps from
the
default WP role definitions.</li>
</ul>
<h3>Restricted Post / Page Roles</h3>
<p>As
stated
above, categories can be configured such that a user&#8217;s General Role is
ignored -
and a qualifying Category Role or Post/Page role assignment is required.
Likewise,
individual posts and pages can be configured such that General Role <b>and</b> Category Roles are ignored. These Post/Page Restrictions can be
used to
narrow read or edit access.</p>
<p>Limiting
read
access to a fixed set of users is a three-step operation in the
WordPress post
edit interface.</p>
<ol>
<li>select those users
in the &#8220;Readers&#8221; tab</li>
<li>check the
&#8220;Restrict&#8221; checkbox</li>
<li>save the post</li>
</ol>
<a name="groups"></a>
<h3>User
Groups</h3>
<p>Any General Role, Category Role or Post/Page role assignment can be applied to
individual
users <b>or</b> to a group of users. If your user base
includes subsets of user
who commonly get the same role assignments, consider defining those
users as
members of a Group.</p>
<h3>WP
Role Metagroups</h3>
<p>In
addition to
custom-defined user groups, you may find it convenient to assign some Category
Role or Post/Page Role to all users who have a certain WordPress-defined Role. You
will find
these metagroups (labeled as [WP Editor], [WP Author], etc.) alongside
the
custom-defined groups in role assignment interfaces. </p>
<h3>&#8220;Private&#8221; versus
&#8220;Restricted&#8221;</h3>
<p>Wordpress
defines &#8220;private&#8221; posts and pages as those which require a
corresponding
read_private capability, usually possessed only by Administrators,
Editors, and
by the content author. Most significantly, the content is hidden from
anonymous
users.</p>
<p>For
the
purpose of limiting read access, Role Scoper&nbsp;Restrictions can
be used
as an equivalent. If a post&#8217;s categories, or the post itself, Restrict
the&nbsp;Post Reader role, the post is effectively private regardless
of the
WP
private status. Likewise, Category Role or Post/Page Role assignments
can
enable
access to a &#8220;private&#8221; post or page as long as the assigned role
includes the
corresponding read_private capability.</p>
<p>Despite
the
potential equivalence stated above, setting sensitive posts or pages to
WP
&#8220;private&#8221; is still the recommended approach. This will ensure that if
Role
Scoper is accidentally disabled, content is not revealed
inappropriately. In
the future, Role Scoper may automatically set posts/pages to private
when a
corresponding Role Scoper setting is made. Due to technical
difficulties, you
must currently achieve that extra safeguard manually.</p>
<h3>Role
Type</h3>
<p>In
Wordpress
jargon, Roles contain Capabilities. Wordpress comes with a default set
of Roles
- Administrator, Editor, Author, Contributor and Subscriber. Those
default role
definitions are sensible and sufficient for most WP installations. The
adventuresome can use the Role Manager plugin to add or remove
capabilities
from any role, perhaps to account for new capabilities defined by some
other
plugin. The intent is that for any user, there is one role definition
which
comprehensively describes every capability the user has, for any object
type
which exists within the blog. Every user has one general role.</p>
<p>By
default,
Role Scoper takes a different approach - the &#8220;RS&#8221; role type. Each
object type
has a different set of role definitions. So, for posts, there are &#8220;Post
Reader,
Private Post Reader, Post Author, Post Editor&#8221; role definitions.
Likewise for
pages and, potentially, for other plugin-defined object types which
choose to
support RS role definitions. </p>
<p>The
upshot of
this is that instead of defining a modified &#8220;Author&#8221; role which also
includes
the &#8220;edit_pages&#8221; capability, you just assign the &#8220;Page Author&#8221; role
where
desired. Instead of just assigning one comprehensive WP-defined role,
you can
select a pertinent RS-defined role separately for each object type.</p>
<p>If
for any
reason you must apply WP-defined roles as Category Roles or Post/Page
Roles, simply
go to WP Admin &gt; Roles &gt; Roles and change the Role Type
dropdown to &#8220;WP&#8221;.
</p>
<h3>Limiting
the Page Parent Selection</h3>
<p>Another
happy
side effect of &#8220;RS&#8221; role types is the ease with which plugins can
enable users
to assign newly-defined capabilities. Role Scoper introduces the
&#8220;create_child_pages&#8221; capability. This capability enables a user to
select the
corresponding page as &#8220;Page Parent&#8221;. Otherwise a page is unavailable as
parent
unless the user can edit it. The new RS-defined &#8220;Page Associate&#8221;
contains
&#8220;create_child_pages&#8221;, making it one step up from Page Reader. This
useful role
distinction would have been difficult to provide if each blog
administrator was
required to manually merge the capability into existing WP roles.</p>
<p>Note
that Role
Scoper will not allow a page to be published with a &#8220;Main Page&#8221; parent
unless
the user has the blog-wide edit_published_ pages capability. Although
WordPress
doesn't provide a means to remove &#8220;Main Page&#8221; from the dropdown,
attempts by
unqualified users to publish a new page with &#8220;Main Page&#8221; parent will
result in
&#8220;draft&#8221; status. Attempts to modify an existing page from non-Main to
Main
(or from Main to non-Main) Page
Parent will revert the
page back to the previous stored Page Parent.<span style="font-family: Arial,Helvetica,sans-serif;"><span style="font-weight: bold;"></span></span></p>
<a name="Section2|region"></a>
<h1 align="center">Section
2:
How-to Guide</h1>
<p align="center">(note:
this section is a
work in progress which does not yet fully address&nbsp;Editing
Roles)</p>
<h4>Defining a custom User Group <font size="-1">(not
required for direct user role assignment)</font></h4>
<ol class="step_list">
<li>Go
to WP Admin
-&gt; Groups</li>
<li>Click
the &#8220;Add New&#8221;
scroll link</li>
<li>Enter
a group name
and description</li>
<li>Select
checkboxes
for Group Members</li>
<li>Optionally,
select
Group Administrators
(WP admin can always manage group)</li>
<li>Click
the Create
button</li>
</ol>
<p>Groups
created in this manner will be available for role assignment in the
following
procedures.</p>
<p>Role
Scoper can be configured to hide or reveal posts regardless of any
WP-defined
&#8220;private&#8221; status. The procedures below are sufficient to set post
visibility.
However, there are three reasons you might still choose to set the WP
&#8220;private&#8221;
status:</p>
<ul>
<li>Setting
the WP &#8220;private&#8221; status will enable more flexibility in controlling
read access
per category</li>
<li>A
post that has the WP &#8220;private&#8221; status will continue to be hidden if
Role Scoper
is accidentally uninstalled.</li>
<li>Setting
the WP &#8220;private&#8221; status will make the posts easier to administer,
taking
advantage of &#8220;Manage Posts&#8221; filtering provided by the WP core</li>
</ul>
<p>The
following procedures apply regardless of whether you check the &#8220;keep
this post
private&#8221; box:</p>
<h4><b>Restricting
Read Access to an Individual Post/Page</b></h4>
<ol class="step_list">
<li>Enter
the WordPress
Write Post / Edit
Post interface</li>
<li>Scroll
down to the
&#8220;Readers&#8221; tab (under
&#8220;Advanced Options&#8221;) and expand it</li>
<li>Check
the
&#8220;Restrict&#8221; checkbox at the
bottom of the tab</li>
<li>Save
the post</li>
</ol>
<p>The
post will now be hidden from WP Subscribers who are not selected in
this
&#8220;Readers&#8221; tab.&nbsp; If the post must also be hidden from WP
Contributors, set
the &#8220;Restrict&#8221; checkbox in the &#8220;Contributors&#8221; tab.&nbsp; To hide
it from WP
Authors and Editors, set the &#8220;Restrict&#8221; checkbox in the &#8220;Editors&#8221;
tab.&nbsp;
In Role Scoper lingo, the post&nbsp;now&nbsp;Restricts the
checked
roles.</p>
<h4>Granting Read Access to an Individual Post/Page</h4>
<ol class="step_list">
<li><span style="font-weight: normal;">Decide
whether you
want to manage
permissions user-by-user, for Wordpress role &#8220;groups&#8221;, and/or for
custom-defined User Groups.&nbsp;</span> If custom user
groups are
desired, define
those first (see above).</li>
<li>Enter
the WordPress
Write Post / Edit
Post interface</li>
<li>Scroll
down to the
&#8220;Readers&#8221; tab (under
&#8220;Advanced Options&#8221;) and expand it</li>
<li>Select
the checkbox
of any User and/or
Group who should have read access</li>
<li>Save
the Post</li>
</ol>
<p>If
it's convenient to manage each hidden post/page with the above
procedures,
that's all you need to know.&nbsp; If access control by category is
desirable,
read on.</p>
<h4><b>Restricting
Read Access by Post Category</b></h4>
<ol class="step_list">
<li>Go
to WP Admin
-&gt; Restrictions -&gt; Category</li>
<li>Scroll
down to your
category of interest,
perhaps using the scroll link at top</li>
<li>Select
the &#8220;Private
Post Reader&#8221; checkbox
to restrict read access to private posts by anonymous users and WP
Subscribers</li>
<li>Optionally,
select
the &#8220;Post Reader&#8221;
checkbox to restrict read access to non-private posts by anonymous
users and WP
Subscribers <span style="font-weight: normal;">(if the WP
Subscriber role has not been modified to include
read_private_posts)</span></li>
<li>Scroll
to the top</li>
<li style="font-weight: normal;">Note
that the
adjacent dropdown indicates
that the Update action will cause blog-wide assignment of the selected
roles to
be ignored for posts in the selected category.</li>
<li>Click
the Update
button</li>
</ol>
<h4><b>Granting
Read Access by Post Category</b></h4>
<ol class="step_list">
<li>Go
to WP Admin
-&gt; Roles -&gt; Category
<br></li>
<li>Scroll
down to your
category of interest,
perhaps using the scroll link at top</li>
<li>Select
the roles you
would like to assign</li>
<li>Scroll
to the top</li>
<li>Select users and/or
groups to assign&nbsp;selected roles</li>
<li style="font-weight: normal;">Note
that the
adjacent dropdown indicates
that the Update action will cause the selected roles to be assigned
for
posts in the selected section.&nbsp;</li>
<li>If
you want the same
role to also be
assigned for all current and future subcategories, change the dropdown
to
&#8220;assign for selected and sub-categories&#8221;.</li>
<li>Click
the Update
button</li>
</ol>
<p>Note
that <b>if</b> a Post Restriction is <b>not</b> set for Readers, read
access to it will be granted if:</p>
<ul>
<li>the
user has a qualifying Category Role in any post category</li>
</ul>
<div style="margin-left: 80px;"><span style="font-weight: bold;">-
OR -</span></div>
<ul>
<li><b>any
</b>of
the post's categories
do not ignore the user's qualifying blog-wide general role (or another qualifying
role it
contains)</li>
</ul>
<p>So
you <b>cannot </b>hide a post just by assigning it to an
additional &#8220;hidden&#8221;
category.&nbsp; If individual posts don't restrict the Readers role,
they will be readable if <b>any</b> of their categories
are readable to the
user.&nbsp;&nbsp; If your categorization and post restriction
goals demand the
&#8220;readable cat + hidden cat = hidden post&#8221; formula, you'll be frustrated
with
this plugin.&nbsp; But here are some suggestions for making the
Role Scoper
model work with your existing categories:</p>
<ul>
<li>As
mentioned above, different role requirements and assignments can be
made for
&#8220;private&#8221; and &#8220;non-private&#8221; posts in the same category.</li>
<li>Depending
on how your theme displays categories, you could move some &#8220;Category A&#8221;
posts
into a new subcategory ( Category A / Category A*), and remove them
from
&#8220;Category A&#8221;.&nbsp; Then set Category Restrictions and Category Role assignments for Category A*.</li>
</ul>
<p></p>
<h4><b>Restrict
Posting
/ Editing by Category</b></h4>
<p>There
are two pieces:
granting access and restricting access, and two basic ways to achieve
the
desired access and restrictions:</p>
<ul type="disc">
<li>Start
with user(s) who have too little access and elevate them</li>
<li>Start
with user(s) who have too much access and restrict them</li>
</ul>
<p>You can also use some
combination
of the two.&nbsp; Where
possible simplify your life by setting your users as WordPress
subscribers,
then following the first Role Scoper configuration procedure
below.&nbsp; This also provides the
greatest security,
since those users will default to zero editing ability if Role Scoper
is
accidentally deactivated or otherwise disabled.</p>
<h4><b>Enabling
a
Subscriber to Post in specific Categor(ies)</b></h4>
<ol class="step_list">
<li>Set
UserA to WordPress role of Subscriber</li>
<li>Assign
a Category Role of Post Author to UserA for the desired category (WP
Admin &gt;
Roles &gt; Category)</li>
</ol>
<p>If some users need to
retain a
higher WordPress role
but still be limited in posting categories, you will also need to
define that
extra restriction as follows:</p>
<p></p>
<h4><b>Restricting
Posting Categor(ies) for Contributor/Author/Editor</b></h4>
<ol class="step_list">
<li>Go
to the Category Restrictions admin
page&nbsp;<br>
(WP Admin &gt; Restrictions &gt; Category)</li>
<li>In the "DEFAULTS" table, check
the boxes for &#8220;Post
Contributor&#8221; and &#8220;Post Author&#8221;.&nbsp; Also &#8220;Post Editor&#8221; if you
want to
restrict WP editors.</li><li>Confirm
the dropdowns next to
Update button say &#8220;Restrict selected roles" and "for selected categories"</li>
<li>Click
Update</li>
</ol>
<p>Now Contributor and
Authors (and
editors, if you restricted
that role) will not be able to post or edit in any&nbsp;category
unless you assign them a Category Role for it, as explained for UserA
above. &nbsp;Note that the "DEFAULTS" setting applies the restriction
to all existing and future categories (unless one is manually
unrestricted). &nbsp;To restrict fewer categories, select desired
restrictions for each category instead.</p>
<br>
<h4><b><b>Enabling a User to Edit Specific Page(s),
and Nothing Else:</b></b></h4>
<ol class="step_list">
<li> Give them a WordPress role of Subscriber</li>
<li>Manage &gt; Pages &gt; Edit their page</li>
<li>Expand the "Editors" tab under "Advanced Options"</li>
<li>Check the non-braced checkbox to the left of your user's
name&nbsp;<span style="font-weight: normal;">(if subpages will be created, also check the braced checkbox {[]}, which
assigns the role for all current or future subpages)</span></li>
<li>Save the Page</li>
</ol>
<p>Note that if you also assign this user a Role Scoper General Role
of
Page Author, they will be able to create subpages off their member
page, but not off any other pages:</p>
<ol class="step_list">
<li> Go to WP Admin &gt; Roles &gt; General</li>
<li>&nbsp;Select your user name(s)</li>
<li>&nbsp;Select the Page Author role</li>
<li>&nbsp;Click Update</li>
</ol>
<p> <strong>OR</strong>, if you want all subscribers
to have this ability:</p>
<ol class="step_list">
<li> Go to WP Admin &gt; Roles &gt; General</li>
<li>Select [WP Subscriber]</li>
<li>Select the Page Author role</li>
<li>Click Update</li>
</ol>
<p></p>
<a name="Section3|region"></a>
<h1 align="center">Section
3:
Customizations and Extensions</h1>
<p align="center">(note:
this section will
be expanded in future revisions)</p>
<h3>Hidden
Content Teaser</h3>
<p>By
default,
Role Scoper hides content for which users lack a sufficient role
assignment.
You can also apply a teaser by activating that option in the Role
Scoper
options page at WP Admin &gt; Roles &gt; Roles.</p>
<h3>Other
Role Scoper Options</h3>
<p>Other
options
on the Roles &gt; Options page pertain
primarily to customizations
of the Role Scoper for future plugin-defined data sources. Most users
can
safely leave the default settings. The settings available there do
contains
descriptive captions.</p>
<h3>Template
Functions</h3>
<p>To
support
customized markup of restricted and/or currently hidden posts, Role
Scoper
provides the following template functions for use in themes:</p>
<p><span style="font-family: &quot;Courier New&quot;; color: blue;">&nbsp;is_restricted_rs(
);</span></p>
<p><span style="font-family: &quot;Courier New&quot;; color: blue;">&nbsp;is_teaser_rs(
);</span><br>
<br>
note:
If
calling these functions outside the WP loop, you should pass post ID as
the
first function argument. Otherwise just call as stated above.</p>
<h3>Plugin
API</h3>
<p>Other
plugins
may define their own data sources, taxonomies (WP term_taxonomy or
custom
tables), capabilities and roles. See defaults_rs.php and
role-scoper_main.php
for example hook usage. Details will be provided in later versions of
this
document.</p>
<p>A
current
version of this document is available online at </p>
<p><a href="http://agapetry.net/downloads/RoleScoper_UsageGuide.htm">http://agapetry.net/downloads/RoleScoper_UsageGuide.htm</a></p>
</div>
</body></html>
@@ -1,78 +0,0 @@
<?php
if( basename(__FILE__) == basename($_SERVER['SCRIPT_FILENAME']) )
die( 'This page cannot be called directly.' );
require_once( SCOPER_ABSPATH . '/lib/agapetry_wp_admin_lib.php' ); // function awp_remote_fopen()
function agp_is_ie6() {
$agent = strtolower($_SERVER['HTTP_USER_AGENT']);
if ( (false !== strpos($agent, 'msie 6.0') || false !== strpos($agent, 'msie 5.5'))
&& ( false === strpos($agent, 'opera') && false === strpos($agent, 'firefox') && false === strpos($agent, 'safari') ) )
return true;
}
// Box CSS derived from "Even more rounded corners" by Scott Schiller
// http://www.schillmania.com/content/projects/even-more-rounded-corners/
echo ('
<ul class="masthead"><li id="masthead-main" title="Agapetry Creations"><a class="agp-toplink" href="http://agapetry.net"> </a></li></ul>
<div id="wrap" style="height: 100%">
');
echo('
<div class="rc-about-dialog">
<p>
<a title="agape" href="http://www.merriam-webster.com/cgi-bin/audio.pl?agape002.wav=agape" target="_blank">a<small><small>&#8226;</small></small>ga<small><small>&#8226;</small></small>p&eacute;</a> (&alpha;&gamma;&alpha;&pi;&eta;):
');
_e('unselfish, benevolent love, born of the Spirit.', 'scoper');
echo ('</p><p>');
_e('Agap&eacute; discerns needs and meets them unselfishly and effectively.', 'scoper');
echo ('</p><p>');
printf(__('This WordPress plugin is part of my agap&eacute; try, a lifelong effort to love God and love people by rightly using the time and abilities He has leant me. As a husband, father, engineer, farmer and/or software developer, I have found this stewardship effort to be often fraught with contradiction. A wise and sustainable balancing of roles has seemed to elude me. Yet I want to keep trying, trusting that if God blesses and multiplies the effort, it will become agapetry, a creative arrangement motivated by benevolent love. A fleeting childlike sketch of the beautiful %1$s chain-breaking agap&eacute;%2$s which %3$s Jesus Christ unleashed%4$s so %5$s freely%6$s and aptly on an enslaving, enslaved world.', 'scoper'), '<a href="http://www.biblegateway.com/passage/?search=Isaiah%2059:1-60:3;Matthew%203:1-12;Luke%204:5-8;Matthew%205:1-48;Matthew%206:9-15;&version=50;" target="_blank">', '</a>', '<a href="http://www.biblegateway.com/passage/?search=Matthew%2020:20-28;Matthew%2026:36-49;John%2018:7-12;John%2019:1-30;1%20John%202:1-6;&version=47;" target="_blank">', '</a>', '<a href="http://www.biblegateway.com/passage/?search=Isaiah%2055;John%207:37-51;&version=47;" target="_blank">', '</a>');
echo '</p><p>';
printf(__('Although Role Scoper\'s development was a maniacal hermit-like effort, it was only possible because of the clean and flexible %1$s WordPress code base%2$s. My PHP programming skills grew immensely by the good examples set forth there and in plugins such as %3$s NextGen Gallery%4$s. I\'m not done learning, and look forward to some real-time cooperation with these and other developers now that my all-consuming quest has reached a stable plateau.', 'scoper'), "<a href='http://codex.wordpress.org/Developer_Documentation' target='_blank'>", '</a>', "<a href='http://alexrabe.boelinger.com/wordpress-plugins/nextgen-gallery/' target='_blank'>", '</a>');
echo '</p><p>';
printf( 'A Spanish translation is available in this installation thanks to %1$sRafo&copy; Computaci&oacute;n & Web%2$s. ', "<a href='http://www.rafo.cl/' target='_blank'>", '</a>');
printf(__('Thanks to %1$sAlberto Ramicciotti%2$s for the Italian translation. I do try to be translator-friendly, but any untranslated captions are due to my flurry of recent additions and changes, and will no doubt be updated soon. Now there must be someone else who wants Role Scoper in their language...', 'scoper'), "<a href='http://obertfsp.com' target='_blank'>", '</a>');
echo '</p><p>';
printf(__( 'Role Scoper is open source software released under the %1$s General Public License (GPL)%2$s. Due to limitations, obligations and non-technical aspirations common to most human beings, I will probably never again pursue uncommissioned plugin development on the scale Role Scoper has required. However, I do plan to provide some free support, correct bugs which emerge and revise the plugin for future WordPress versions. If it adds value to your website or saves you time and money, you can express appreciation in several ways:', 'scoper'), '<a href="http://www.opensource.org/licenses/gpl-license.php">', '</a>');
echo '</p><ul id="agp-thanks" class="rs-notes" style="margin-left: 1em"><li>';
printf(__('%1$s Submit technical feedback%2$s, including improvement requests.', 'scoper'), '<a href="http://agapetry.net/forum/">', '</a>');
echo '</li><li>';
printf(__('%1$s Submit a case study%2$s, explaining how Role Scoper helps you do something excellent and praiseworthy.', 'scoper'), '<a href="http://agapetry.net/forum/">', '</a>');
echo '</li><li>';
printf(__('%1$s Localize Role Scoper%2$s to your own language %3$s using poEdit%4$s ', 'scoper'), '<a href="http://weblogtoolscollection.com/archives/2007/08/27/localizing-a-wordpress-plugin-using-poedit/">', '</a>', '<a href="http://weblogtoolscollection.com/archives/2007/08/27/localizing-a-wordpress-plugin-using-poedit/">', '</a>');
echo '</li><li>';
$paypal_button = '<form action="https://www.paypal.com/cgi-bin/webscr" method="post" class="donate"><input type="hidden" name="cmd" value="_s-xclick" /> <input type="image" style="background:none" src="http://agapetry.net/btn_donate_SM.gif" name="submit" alt="PayPal - The safer, easier way to pay online!" /> <img alt="" border="0" src="http://agapetry.net/pixel.gif" width="1" height="1" style="opacity:0.01;" /> <input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----MIIHRwYJKoZIhvcNAQcEoIIHODCCBzQCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYBJ1SuZO67UwhfCgc0+nCBqoUlS+HeYvGJXiTHpd6jxN8kls6JQdxU917u9kVx99bZUEaPVoqgHX6hQ0locnaTCG04T0qgkpf/vuzVj5JFSxWscETkgsLUOe0uKbcFvD4amNjgd1qrF/9hIpyWW6onv2vaVKk92WZOL7TShKT9wbDELMAkGBSsOAwIaBQAwgcQGCSqGSIb3DQEHATAUBggqhkiG9w0DBwQI9ZIXcxAb7T+AgaCThXFd1yzgLF8M+wj7byobrurQlvnbEqSVhA6kI1yMCdxtcH5i5FoeK2tVFj/sSCkTYO722bvE4QRJNjSQTJW4JAhG8AcVdgc2y/pGkQjZpNva95P6GmwjeBYvqLHG7SzsaQ3o9BmWS/cASu5FFjeuKtTYQlFA/4mLZ6vTC4fu2KtUZ2bjm1ZN2/At18dGUIwpc7TuVYaVdatt/Ld3zJDZoIIDhzCCA4MwggLsoAMCAQICAQAwDQYJKoZIhvcNAQEFBQAwgY4xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLUGF5UGFsIEluYy4xEzARBgNVBAsUCmxpdmVfY2VydHMxETAPBgNVBAMUCGxpdmVfYXBpMRwwGgYJKoZIhvcNAQkBFg1yZUBwYXlwYWwuY29tMB4XDTA0MDIxMzEwMTMxNVoXDTM1MDIxMzEwMTMxNVowgY4xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLUGF5UGFsIEluYy4xEzARBgNVBAsUCmxpdmVfY2VydHMxETAPBgNVBAMUCGxpdmVfYXBpMRwwGgYJKoZIhvcNAQkBFg1yZUBwYXlwYWwuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDBR07d/ETMS1ycjtkpkvjXZe9k+6CieLuLsPumsJ7QC1odNz3sJiCbs2wC0nLE0uLGaEtXynIgRqIddYCHx88pb5HTXv4SZeuv0Rqq4+axW9PLAAATU8w04qqjaSXgbGLP3NmohqM6bV9kZZwZLR/klDaQGo1u9uDb9lr4Yn+rBQIDAQABo4HuMIHrMB0GA1UdDgQWBBSWn3y7xm8XvVk/UtcKG+wQ1mSUazCBuwYDVR0jBIGzMIGwgBSWn3y7xm8XvVk/UtcKG+wQ1mSUa6GBlKSBkTCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb22CAQAwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOBgQCBXzpWmoBa5e9fo6ujionW1hUhPkOBakTr3YCDjbYfvJEiv/2P+IobhOGJr85+XHhN0v4gUkEDI8r2/rNk1m0GA8HKddvTjyGw/XqXa+LSTlDYkqI8OwR8GEYj4efEtcRpRYBxV8KxAW93YDWzFGvruKnnLbDAF6VR5w/cCMn5hzGCAZowggGWAgEBMIGUMIGOMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxFDASBgNVBAoTC1BheVBhbCBJbmMuMRMwEQYDVQQLFApsaXZlX2NlcnRzMREwDwYDVQQDFAhsaXZlX2FwaTEcMBoGCSqGSIb3DQEJARYNcmVAcGF5cGFsLmNvbQIBADAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0BCQUxDxcNMDgwNTEyMjAxNzEzWjAjBgkqhkiG9w0BCQQxFgQUREfauO+XY0Sx3gWNIf32ThKhGwAwDQYJKoZIhvcNAQEBBQAEgYBwz6QrznijNgQD/CjHJSAALEWI1bxRELLjnE1Cb29foQyB7WgDIyIpVMDwp0anrBKavtIOe202qN6pEHrEDvNCaC1EaX3uoV2d5eQ2xMHCTyVFAELMf72HABuzkReTlZhBHyQYR/17IEaOS3ixGb5CGMNWFn6oPtdmx+DEuF0dqg==-----END PKCS7-----
" /></form>';
printf(__('If the plugin has seriously broadened your CMS horizons, %s', 'scoper'), $paypal_button);
echo '</li><li>';
printf(__('If you are an established web developer, %1$s grant me your professional opinion%2$s on how this work stacks up. Might the skills, work ethic and values I express here fit into a development team near you?', 'scoper'), '<a href="http://agapetry.net/general-contact-form/">', '</a>');
echo '</li><li>';
// TODO: update translations once poEdit update is available to fix _x and _n handling
if ( defined('WPLANG') && WPLANG )
printf(__('Hire or refer my services</a> to design, redesign or enhance your site - quality care at reasonable rates.', 'scoper'), '<a href="http://agapetry.net/service-exploration-form/">', '</a>');
else
printf(__('Hire or refer my services</a> to develop or enhance your site - quality care at reasonable rates.', 'scoper'), '<a href="http://agapetry.net/service-exploration-form/">', '</a>');
echo '</li></ul>';
//if ( $status = awp_remote_fopen( 'http://localhost/aglocal/downloads/status.htm', 5) )
if ( $status = awp_remote_fopen( 'http://agapetry.net/downloads/status.htm', 5) )
echo $status;
echo '</div>'; //rc-about-dialog
if ( ! agp_is_ie6() )
echo '<div class="madein alignright" style="margin-right: 1em;">&nbsp;</div>';
echo '<div style="height: 150px;">&nbsp;</div>';
echo '</div>'; //wrap
?>
@@ -1,109 +0,0 @@
#wpbody-content, #wrap {
background-color: #7E7B68;
background: url(img/field6b.jpg);
background-repeat: repeat;
padding-top:0;
}
#wrap {
height: 100%;
margin: 0;
}
/* for WP < 2.7 */
#wpcontent, #wpwrap {
padding-bottom: 0;
}
#screen-meta-links {
display: none;
}
#masthead-main {
background: url(img/agapetry-header_finalG.jpg);
background-repeat: no-repeat;
width: 525px;
}
.masthead {
width: 100%;
margin: 0;
padding: 0;
height: 149px;
color: white;
background-color: #7E7B68;
background: url(img/agapetry-header-repeatE.jpg);
background-repeat: repeat-x;
}
.masthead li {
list-style: none;
margin: 0;
height: 149px;
}
.masthead li a {
display: block;
width: 525px;
height: 149px;
text-decoration: none;
}
a.agp-toplink, a.agp-toplink:hover {
text-decoration: none;
}
#wpbody-content a img {border:0;}
.donate {
opacity: 0.75;
margin: 0 0 0 0.5em;
}
.donate:hover {
opacity: 1.0;
}
/* Links */
#wrap a {color:#87c0fc; font-weight:700; text-decoration:none;}
#wrap a:hover {color:#fcd987; font-weight:700; text-decoration:underline;}
/* Headers */
#wrap h2 {font-size:1.8em;}
#wrap h3 {font-size:1.5em;}
#wrap p {
line-height: 1.5em;
margin-bottom: 1.3em;
}
#agp-thanks li {
line-height: 1.5em;
}
.small {font-size:0.8em;}
.madein {
background: url(img/madein_mich_logo_40.png) no-repeat;
width: 110px;
height: 132px;
margin: 1.5em 0 0 2em;
}
.madein a {
display: block;
width: 110px;
height: 132px;
}
.rc-about-dialog {
min-width: 8em;
max-width: 760px;
color: #fff;
background-color: #1A4C1A;
opacity:.85;
-moz-opacity:.85;
margin: 0 0.5em 0 0.5em;
padding: 0.05em 0.5em 0.2em 0.5em;
border: 1px solid #aaa;
}
@@ -1,74 +0,0 @@
/* default alignment for rounded corner boxes (dialog.css) */
.rc-topper .rc-t,
.rc-topper .rc-t-left {
background:transparent url(dialog2-green-top5d.png) no-repeat top right;
opacity:.85;
-moz-opacity:.85;
}
.rc-bottomer .rc-b,
.rc-bottomer .rc-b-left {
background:transparent url(dialog2-green-bottom5d.png) no-repeat top right;
opacity:.85;
-moz-opacity:.85;
}
.rc-topper .rc-t,
.rc-bottomer .rc-b {
border-right: 1px solid transparent; /* otherwise td runs beyond table bounds. same effect as nbsp, but without messing height */
}
.rc-topper,
.rc-bottomer {
border: none;
}
.rc-topper tr,
.rc-bottomer tr {
padding: 0;
margin: 0;
}
.rc-topper tr td,
.rc-bottomer tr td{
padding: 0;
margin: 0;
}
.rc-topper .rc-t,
.rc-bottomer .rc-b {
background-position:bottom right;
}
.rc-topper .rc-t-left,
.rc-bottomer .rc-b-left {
width:20px; /* bottom corner width */
background-position:bottom left;
}
/* the rest was non-IE specific when we attempted to round IE corners */
.rc-topper .rc-t,
.rc-topper .rc-t-left,
.rc-topper .rc-b,
.rc-topper .rc-b-left {
height:12px; /* height of bottom cap/shade */
}
.rc-topper {
margin: 0;
}
.rc-topper,
.rc-bottomer {
width: 100%
}
#wrap {
margin-top: -25px;
}
#leftside {
margin-top: 5px;
}
@@ -1,22 +0,0 @@
/* IE 5.5 / 6 alignment: gave up on rounded corners */
.rc-dialog .rc-content {
_background-image: url(dialog2-green-mid5d.gif);
filter: alpha(opacity=80);
padding-top: 0.35em;
margin: 0 8px 10px -4px;
border: 1px solid #aaa;
}
#wrap {
margin-top: -20px;
}
#leftside {
margin-top: 0px;
}
#contentwide {
margin-top: 0 15px 0 15px;
padding 0 5px 0 5px;
}
@@ -1,37 +0,0 @@
/*
-- Even more rounded corners with CSS: Base stylesheet --
by Scott Schiller
http://www.schillmania.com/content/projects/even-more-rounded-corners/
(extensive modifications by Kevin Behrens - original used a single large png)
*/
.rc-dialog {
margin: 0 0.1em 0.5em 0.1em;
min-width: 8em;
max-width: 760px;
color: #fff;
}
.rc-dialog .rc-content {
background:transparent url(dialog2-green-mid5d.png) repeat-y top right;
opacity: .92;
-moz-opacity: .92;
margin: -1px 0 -1px 0;
height: 100%;
border-bottom: 1px solid transparent; /* Opera fix (otherwise background is not painted through entire height) */
}
.rc-dialog .rc-content {
padding: 0 1em 0 0.5em;
}
.rc-dialog h1,
.rc-dialog p {
margin: 0;
padding: 0.5em 0 0.5em 0;
}
.rc-dialog h1 {
padding-bottom: 0;
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 617 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 276 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 250 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 615 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More